text matching

Mobile Testing, Android App Testing.
Mozzytm
Posts: 36
Joined: Fri Feb 08, 2013 11:18 am

text matching

Post by Mozzytm » Mon Feb 18, 2013 5:09 pm

Hi there,

Is there any way to get the automation to just look for text on screen. by which I mean look for text that equals "MYTEXT" anywhere on screen rather than look in approot/container[1]/container[2]/container......./text="MYTEXT"

I suppose in a nutshell, a non-repository based comparison
Thanks

M

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: text matching

Post by Support Team » Tue Feb 19, 2013 5:11 pm

Hi,

If I got this correctly you could use a RxPath similar to this one: "YourRootElement//*[@text='MYTEXT']"".
This will find all elements with a text property set to the specific text in your application.
For more information about the RxPath please take a look at the following links:
RanoreXPath, RanoreXPath – Tips and Tricks.

Regards,
Markus
.
Image