appium 使用name 定位報錯 Locator Strategy 'name' is not supported for this session


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,再執行后,問題解決

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM