首页 > 其他分享 >appium使用name定位报错 Locator Strategy 'name' is not supported for this session【多测师_王sir】

appium使用name定位报错 Locator Strategy 'name' is not supported for this session【多测师_王sir】

时间:2022-10-26 11:07:18浏览次数:65  
标签:appium name accessibility 报错 android id

报错提示:

Locator Strategy 'name' is not supported for this session

解决:

1.打开本地文件 driver.js (路径:C:\Users\wangzhiqiang(这里改为自己的用户名)\AppData\Local\Programs\Appium\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,accessibility,报错,android,id
From: https://blog.51cto.com/u_15846941/5797401

相关文章