Page 1 of 1

Script executing on wrong device intermittently

Posted: Wed Mar 27, 2013 4:46 pm
by mattmccall
I have created a test that has been executing on an iPad. I added a new device, an iPhone,and tried to run the tests on that device. I specifically told it to run on the iPhone:

Host.Local.RunMobileApp(iPhone, "<app name>");

It logged in ok but once it did it started executing on the iPad which happened to be logged in and on the same screen after login. I tried to reproduce it and it did not do that. Then a few minutes later it did. What is going on? Why would it start executing on the other device?

Like I said it does not happen all the time, but its enough to be annoying. If I have the other device turned off there isn't a problem, however if someone would be suing that to test I do not want to screw them up, or me for that matter.

Re: Script executing on wrong device intermittently

Posted: Thu Mar 28, 2013 4:49 pm
by Support Team
Hello,

Could you please try to add a device name to your root repository item?
Please take a look at our User Guide at Run Tests in parallel.

Regards,
Markus (T)

Re: Script executing on wrong device intermittently

Posted: Fri Mar 29, 2013 3:37 pm
by mattmccall
Markus,

I have my device name set up as a parameter already. I pass the device I want to use in my data sheet. It happens intermittently and for no reason it seems.

I use Host.Local.RunMobileApp("<device>", "<app name>"); to tell it what device I want, and if I have both logged in the script will login to the correct one, and then sometimes execute on the other.

Matt

Re: Script executing on wrong device intermittently

Posted: Tue Apr 02, 2013 2:16 pm
by Support Team
Hello,

You would need to add a device name in the RxPath of your rooted repository item in order to uniquely identify your repository items. This is needed if you want to have both devices connected.

Please take a look at the example below:

Code: Select all

mobilapp[@title='com.android.keepass' and @devicename=$varMobileDevice]
More info can be found in our User Guide.

Regards,
Markus (T)