appium 使用name 定位报错 Locator Strategy 'name' is not supported for this session【appium-desktop】
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,再执行后,问题解决
优秀不够,你是否无可替代
软件测试交流QQ群:721256703,期待你的加入!!
欢迎关注我的微信公众号:软件测试君
![](https://www.cnblogs.com/images/cnblogs_com/longronglang/1061549/o_QQ%E6%88%AA%E5%9B%BE20190728134401.jpg)