首页 > 移动平台 > 详细

appium 使用name 定位报错 Locator Strategy 'name' is not supported for this session【appium-desktop】

时间:2019-10-08 10:59:44      阅读:428      评论:0      收藏:0      [点我收藏+]

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】

原文:https://www.cnblogs.com/longronglang/p/11634175.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!