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?的更多相关文章

  1. 【已解决】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 ...

  2. 【问题】报错[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 ...

  3. 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 ...

  4. appium报错及解决方案

    [已解决]mac上手动打开appium报错:“Could not find aapt Please set the ANDROID_HOME environment variable with the ...

  5. 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. ...

  6. Mysql:报错message from server: "Too many connections"(连接太多)

    报错信息 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source re ...

  7. appium 报错:AttributeError:"NoneType' object has no attribute 'XXX'

    报错截图如下: 问题原因: 根据以上报错提示可已看到问题的原因为:logger中没有info此方法的调用,点击"具体报错的位置"上面的链接,可直接定位到具体的报错位置.根据分析所得 ...

  8. appium常见问题08_pycharm中导入appium报错( 已成功安装appium_python_client)【MAC】

    问题: 成功安装配置好python+appium自动化环境后,其中appium-python-client已安装好.但是在pycharm中编写自动化脚本时,导入appium,发现appium报红无法使 ...

  9. iOS---用Application Loader 上传的时候报错No suitable application records were found. Verify your bundle identifier 'xx' is correct

    用Application Loader 上传的时候报错,突然发现用Application Loader的账号 竟然不是公司的账号  换成公司的账号 就可以了.

随机推荐

  1. 笔记:Bridging the Gap Between Relevance Matching and Semantic Matching for Short Text Similarity Modeling

    笔记:Bridging the Gap Between Relevance Matching and Semantic Matching for Short Text Similarity Model ...

  2. Jvm内存回收

    一.什么内存会被回收 可达性分析算法 通过一系列的GC ROOT的对象作为超始点,从这些节点开始向下搜索,搜索所走的路径称为"引用链",当一个对象到GC ROOT之间没有任何引用链 ...

  3. vue常用组件

    滚动组件:better-scroll   官网地址:https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/installation.html ...

  4. Flutter Windows 桌面端支持进入稳定版

    Flutter 创建伊始,我们就致力于打造一个能够构建精美的.可高度定制的.并且可以编译为机器码的跨平台应用解决方案,以充分发挥设备底层硬件的全部图形渲染能力.今天,Flutter 对 Windows ...

  5. Redis学习笔记(二)redis 底层数据结构

    在上一节提到的图中,我们知道,可以通过 redisObject 对象的 type 和 encoding 属性.可以决定Redis 主要的底层数据结构:SDS.QuickList.ZipList.Has ...

  6. [POI2010]TEL-Teleportation

    因为题目中要求 \(1 \sim 2\) 的最短路只有 \(5\),于是我们可以考虑直接使用人脑将图分层. 那么我们怎么定义每层的点呢?因为要使 \(1 \sim 2\) 的最短路只有 \(5\),我 ...

  7. winform 获得局域网内在线IP和计算机名,获取IP,多线程网络编程

    转载请注明来源:https://www.cnblogs.com/hookjc/ using System; using System.Collections.Generic; using System ...

  8. ROS::message_filters中的一个报错(mt::TimeStamp……)

    『方便检索』 ros::Time msg_time = mt::TimeStamp<typename mpl::at_c<Messages, i>::type>::value( ...

  9. Solution -「HEOI/TJOI 2016」「洛谷 P2824」排序

    \(\mathcal{Description}\)   Link.   给定排列 \(\{p_n\}\) 和 \(m\) 次局部排序操作,求操作完成后第 \(q\) 位的值.   \(n,m\le10 ...

  10. [源码解析] NVIDIA HugeCTR,GPU版本参数服务器--- (4)

    [源码解析] NVIDIA HugeCTR,GPU版本参数服务器--- (4) 目录 [源码解析] NVIDIA HugeCTR,GPU版本参数服务器--- (4) 0x00 摘要 0x01 总体流程 ...