Original error: The desired capabilities must include either an app, appPackage or browserName

问题

用Appium测试报错

selenium.common.exceptions.WebDriverException: 
Message: An unknown server-side error occurred while processing the command. 
Original error: The desired capabilities must include either an app, 
appPackage or browserName

解决

没有找对对应的appPackageappActivity
可以通过cmd运行下面命令:

adb shell dumpsys window w | find "/" | find "name="

就会得到类似下面的信息:

mSurface=Surface(name=com.tencent.mm/com.tencent.mm.plugin.account.ui.LoginPasswordUI)

其中appPackage

你可能感兴趣的:(测试,python,android,Python爬虫和数据分析)