How to use UiSelector with Appium in java


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’]"));

Hope this helps



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.