pinky
February 1, 2019, 7:41pm
1
Iam trying to get the list of the all the webelements whose text starts with MOBILE DEPOSIT.I tried with xpath,class,id,accessibility-id. none of them worked.
Interestingly i noticed that i wasnt even able to locate any of the element on the screen.
can some one please help me with this.
Aleksei
February 1, 2019, 10:32pm
2
@pinky try with:
List<MobileElement> elements1 = driver.findElements(MobileBy.id("transaction_details"));
List<MobileElement> elements2 = driver.findElements(MobileBy.AndroidUIAutomator( "new UiSelector().textContains(\"MOBILE DEPOSIT\")"));
System.out.println("elements1 size: " + elements1.size());
System.out.println("elements2 size: " + elements2.size());
pinky
February 2, 2019, 4:31am
3
[quote=“Aleksei, post:2, topic:25083”]
MobileBy.AndroidUIAutomator( “new UiSelector().textContains(“MOBILE DEPOSIT”)”)
Tried that…size of both the lists are zero.
elements1 size :0
elements2 size :0
Try creating Xpath with ClassName and contains text to get the list of elements.
@pinky when you reach programmatically in code this screen try add wait 3-5sec and then get page source with:
System.out.println(driver.getPageSource());
check that you are are able to see your elements with needed text.
pinky
February 2, 2019, 3:26pm
7
Tried that too…but list size is zero.
pinky
February 2, 2019, 3:27pm
8
I added wait and got the pagesource
i am not seeing any of the elements displayed on the screen in the page source.
What you see? Can you share it at gist.com ?
Aleksei
February 2, 2019, 7:22pm
11
We can see signOff dialog here. You do no see it on screen?
pinky
February 2, 2019, 8:07pm
12
Whenever there is no activity on the page for few mins, signoff popup appears. As i gave long wait and none of the activity happened on the screen, signoff popup appeared…its not part of the screen shown above…