Android device release

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

Android device release

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

Another "quick" question

When i have a script running on device A and i want to test the same run on device B. sometimes it does not find an element. When this happens i open the app on device A to look for anomalies (colours, spacing capitalisation etc). In some instances when i open device A the script picks up and tries to continue on A rather than B. How can i ENSURE that device A is completely released and B has the scripts sole attention?

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

Re: Android device release

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

Hi,
Mozzytm wrote:When i have a script running on device A and i want to test the same run on device B. sometimes it does not find an element. When this happens i open the app on device A to look for anomalies (colours, spacing capitalisation etc). In some instances when i open device A the script picks up and tries to continue on A rather than B. How can i ENSURE that device A is completely released and B has the scripts sole attention?
The documenation "Run your test on any Android device" should teach you how to use your test on more devices. If you don't specify the device name during your test and on both devices the same app is running, Ranorex takes the first element which will be found to continue the automation. Therefore you have to specify the device name and Ranorex should do the job only on this device.

Regards,
Peter
Ranorex Team
.
Image

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

Re: Android device release

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

The device is specified in step one of the script (it was taken from the recording device). when running through I am selecting my alternate devices by using the drop down on line 1. I've had limited success by running a close action manually which seems to stop this from happening 9 times out of 10 but on that odd occasion i still have to follow up a false positive failure. Again, im sure its something im doing wrong as ive only had my hands on this tool for a couple of days

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

Re: Android device release

Post by Support Team » Mon Feb 11, 2013 2:05 pm

Mozzytm wrote:The device is specified in step one of the script (it was taken from the recording device).
Step one is most likely a "Run Mobile App" record item. This item does not link the test module to that specific device. It only starts the application on that device. The ranorex path search will search all connected devices for a match, thus if the same app is open on another connected device the path could match there first.

To limit the search to a single device you have to specify the device in the RxPath.

Examples:
Search on any connected device:
/mobileapp[@title='com.android.keepass']
Search on specific device:
/mobileapp[title='com.android.keepass' and @devicename='Nexus S']
Search with device as variable:
/mobileapp[title='com.android.keepass' and @devicename=$devicename]

Regards,
Florian
Ranorex Team
.
Image

jackclarck
Posts: 1
Joined: Wed Mar 06, 2013 10:59 am

Re: Android device release

Post by jackclarck » Mon Mar 11, 2013 6:48 am

What is the difference between Device A and Device B? I can not understand you what does it mean by that 'Device A has been completely released'. Can you please little more elaborate, it will be good for me to answer you in functional way.
Mozzytm wrote:Another "quick" question

When i have a script running on device A and i want to test the same run on device B. sometimes it does not find an element. When this happens i open the app on device A to look for anomalies (colours, spacing capitalisation etc). In some instances when i open device A the script picks up and tries to continue on A rather than B. How can i ENSURE that device A is completely released and B has the scripts sole attention?