“运行Appium命令时出错:无法读取null的属性'capabilities'”

2024-10-04 05:21:00 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试使用Appium和python运行基本的Hello World类测试时,出现以下错误:

WebDriverException:消息:该URL未映射到有效的JSONWP资源

进一步看,我发现它发生在初始化web驱动程序时:

self.driver = webdriver.Remote('http://localhost:4723/wd/hub',          desired_caps)

所以我在浏览器中输入http://localhost:4723/wd/hub,然后

That URL did not map to a valid JSONWP resource

我在google上搜索,在stackoverflow上遇到了一个QA,但它没有解决它。我还输入了http://localhost:4723/wd/hub/status

^{pr2}$

还有wd/hub/session和got

{
   status: 13,
   value: "ERROR running Appium command: Cannot read property 'capabilities' of null"
}

不幸的是,对于这些错误,只有很少的google结果,这些结果并不能帮助解决问题。所以如果你知道如何让他们离开,请帮忙。在


Tags: localhosthttp消息urlhelloworldstatus错误