Appium Xpath控件定位不稳定
-
Appium Xpath控件定位不稳定
同样一条Xpath定位代码,有的时候运行会成功,有的时候会抛出异常显示“An element could not be located on the page using the given search parameters”
例如:driver.findElementByXPath("//android.widget.TextView[contains(@text,'全部分类')]").click();
网上说Xpath定位遍历整个树有时会出现错找不到,不知道是不是这个原因?如果是,怎么解决?需要升级Appium嘛?