InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session
appium desk 1.13
运行时候报错
InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session
修改
npm安装版本appium命令行
C:UsersusernameAppDataRoamingnpmnode_modulesappiumnode_modulesappium-android-driverbuildlib
appium-desktop版本
C:Program FilesAppiumresourcesappnode_modulesappiumnode_modulesappium-android-driverbuildlib
修改文件:driver.js
只需要修改其中一行即可
this.locatorStrategies = ['xpath', 'id', 'class name', 'accessibility id', '-android uiautomator','name'];--------再此行代码中添加上name
修改完成之后,保存文件,再次重启appium服务,就可以继续使用ByName定位
最后
以上就是甜蜜裙子最近收集整理的关于appium新版本不支持name的全部内容,更多相关appium新版本不支持name内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复