Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Redth opened this issue Jun 18, 2024 · 0 comments · Fixed by #813

Comments

@Redth
Copy link

Redth commented Jun 18, 2024

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.

  • LaunchApp was removed completely
  • 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
  • Mobile platform/version under test: Windows
  • Real device or emulator/simulator: Device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants