当前位置:网站首页>“message“:“Bad capabilities. Specify either app or appTopLevelWindow to create a session“

“message“:“Bad capabilities. Specify either app or appTopLevelWindow to create a session“

2022-06-27 00:07:00 EXEC_ CHRONICLE_ KEY

python Use appium Time error
{“status”:100,“value”:{“error”:“invalid argument”,“message”:“Bad capabilities. Specify either app or appTopLevelWindow to create a session”}}

Below is the generated json Content , Can't match winAppDriver The rules of

{
    "capabilities":{
    "firstMatch":[{
    "platformName":"Windows","appium:app":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","appium:deviceName":"WindowsPC","ms:experimental-webdriver":true}]}}

The correct content should be no prefix "appium:", as follows

{
    "capabilities": {
    "firstMatch": [{
    "platformName": "Windows", "appium:deviceName": "WindowsPC", "appium:app": "C:\\Windows\\System32\\notepad.exe"}]}, "desiredCapabilities": {
    "platformName": "Windows", "deviceName": "WindowsPC", "app": "C:\\Windows\\System32\\notepad.exe"}}

Inquire about appium Documentation of , Because 2.0 Version uses the 1.0 Different versions of json Generate formula ,
have access to 1.0 Version of appium-python-client To replace

https://pypi.tuna.tsinghua.edu.cn/simple/appium-python-client/

原网站

版权声明
本文为[EXEC_ CHRONICLE_ KEY]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206262331463409.html