这个错误通常发生在使用 Appium 进行 UI 自动化测试时,使用了错误的定位策略。要解决这个问题,你需要使用正确的定位策略。在 Appium 中,你可以使用以下的定位策略:
如果你遇到了“Unsupported locator strategy: accessibility id”的错误,那么很可能是因为你的定位策略错误。请确认你是使用了正确的定位策略,如下所示:
driver.findElement(MobileBy.AccessibilityId("accessibilityId"));
或者:
driver.findElementByAccessibilityId("accessibilityId");
上一篇:Appium:无法使用appium自动化Google Home应用程序
下一篇:Appium:在Android Chrome浏览器中按ID和名称无法找到元素,出现“InvalidArgumentException”错误。