执行代码、:

public AndroidDriver<AndroidElement> appiumDriver;

appiumDriver.findElement(By.name("我的")).click();

报错如下:

appium解决无法通过name属性识别元素org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session

 

去到appium安装目录下,找到appium\node_modules\appium-android-driver\build\lib\driver.js,用this.locatorStrategies搜索,加上name,然后重启启动appium。就生效了。重新运行重新就不报这个错了。

 

appium解决无法通过name属性识别元素org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session

 

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2021-12-30
  • 2022-01-20
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-21
  • 2022-12-23
  • 2021-10-20
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案