appium报错Message: Cannot set the element to ‘XXXX’. Did you interact with the correct element?
appium+python+android
在定位到模块输入内容的时候遇到了一个问题
send_keys报错
appium报错Message: Cannot set the element to ‘XXXX’. Did you interact with the correct element?
查看了一下资料,说是因为android的模块属性问题
可输入的模块属性为android.widget.EditText
但因为我需要输入的模块属性非此属性所以send_keys失败
也尝试了get_value()和其他的输入方法,均不可行
目前暂未找到方法可以使用send_keys 看其他人说可以通过uiautomator定位(未尝试,各位可以试试)
目前我遇到的地方为登录,所以使用了driver.press_keycode()方法, 通过unicode键盘进行输入,但是presskeycode要用键码,比较麻烦。
以下是网友给出的uiautomator定位使用方式
driver.find_element_by_android_uiautomator('new UiSelector().text("定位属性")').send_keys('输入内容')
键码使用方式请参考:https://blog.csdn.net/weixin_40180628/article/details/79169846
appium报错Message: Cannot set the element to ‘XXXX’. Did you interact with the correct element?的更多相关文章
- 【已解决】mac上appium报错:“Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path”
按照网上教程配置完appium环境后,真机跑自动化过程,遇到如下报错: appium报错如下: [ADB] Checking whether aapt is present [ADB] The AND ...
- 【问题】报错[CRITICAL] Rendering SLS 'base:minions.install' failed: Jinja variable 'list' object has no element 0
1.报错[CRITICAL] Rendering SLS 'base:minions.install' failed: Jinja variable 'list' object has no elem ...
- appium报错:An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
Appium Desktop版本:1.9.0 xcode版本:9.4.1 测试机:iPhone7 11.3系统 问题描述:在xcode上的produc的text运行是可以将WebDriverAgen ...
- appium报错及解决方案
[已解决]mac上手动打开appium报错:“Could not find aapt Please set the ANDROID_HOME environment variable with the ...
- python+appium 【已解决】真机运行appium报错“WebDriverException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c.......详见内文
问题报错提示: selenium.common.exceptions.WebDriverException: Message: A new session could not be created. ...
- Mysql:报错message from server: "Too many connections"(连接太多)
报错信息 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source re ...
- appium 报错:AttributeError:"NoneType' object has no attribute 'XXX'
报错截图如下: 问题原因: 根据以上报错提示可已看到问题的原因为:logger中没有info此方法的调用,点击"具体报错的位置"上面的链接,可直接定位到具体的报错位置.根据分析所得 ...
- appium常见问题08_pycharm中导入appium报错( 已成功安装appium_python_client)【MAC】
问题: 成功安装配置好python+appium自动化环境后,其中appium-python-client已安装好.但是在pycharm中编写自动化脚本时,导入appium,发现appium报红无法使 ...
- iOS---用Application Loader 上传的时候报错No suitable application records were found. Verify your bundle identifier 'xx' is correct
用Application Loader 上传的时候报错,突然发现用Application Loader的账号 竟然不是公司的账号 换成公司的账号 就可以了.
随机推荐
- C++函数调用过程解析
编译环境:Windows 10 + VS2015. 0.引言 函数调用的过程实际上也就是一个中断的过程,本文演示和深入分析参数入栈.函数跳转.保护现场.恢复现场等函数调用过程. 首先对三个常用的寄存器 ...
- new Date时间格式转换方法
平时经常会使用到时间转换,组件库已经有很多组件可以自动生成时间类型了,但是底层的封装方法还是得有 获取当前时间 new Date() 或者自己拥有一个毫秒时间 方法如下 /** * title: 时 ...
- onerror事件捕获网页中的错误
转载请注明来源:https://www.cnblogs.com/hookjc/ <html><head><script type="text/javascrip ...
- 解决Android3.0之后不能在主线程中进行HTTP请求
感谢大佬:https://www.cnblogs.com/falzy/p/5763848.html 在Android3.0以后,会发现,只要是写在主线程(就是Activity)中的HTTP请求,运行时 ...
- Java线程--CopyOnWrite容器使用
原创:转载需注明原创地址 https://www.cnblogs.com/fanerwei222/p/11871602.html Java线程--CopyOnWrite容器使用 CopyOnWrit容 ...
- TreeMap或者HashMap中的entrySet()方法
查看entrySet()源码 /** * Returns a {@link Set} view of the mappings contained in this map. * * <p> ...
- 数据库监测sql执行
SQL Server Profiler可以检测在数据上执行的语句,特别是有的项目不直接使用sql语句,直接使用ORM框架的系统处理数据库的项目,在调试sql语句时,给了很大的帮助. 之前写了使用SQL ...
- Elasticsearch使用系列-.NET6对接Elasticsearch
Elasticsearch使用系列-ES简介和环境搭建 Elasticsearch使用系列-ES增删查改基本操作+ik分词 Elasticsearch使用系列-基本查询和聚合查询+sql插件 Elas ...
- linux中可以查看端口占用的方法
在自己搭建的服务器中,经常容易出现端口被占用的问题,那么怎么知道自己的端口是否被占用了呢? 可以使用下面的方法: linux中可以查看端口占用的方法. netstat -ant | grep 80 ( ...
- [LeetCode]13.罗马数字转整数(Java)
原题地址: roman-to-integer 题目描述: 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M. 字符 数值 I 1 V 5 X 10 L 50 C 100 D 500 M ...