microsoft / WinAppDriver

Windows Application Driver
MIT License
3.67k stars 1.4k forks source link

Bad capabilities. Specify either app or appTopLevelWindow to create a session" Error given by the WinApp driver #1938

Open hritha opened 1 year ago

hritha commented 1 year ago

I am getting the below error when using the WinApp driver for the desktop automation." Bad capabilities. Specify either app or appTopLevelWindow to create a session"

Selenium - 4.2 appium - 8.1.0

It's java application DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "Windows"); caps.setCapability("deviceName", "WindowsPC"); caps.setCapability("appWorkingDir", "C:\Program Files (x86)\RSA SecurID Software Token"); caps.setCapability("app", "C:\Program Files (x86)\RSA SecurID Software Token\SecurID.exe"); try { ProcessBuilder pBuilder = new ProcessBuilder("C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe").inheritIO(); proc = pBuilder.start(); try { rsa = new WindowsDriver(new URL("http://127.0.0.1:4723/"), caps); Assert.assertNotNull(rsa); } catch (Exception ex) { }

Please share some suggestions on this issue

anunay1 commented 1 year ago

You need to downgrade to selenium 3.

dhinaQA commented 1 year ago

i am also facing the same issue

anunay1 commented 1 year ago

i am also facing the same issue

Have you downgraded selenium to version3?

NDqatest commented 11 months ago

Selenium 3 is supporting there is no issue. But the issue with Selenium 4 which is not supporting WinApp driver. Any inputs to support for selenium 4?