0

How to select all text in case of Android Application ? is there anything webdriver provides to select all ? I am not getting element for select all . is there any option to do it with webdriver

Community
  • 1
  • 1
  • Possible duplicate of [How to implement "select all" check box in HTML?](https://stackoverflow.com/questions/386281/how-to-implement-select-all-check-box-in-html) – Agilanbu Jan 31 '19 at 06:59

1 Answers1

1

I think you can take all visible texts on current screen by below code, then you can iterate with each and perform your select or whatever action you would want to perform.

List<MobileElement> listoftext= driver.findElements(By.xpath("//android.widget.TextView[//*]"));
System.out.println(listoftext.size());

for(int i=0;i<listoftext.size();i++) {
    System.out.println(listoftext.get(i));
}
Jagadeesh
  • 358
  • 5
  • 17