appium / dotnet-client

Extension to the official Selenium dotnet webdriver
Apache License 2.0
373 stars 186 forks source link

[Bug]: The `WindowsDriver` lacks support for `ActivateApp`/`TerminateApp` since `LaunchApp` was removed and `CloseApp` moved #793

Open Redth opened 3 weeks ago

Redth commented 3 weeks ago

Description

In the 5.0.0 release there were changes to both LaunchApp and CloseApp which both have been deprecated for some time. The alternatives suggest using ActivateApp and TerminateApp I believe. On windows however, neither of these are implemented in the driver and throw exceptions when you try to call them.

So, CloseApp still 'works' by casting to WindowsDriver first, however the only way I've found to work around the removal of LaunchApp is to call driver.ExecuteScript("windows: launchApp", ["my-app-id"]); (though I think app id is unnecessary here).

I'm not sure if it's considered incorrect to make ActivateApp and TerminateApp implement the working calls so that the same method does work xplat, or if the fix considered most correct is to do the same thing for LaunchApp that was done to CloseApp and bring back an implementation for it just on WindowsDriver.

Environment