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. ApacheCN C/C++ 译文集(二) 20211204 更新

    编写高效程序的艺术 零.序言 第一部分:性能基础 一.性能和并发性介绍 二.性能测量 三.CPU 架构.资源和性能 四.内存架构和性能 五.线程.内存和并发 第二部分:高级并发 六.并发和性能 七.并 ...

  2. 布客·ApacheCN 编程/后端/大数据/人工智能学习资源 2020.7

    公告 我们的群共享文件有备份到 IPFS 的计划,具体时间待定. 我们的机器学习群(915394271)正式改名为财务提升群,望悉知. 请关注我们的公众号"ApacheCN",回复 ...

  3. bind方法源码

    'use strict'; module.exports = function bind(fn, thisArg) { return function wrap() { var args = new ...

  4. linux 设置connect 超时代码[select/epoll]

    转载请注明来源:https://www.cnblogs.com/hookjc/ linux下socket编程有常见的几个系统调用: 对于服务器来说, 有socket(), bind(),listen( ...

  5. cell重用

    少数几个cell可不重用 NSString *CellIdentifier = [NSString stringWithFormat:@"MyCellID_%d",indexPat ...

  6. springcloud+gateway微服务整合swagger

    单一的微服务集成swagger: maven: <dependency> <groupId>io.springfox</groupId> <artifactI ...

  7. PlatformIO 创建 libopencm3 + FreeRTOS 项目

    PlatformIO: libopencm3 + FreeRTOS 以下步骤基于常见的 Bluepill STM32F103C8T6, 也适用于其它 libopencm3 支持的MCU型号 方案一: ...

  8. vue/cli的目录结构说明

    node_modules:npm 加载的项目所需要的各种依赖模块. src:这里是我们开发的主要目录(源码),基本上要做的事情都在这个目录里面,里面包含了几个目录及文件: 1.assets:放置一些图 ...

  9. linux_16

    对常用I/O模型进行比较说明 nginx中的模块分类及常见核心模块有哪些 描述nginx中worker_processes.worker_cpu_affinity.worker_rlimit_nofi ...

  10. 2、Golang基础--包的使用、if-else语句、循环、switch语句、数组、切片、可变函数参数、map类型

    1 包的使用 // 为了便于组织代码,同一种类型的代码,写在同一个包下,便于管理 // 定义包 -新建一个文件夹 -内部有很多go文件 -在每个go文件的第一行,都要声明包名,并且包名必须一致 -在一 ...