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.
CloseApp was moved from the appium driver to the windows specific driver
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
.NET client build version or git revision if you use some snapshot: 5.0.0
Appium server version or git revision if you use some snapshot: 2.10.3
Desktop OS/version used to run Appium if necessary: Windows
Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 20.4.0
Description
In the 5.0.0 release there were changes to both
LaunchApp
andCloseApp
which both have been deprecated for some time. The alternatives suggest usingActivateApp
andTerminateApp
I believe. On windows however, neither of these are implemented in the driver and throw exceptions when you try to call them.LaunchApp
was removed completelyCloseApp
was moved from the appium driver to the windows specific driverSo,
CloseApp
still 'works' by casting toWindowsDriver
first, however the only way I've found to work around the removal ofLaunchApp
is to calldriver.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
andTerminateApp
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 forLaunchApp
that was done toCloseApp
and bring back an implementation for it just onWindowsDriver
.Environment