Validating text elements (Android)

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

Validating text elements (Android)

Post by Mozzytm » Mon Feb 11, 2013 11:43 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Validating text elements (Android)

Post by Support Team » Mon Feb 11, 2013 12:30 pm

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

Mozzytm
Posts: 36
Joined: Fri Feb 08, 2013 11:18 am

Re: Validating text elements (Android)

Post by Mozzytm » Mon Feb 11, 2013 12:33 pm

im still feeling my way around on the evaluation version, how do i obtain a snapshot?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Validating text elements (Android)

Post by Support Team » Mon Feb 11, 2013 12:37 pm

Please take a look to following documentation
http://www.ranorex.com/support/user-gui ... files.html

Regards,
Peter
Ranorex Team

Mozzytm
Posts: 36
Joined: Fri Feb 08, 2013 11:18 am

Re: Validating text elements (Android)

Post by Mozzytm » Mon Feb 11, 2013 2:25 pm

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

Mozzytm
Posts: 36
Joined: Fri Feb 08, 2013 11:18 am

Re: Validating text elements (Android)

Post by Mozzytm » Mon Feb 11, 2013 3:02 pm

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)

Mozzytm
Posts: 36
Joined: Fri Feb 08, 2013 11:18 am

Re: Validating text elements (Android)

Post by Mozzytm » Mon Feb 11, 2013 4:16 pm

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 :)