Unable to click on an element by using xpaht
on Android 8.1.0/7.1.0
, but the same xpath
working perfectly on Android 10
element like
By postBtn = By.xpath("//android.widget.TextView[@text='Post']");
driver.findElement(postBtn).click();
Appium v1.15.1
java version 1.8.0_241
selenium-java: 3.141.59
java-client: 6.1.0
Project type: Maven project
This one should work:
driver.findElement(By.xpath("//android.widget.TextView[contains(@text, 'Post')]")).click();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.