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
使用 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的更多相关文章
- appium 使用findElementByAndroidUIAutomator 定位元素示例
appium 使用findElementByAndroidUIAutomator 定位元素示例 import io.appium.java_client.remote.MobileCapability ...
- Python selenium PO By.XPATH定位元素报错
Python selenium PO By.XPATH定位元素报错 如下代码经常报错: # 首页的“新建投放计划”按钮 new_ads_plan = (By.XPATH, "//*[tex ...
- Appium+Python3+iOS定位元素
前言: 最近在做IOS自动化测试,IOS的Appium环境都配置OK,执行起来真的慢,慢到怀疑人生,那么今天就来总结一下IOS定位方式和各个定位方式的速度排序. 据我观察,按查找元素的顺序速度,从快到 ...
- appium 链接真机运行时报错
今天用appium链接真机时,碰到的第一个问题:Attempt to re-install io.appium.settings without first uninstalling.(这是日志中显示 ...
- Appium之uiautomator定位元素
元素定位方式有多种,Android也有自身独有的定位方式.下面就单独介绍其基于uiautomator定位元素的方法: 基本语法: driver.find_element_by_android_uiau ...
- appium之android_uiautomator定位进阶版
前言 上一篇介绍uiautomator的定位方式都是类似这种'new UiSelector().xxx("xxx")',看起非常长,我也记不住,这很不python.于是本篇优化了定 ...
- Appium之xpath定位元素
原文:http://www.cnblogs.com/cnkemi/p/9180525.html appium也是以webdriver为基的,对于元素的定位也基本一致,只是增加一些更适合移动平台的独特方 ...
- python+selenium:点击页面元素时报错:WebDriverException: Message: Element is not clickable at point (1372.5, 9.5). Other element would receive the click: <li style="display: list-item;" id="tuanbox"></li>
遇到一个非常郁闷的问题,终于解决了, 问题是这样的,NN网站的价格计划,每一个价格计划需要三连击才能全部点开,第一个房型的价格计划是可以正确三连击打开的,可是第二个房弄就不行了,报错说不是可点击的 ...
- appium之android_uiautomator定位
前言 appium就是封装android的uiautomator这个框架来的,所以uiautomator的一些定位方法也可以用 text 1.通过text文本定位语法 new UiSelector() ...
随机推荐
- bzoj1072【SCOI2007】排列perm
1072: [SCOI2007]排列perm Time Limit: 10 Sec Memory Limit: 162 MB Submit: 1479 Solved: 928 [id=1072&q ...
- 【POJ3074】Sudoku DLX(Dancing Links)
数独就要DLX,不然不乐意. 数独的DLX构造:9*9个点每一个点有9种选择,这构成了DLX的729行,每行.列.阵有限制,均为9行(/列/阵),然后每行(/列/阵)都有九种数的情况.于是就有了3*9 ...
- 数据挖掘算法学习(八)Adaboost算法
本文不定期更新.原创文章,转载请附上链接http://blog.csdn.net/iemyxie/article/details/40423907 谢谢 Adaboost是一种迭代算法,其核心思想是针 ...
- TCP传输工作原理
引言 在TCP/IP体系结构中,IP协议只管将数据包尽力传送到目的主机,无论数据传输正确与否,它都不做验证,不发确认,也不保证数据包的顺序,因而不具有可靠性.这一问题要由传输层TCP协议来解决,TCP ...
- 为PhoneGap写一个android插件
为PhoneGap写一个android插件,要怎么做? 其实这句话应该反过来说,为android写一个PhoneGap插件,要怎么做? 这里以最简单的Hello World!为例,做个说明: 1.第一 ...
- idea2016的使用心得 --- 太棒了
今天打开myeclipse感觉里面全是project,也懒着换地方了,因为这些代码还要时常看,索性安装了idea试试水,感觉还不错,用起来并不比myeclipse差,跟webstorm差不多,他俩就是 ...
- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/util/POILogFactory
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/util/POILogFacto ...
- C# winform通过按钮上移下移 解决了datasource绑定问题
事件代码: private void btn_frmDicType_MoveUp_Click(object sender, EventArgs e) { int lstLength = this.ls ...
- vue中时间控件绑定多个输入框
首先去下载laydate时间控件,引入到相应的模板中 <input type="text" val-required="" value="&qu ...
- php打包文件夹成zip文件
function addFileToZip($path,$zip){ $handler=opendir($path); //打开当前文件夹由$path指定. while(($filenam ...