question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:24

github_iconTop GitHub Comments

2reactions
bwomsm1commented, Sep 28, 2022

@Shilpiiiii what are your python versions of Appium-Python-Client and selenium? from my experience with that error you need to downgrade these libs versions

2reactions
bwomsm1commented, Aug 15, 2022

Problem was related to Appium-Python-Client lib version, I had to downgrade from 2.6.0 to 2.2.0 and the issue solved. In addition to downgrade Selenium version 3.141.1

(Thanks @anunay1)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found