Error raised when launching the app: Specify either app or appTopLevelWindow to create a session
See original GitHub issueI 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!
Issue Analytics
- State:
- Created a year ago
- Comments:24
Top Results From Across the Web
java - "Bad capabilities. Specify either app or ...
Specify either app or appTopLevelWindow to create a session " Error given by the WinApp driver. I am getting the below error screenshot...
Read more >How to use new winAppDriver feature "Attaching to an ...
it failed when opening the handler, in the appium server log, ... capabilities: specify either app or appTopLevelWindow to create a session”.
Read more >UI testing for Windows apps with WinAppDriver and Appium
Initialize the session. Before starting a test, we need to initialize an Appium session: we need to specify which is the application we...
Read more >Appium-windows-driver - npm.io
Either this capability or app must be provided on session startup. appium:appWorkingDir, Full path to the folder, which is going to be set...
Read more >Configure | Citrix Workspace app for Windows
Select the Secure ICA file session launch policy and set it to Enabled. Click Apply and OK. Using the Global App Config Service:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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)