WinAppDriver: Error raised when launching the app: Specify either app or appTopLevelWindow to create a session
I am trying to launch my test with the following capabilities:
{
"capabilities": {
"firstMatch": [
{
}
],
"alwaysMatch": {
"appium:app": "C:\\AeroScoutEngineManager\\bin\\Rte\\EngineManager.exe",
"appium:winAppDriverHost": "127.0.0.1:4723",
"platformName": "Windows",
"appium:platformVersion": "10",
"appium:automationName": "Windows",
"appium:appArguments": "ShellLayout.xml ShellCnf.xml",
"appium:appWorkingDir": "c:\\AeroScoutEngineManager\\bin\\Rte"
}
}
}
My application must be launched with the arguments above. from that specific path.
The error I am getting is:
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 387
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: appium/python 2.6.0 (selenium/4.3.0 (python windows))
X-Idempotency-Key: 4479771e-d340-492a-9486-c96fe20d15c2
{"capabilities": {"firstMatch": [{}], "alwaysMatch": {"appium:app": "C:\\AeroScoutEngineManager\\bin\\Rte\\EngineManager.exe", "appium:winAppDriverHost": "127.0.0.1:4723", "platformName": "Windows", "appium:platformVersion": "10", "appium:automationName": "Windows", "appium:appArguments": "ShellLayout.xml ShellCnf.xml", "appium:appWorkingDir": "c:\\AeroScoutEngineManager\\bin\\Rte"}}}
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"}}
==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 387
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: appium/python 2.6.0 (selenium/4.3.0 (python windows))
X-Idempotency-Key: e71805eb-5c48-40b8-8a38-c45b801d244d
{"capabilities": {"firstMatch": [{}], "alwaysMatch": {"appium:app": "C:\\AeroScoutEngineManager\\bin\\Rte\\EngineManager.exe", "appium:winAppDriverHost": "127.0.0.1:4723", "platformName": "Windows", "appium:platformVersion": "10", "appium:automationName": "Windows", "appium:appArguments": "ShellLayout.xml ShellCnf.xml", "appium:appWorkingDir": "c:\\AeroScoutEngineManager\\bin\\Rte"}}}
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"}}
==========================================
What is the problem?
Thanks!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24
@Shilpiiiii what are your python versions of
Appium-Python-Client
andselenium
? from my experience with that error you need to downgrade these libs versionsProblem was related to Appium-Python-Client lib version, I had to downgrade from
2.6.0
to2.2.0
and the issue solved. In addition to downgrade Selenium version3.141.1
(Thanks @anunay1)