首页 > 移动平台 > 详细

Appium 使用android_uiautomator定位元素时报错: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

时间:2017-11-10 19:14:49      阅读:731      评论:0      收藏:0      [点我收藏+]

使用 android_uiautomator 定位元素时(现在用的还不太熟,对于这个方法还需要加深了解)报错:

报错信息:The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

 

技术分享

因为用的不熟,所以也是上网查了好多方法,最后检查代码的时候发现,原来是拼写错误

我将new UiSelector()写成了newUiSelector(),中间少了一个空格

driver.find_element_by_android_uiautomator(‘newUiSelector().text("账号登录")‘).click()

改正后:
driver.find_element_by_android_uiautomator(‘new UiSelector().text("账号登录")‘).click()

纠正代码后,就可以正常执行代码了。




Appium 使用android_uiautomator定位元素时报错: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

原文:http://www.cnblogs.com/kaerxifa/p/7816066.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!