Appium Inspector Specify either app or appTopLevelWindow to create a session

2.4k Views Asked by At
{
  "platformName": "windows",
  "appium:automationName": "windows",
  "appium:appTopLevelWindow": "2f0c10"
}

This doesn't work with described error. But the same works on C#

I don't have app package or Id, only location of exe and this appTopLevelWindow. I would like to attach the session with inspector. Can anybody help?

WinAppDriver log:

POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US
Connection: keep-alive
Content-Length: 406
Content-Type: application/json
Host: 127.0.0.1:4723
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) appium-inspector/2022.2.1 Chrome/91.0.4472.164 Electron/13.6.3 Safari/537.36

{"capabilities":{"alwaysMatch":{"platformName":"windows","appium:automationName":"windows","appium:appTopLevelWindow":"2f0c10","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"windows","appium:automationName":"windows","appium:appTopLevelWindow":"2f0c10","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true}}
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"}}
1

There are 1 best solutions below

0
On

It is working fine with the following dependency version:

io.appium : 7.3.0

selenium-java: 3.141.0