Hey all!
I have a problem while testing the application. the application asks for phone contacts, I allow and I have a list of contacts, and then I want to select any contact but nothing is clicked on this page, I tried by any means and it doesn’t work. I ask for help and thanks earlier
Exampel i used –
WebElement name =driver.findElement(By.xpath("//com.ideomobile.discount:id/contactName[@text=‘Automation’ and @index=‘1’]"));
name .click();
or By.xpath("//com.ideomobile.discount:id/contactName[@text=‘Automation’])
List<MobileElement> elements = driver.findElements(MobileBy.AndroidUIAutomator("new UiSelector().text(\"Automation\")");
System.out.println(elements.size());
// second way
elements = driver.findElements(MobileBy.AndroidUIAutomator("new UiSelector().resourceIdMatches(\".*contactName\").text(\"Automation\")");
System.out.println(elements.size());