RF中使用 name定位

报错提示:

Locator Strategy 'name' is not supported for this session

解决:

1、打开本地文件 driver.js (路径:C:\XXXXX\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\build\lib)

2、查找 this.locatorStrategies = ['xpath', 'id', 'class name', 'accessibility id', '-android uiautomator'];

将 name加到里面,  this.locatorStrategies = ['xpath', 'id', 'class name', 'accessibility id', '-android uiautomator','name'];

3.重启appium,再执行后,问题解决

appium 使用name 定位报错 Locator Strategy 'name' is not supported for this session【appium-desktop】的更多相关文章

  1. appium 使用name 定位报错 Locator Strategy 'name' is not supported for this session

    RF中使用 name定位 报错提示: Locator Strategy 'name' is not supported for this session 解决: 1. 打开本地文件 driver.js ...

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

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

  4. 不支持find_element_by_name元素定位方法,抛不支持find_element_by_name元素定位方法,会抛如下错误 org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session的解决

    appium1.5后不支持find_element_by_name元素定位方法,会抛如下错误 org.openqa.selenium.InvalidSelectorException: Locator ...

  5. appium解决无法通过name属性识别元素org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session

    执行代码.: public AndroidDriver<AndroidElement> appiumDriver; appiumDriver.findElement(By.name(&qu ...

  6. AS报错:lambda expressions are not supported at this language level

    AS报错:lambda expressions are not supported at this language level 解决方法 打开打开 File --> Project Stuct ...

  7. 运行 appium 自带实例报错:unresolved import:webdriver

    python demo 中from appium import webdriver报错unresolved import:webdriver 之所以会报这样的error是因为没有装clientclie ...

  8. 使用tagName定位报错

    使用标签进行定位元素,页面报错,由于input标签不唯一,webdriver默认会取第一个元素,但是第一个input元素的类型是‘hidden’,无法展示,因此程序就报错了 如何解决,未完待续...

  9. Appium+python自动化54-appium-doctor报错已解决(SyntaxError: Unexpected token ...)

    前言 由于新版的appium desktop版本是不带appium-doctor这个包的,所以想用appium-desktop检查环境的话需要另外的安装了,在安装的时候小编又遇到了一个坑 报错信息:S ...

随机推荐

  1. 2019/12/13学习内容摘要(Linux磁盘管理①)

    一,查看磁盘或目录容量 1.命令df  查看已挂载磁盘的总容量,使用容量,剩余容量等,可以不加任何参数,默认以KB为单位 选项[-i] 表示查看inodes的使用情况 [-h] 表示用合适的单位显示 ...

  2. [Go] 轻量服务器框架基础TCP服务模块

    框架要先把整体的结构定义好,一般都是在$GOPATH目录的src下建立自己的目录 zinterface是一些接口的定义 znet就是接口的具体实现 IServer.go package zinterf ...

  3. Mysql基本注入

    实验环境:墨者学院Mysql手工注入漏洞测试靶场 后台源码没有进行任何字符过滤. 首先进入靶场环境 先用admin登陆试试 果然不行,这时看到用户登录下方有一个停机维护通知,点进去瞅瞅 看到这里链接上 ...

  4. pymysql用法,Python连接MySQL数据库

    Pymysql模块是专门用来操作mysql数据库的模块,使用前需要安装,安装指令:pip install pymysql 操作流程: 第一步:import pymysql 第二步:获取数据库的连接 , ...

  5. PyCharm2019 激活

    文章末尾补充几个激活码:网上收集 一.破解补丁激活优点:永久期限 缺点:需要修改配置文件和下载破解文件 1.下载破解文件点击链接 链接: https://pan.baidu.com/s/1T405JC ...

  6. new String()与toString

    str.toString是调用了str这个object对象的类的toString方法.一般是返回这么一个String:[class name]@[hashCode].new String(str)是根 ...

  7. SpringCloud微服务(02):Ribbon和Feign组件,实现服务调用的负载均衡

    本文源码:GitHub·点这里 || GitEE·点这里 一.Ribbon简介 1.基本概念 Ribbon是一个客户端的负载均衡(Load Balancer,简称LB)器,它提供对大量的HTTP和TC ...

  8. wx-show与!show

    切换的表示 <!--index.wxml--> <view class="container"> <view class="item&quo ...

  9. 剑指offer笔记面试题12----矩阵中的路径

    题目:请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字符的路径.路径可以从矩阵中的任意一格开始,每一步可以在矩阵中向左.右.上.下移动一格.如果一条路径经过了矩阵的某一格,那么该路径 ...

  10. 总结在ssm整合中,Mybatis出现Mapped Statements collection already contains value for xxxxx的解决方案

    先贴一段报错信息: 前面的都不是很重要,看最后灰色标注的那段.... 严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.Contex ...