Appium问题解决方案(5)- selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session
背景
使用Appium Server 1.15.1版本
执行了以下脚本
test = driver.find_element_by_name("自动化测试")
print(test.text)
报了以下错误
圈重点
selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session
简译: by_name 这种定位元素方式已经不支持了
然后查了下资料,发现是在appium1.5之后, by_name 的这种定位方式已经彻底移除
解决方法一
最简单,不再用 by_name 定位方式了,改用id、class、xpath、accessibility id
解决方法二
看了网上的教程【driver.js】,最终发现也是没用的,这里就不展开了~还是换个定位方式叭!
Appium问题解决方案(5)- selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session的更多相关文章
- selenium的报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class names not permitted
报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class ...
- Appium新版本遇到的问题,不能通过 name 去定位元素抛 Message: Locator Strategy 'name' is not supported for this session
环境: 1.Appium: 1.15.1 2.Python: 3.7.0 3.Selenium: 3.141.0 4.IDE: Pycharm 5.PC:Windows 10 问题:在 Pycharm ...
- 【Seleniuem】selenium.common.exceptions.InvalidSelectorException
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: An invalid or illega ...
- Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
背景 运行时代码报错: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occ ...
- appium selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect
selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect. We wanted {" ...
- selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary
使用Chrome浏览器时,经常会遇到以下报错:浏览器没有调用起来 selenium.common.exceptions.WebDriverException: Message: unknown Err ...
- python + web自动化,点击不生效,提示“selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (117, 674)”
前言: 在做web自动化时,遇到一个缩放了浏览器比例的操作,从100%缩小到80%,再进行点击的时候,弹出报错信息,无法点击 selenium.common.exceptions.ElementCli ...
- selenium.common.exceptions.TimeoutException: Message: Screenshot: available via screen
在使用selenium+phantomjs的时候在Windows平台下能够正常工作,在Linux下却不能,并得到错误信息: selenium.common.exceptions.TimeoutExce ...
- selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)
1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...
随机推荐
- oracle控制用户权限命令
ORACLE控制用户权限: 首先使用系统中的拥有DBA权限的账号(system)登录: 一.创建用户: 1.DBA使用creater user语句创建用户: --创建登录用户名为:user01,密码为 ...
- 浙大二院姚克团队发现新的NLRP3炎症小体抑制剂,有望用于治疗炎症疾病
期刊:Clinical and Translational Medicine 发表时间:2021年7月19日 影响因子:11.492 角膜炎是一种眼科常见疾病,也是我国主要致盲眼病之一,其特征是炎性细 ...
- C++1-100之间 7的倍数 带7 打印 敲桌子
1 // 1-100之间 7的倍数 带7 打印 敲桌子 2 #include <iostream> 3 using namespace std; 4 5 int main() 6 { 7 ...
- Java线程基础及多线程的实现
一.进程和线程 1.进程:正在运行的程序 是系统进行资源分配和调用的独立单位 每一个进程都有它自己的内存空间和系统资源 2.线程是进程中的单个顺序控制流,是一条执行路径 ...
- spring-data-jdbc的基础使用(一)
前言 很多人知道Mybatis,知道Jpa,但是对spring-data-jdbc可能了解的少之又少.注意我们这里说的是data-jdbc,而不是普通的jdbc.它拥有了类似jpa的一些特性,比如能够 ...
- Android系统编程入门系列之服务Service中的进程间通信
在上篇文章以线程间的通信方式Handler类结尾,服务Service还支持的进程间通信,又是具体怎么实现的呢?这就要用到加载服务一文中提到的AIDL语言规范了. AIDL是 Android Inter ...
- 痞子衡嵌入式:i.MXRT中不支持DQS的FlexSPI引脚组连接Flash下载与启动注意事项
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家分享的是i.MXRT中不支持DQS的FlexSPI引脚组连接Flash下载与启动注意事项. 最近痞子衡在支持一个印度客户,这个客户项目主芯片选择 ...
- MATLAB—面向复数和数组的基本运算
文章目录 一.MATLAB基本运算说明 二.面向复数的计算特点 1.基础知识 2.对复数的基本操作 3.复数的开方问题 二.面向数组 1.数组的输入形式 2.对矩阵中的元素进行并行操作 3.利用数组运 ...
- Do you want to continue? [Y/n] Abort.
当出现这个后命令终止,无法选择 y这时候 ,在输入命令时候提前加入 -y udo apt install sysv-rc-conf -y
- noip模拟8
T1 星际旅行 题目描述 一个图存在欧拉路的条件是有\(2/0\)个点有奇数个出度,把一条无向边拆成两条,所以可以选择拆两个自环.一个自环一条边.连接同一个点的边. 先判断图是否是边联通,不联通则输出 ...