WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Error raised when launching the app: Specify either app or appTopLevelWindow to create a session

Open dhinaQA opened this issue 2 years ago • 3 comments

POST /session HTTP/1.1 Accept: / Content-Length: 318 Content-Type: application/json; charset=utf-8 Host: 127.0.0.1:4723 User-Agent: appium/8.5.1 (selenium/4.13.0 (java windows)) X-Idempotency-Key: 6e6eb811-b9d4-4085-bd72-dc5fa2602e75

{ "capabilities": { "firstMatch": [ { } ], "alwaysMatch": { "appium:Platformversion": "1.0", "appium:app": "E:\citymobile\basil1-win32-x64\basil1.exe", "appium:automationName": "Windows", "appium:platFormname": "windows", "platformName": "windows" } } } HTTP/1.1 400 Bad Request Content-Length: 141 Content-Type: application/json

{"status":100,"value":{"error":"invalid argument","message":"Bad capabilities. Specify either app or appTopLevelWindow to create a session"}}

MY code :

DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("app","E:\citymobile\basil1-win32-x64\basil1.exe"); capabilities.setCapability("platFormname", "windows");

	capabilities.setCapability("Platformversion", "1.0");
	WindowsDriver driver=new WindowsDriver( new URL("http://127.0.0.1:4723"),capabilities);

dhinaQA avatar Oct 03 '23 08:10 dhinaQA

It will not work with selenium4.

anunay1 avatar Oct 03 '23 14:10 anunay1

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

NDqatest avatar Oct 27 '23 04:10 NDqatest

I did not test it, but it should be possible when using v5 of Appium.WebDriver and the according Appium server bridge as outlined here.

ChristoWolf avatar Jan 14 '24 09:01 ChristoWolf