Page 1 of 1

Validating text elements (Android)

Posted: Mon Feb 11, 2013 11:43 am
by Mozzytm
Hi,

Im facing another problem when using validation and touch actions wondered if there were any suggestions. During my script it searches for a text element with the label "Search Limit". On device one (which was the record device) this action functions no problem. However when i play the script through on device 2 it cannot find this element even though i can see it on screen. Is there something i'm missing or any tips/tricks anyone can suggest?

thanks

M

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 12:30 pm
by Support Team
Hi,
Mozzytm wrote:Is there something i'm missing or any tips/tricks anyone can suggest?
Maybe there is an additional container which is available on the first device but not on the second. Would it be possible to send us two Ranorex Snapshots, one of each device? Then we could provide you a RxPath which works for both devices. We also faced such problems during our test-phase, where on different devices more or less container (elements) were shown. In most case this is because of the backwards compatibility for older android devices.

Regards,
Peter
Ranorex Team

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 12:33 pm
by Mozzytm
im still feeling my way around on the evaluation version, how do i obtain a snapshot?

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 12:37 pm
by Support Team
Please take a look to following documentation
http://www.ranorex.com/support/user-gui ... files.html

Regards,
Peter
Ranorex Team

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 2:25 pm
by Mozzytm
Thanks for your response, it does seem as if its a container issue. I was not aware containers were handled the way they are untill i ran that last comment past our developer :oops: now im faced with writing a generic test where things in A aren't in the same place on B. ive noticed you can change the container to -1 and im having some success with that

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 3:02 pm
by Mozzytm
More on this.

If the element on device 1 is

container[4]/container/container[1]/text[@caption='sometext']

is there any way on device 2 i can get it to look at

container[6]/container/container[1]/text[@caption='sometext'] (this device has a better screen res)

Re: Validating text elements (Android)

Posted: Mon Feb 11, 2013 4:16 pm
by Mozzytm
once again I think i've answered my own question, i've used a data table and added devices in column 1 with an adjustment number in column 2 to select different elements depending on device (as some will list more containers than others). in future ill have a good read of the docs first :)