How to use UiSelector with Appium in java


#21

Use xpath. I had a similar issue and that was the only way I resolved it. First I used UIAutomator as you did to find where it exists. Then I used xpath. Example:
var elements = driver.FindElements(By.XPath("//android.view.View[@content-desc=‘Enroll your xxxx token Link’]"));
elements[0].Click();

Hope this helps


#22

#23

How can I get the resource-id of all MobileElements, its shown in the inspector, but cant fetch from my Java application. I’m able to fetch the dynamic id’s but that wont serve my purpose, I need resource-id. I’m using uiautomator2. Please help me.