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

RF中使用 name定位

报错提示:

Locator Strategy ‘name‘ is not supported for this session

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

 

 

解决:

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

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

 

 

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】

 

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

上一篇:【Android】安装插件 + 改变文字大小、颜色 + 隐藏代码区块的直线


下一篇:Android开发者必看:build.gradle 配置指南