org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session

1. 换其他定位方式,比如用xpath代替

2.不用换定位方式不用换之前脚本的方法来完成无缝升级appium版本的定位方式

修改源码解决问题,修改方法如下:

修改路径:

C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\build\lib

修改文件:driver.js

只需要修改其中一行即可

this.locatorStrategies = ['xpath', 'id', 'class name', 'accessibility id', '-android uiautomator','name'];--------再此行代码中添加上name,如下

修改完成之后,保存文件,再次重启appium服务,就可以继续使用by_name定位

让新版appium支持by_name定位的更多相关文章

  1. 新版appium 支持name定位的方法(没试 记录再此)

    查找路径:appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\build\lib 修 ...

  2. Appium新版本不再支持ByName定位了怎么办

    appium版本在1.5以后就不再支持ByName的定位,本文章仅介绍在appium1.6.3/1.6.4/1.6.5版本下如何支持ByName定位,适用于安卓.在使用appium1.5之后的版本时, ...

  3. appium----新版appium 1.11.1 支持ByName定位

    org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this sess ...

  4. Appium+Python3+iOS定位元素

    前言: 最近在做IOS自动化测试,IOS的Appium环境都配置OK,执行起来真的慢,慢到怀疑人生,那么今天就来总结一下IOS定位方式和各个定位方式的速度排序. 据我观察,按查找元素的顺序速度,从快到 ...

  5. appium xpath元素定位

    1.id定位 写法:driver.find_element_by_id("这里是resource-id") 2.name定位 name定位就是通过UI Automator工具查看的 ...

  6. 初探appium之元素定位(1)

    无论是selenium还是appium,元素定位都是我们开始实现自动化面临的第一个问题.selenium还好,我们可以在浏览器的调试页面进行元素定位还是蛮方便的.那么appium怎么做呢? 我看到很多 ...

  7. 让IE6下支持固定定位

    让IE下支持固定定位 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// ...

  8. appium 使用findElementByAndroidUIAutomator 定位元素示例

    appium 使用findElementByAndroidUIAutomator 定位元素示例 import io.appium.java_client.remote.MobileCapability ...

  9. NB-IoT是怎么工作的,是否支持基站定位?【转】

    转自:http://www.elecfans.com/iot/779658.html 根据我国无线电管理相关要求,明确NB-IoT系统基站应到到属地无线电管理机构办理设台审批,领取无线电台执照.同时, ...

随机推荐

  1. Eclipse上传项目到Git

    转载自:http://blog.csdn.net/fan510988896/article/details/56277822 Git有和Svn类似的功能. 我们想使用Eclipse上传项目到自己的Gi ...

  2. Windows 数字化器类输入设备--笔设备分析(1)(原创)

    一.前言: 参考microsoft公司的链接:https://developer.microsoft.com/zh-cn/windows/hardware 将对Windows数字化器类输入设备--笔设 ...

  3. __unsafe_unretained的含义

    OC的变量限定词的官方解释: __strong is the default. An object remains “alive” as long as there is a strong point ...

  4. 使用java注解实现toJson方法

    如果我有一个对象user,它有几个属性,我想把该对象序列化成一个json字符串,怎么做?我怎么把这种类型的问题实现成一个函数? 注解类似于在被注解的对象上,添加一些简单的属性.在运行时解析这些属性,以 ...

  5. Spring Data Solr相关配置

    1.增加Maven POM文件的存储库:pom配置如下: <repositories> <repository> <id>spring-milestone</ ...

  6. Laya for H5 之Bug追踪

    Laya For H5之Bug追踪 H5游戏一旦上线后,如何跟踪用户的崩溃日志呢?现在有很多第三方的工具,比如fundebug,其sdk接入简单,只需寥寥几行代码就可以追踪h5游戏的崩溃日志,bug日 ...

  7. UHF RFID,高频RFID开发参考资料

    ISO18000-6C电子标签百科  http://baike.baidu.com/item/ISO18000-6C%E7%94%B5%E5%AD%90%E6%A0%87%E7%AD%BE/80500 ...

  8. nginx+uwsgi配置

    nginx #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; ...

  9. 软件测试:1.Describe An Error

    软件测试:1.Describe An Error 要求: 1.简要描述你最近完成项目里的一个error: 2.说明原因,错误影响,及你怎样发现的: 或许因为刚开学的缘故,近期我并没有完成大的项目,多少 ...

  10. python中的函数参数的传递

    转载自: http://winterttr.me/2015/10/24/python-passing-arguments-as-value-or-reference/ 我想,这个标题或许是很多初学者的 ...