SpecFlowOSS / SpecFlow.Actions

BSD 3-Clause "New" or "Revised" License
57 stars 53 forks source link

[WindowsAppDriver] Set additional Appium capability "appWorkingDir" through specflow.actions.json as referential path #101

Closed DrunkenDeveloper closed 2 years ago

DrunkenDeveloper commented 2 years ago

Hi, our application under test needs to have the working directory set to the path of the executable. As far as I have seen, the WindowsApplicationDriver directory is the working directory when the application is started through the test. So we would like to set the appWorkingDir in specflow.actions.json. Right now, it's only possible to set appWorkingDir as full path. It would be great, if it could be set as referential path just like app.

e.g.

if (string.Equals(capability.Key, "app", StringComparison.OrdinalIgnoreCase) ||
    string.Equals(capability.Key, "appWorkingDir", StringComparison.OrdinalIgnoreCase))
{
    options.AddAdditionalCapability(capability.Key, Path.Combine(Directory.GetCurrentDirectory(), capability.Value));
}

Best regards

SabotageAndi commented 2 years ago

I am happy to review any PR that adds this behavior.