appium 1.10.0
findElementByName(By.name("名称"))
报错org.openqa.selenium.InvalidSelectorException:Locator Strategy 'name' is not supported for this session
修改/Applications/Appium.app/Contents/Resources/app/node_modules/appium-android-driver/build/lib下的
dirver.js文件:
只需要修改其中一行即可
this.locatorStrategies = ['xpath', 'id', 'class name', 'accessibility id', '-android uiautomator','name'];--------再此行代码中添加上name
保存重启appium即可。