SetDevice (Title)
|
|
|
|
|
Set the active device under test
Title: Insert device name
For Android: Prefix 'adb:' is required ('adb:MyAndroidDevice')
For iOS: Prefix 'ios_app:' is required ('ios_app:MyIOSDevice')
For Windows Phone: Prefix 'wp:' is required ('wp:MyWindowsPhoneDevice')
In the following example, we will launch application Experibank on an Android device, then switch to an iOS device and launch the same application, and finally repeat these actions on a Windows Phone device:
client.setDevice("adb:Nexus5");client.launch("com.experitest.ExperiBank/.LoginActivity", true, true);client.sleep(1000);client.setDevice("ios_app:iPhone6");client.launch("com.experitest.ExperiBank", true, true);client.sleep(1000);client.setDevice("wp:LumiaPhone");client.launch("EriBank", true, true);client.SetDevice("adb:Nexus5");client.Launch("com.experitest.ExperiBank/.LoginActivity", true, true);client.Sleep(1000);client.SetDevice("ios_app:iPhone6");client.Launch("com.experitest.ExperiBank", true, true);client.Sleep(1000);client.SetDevice("wp:LumiaPhone");client.Launch("EriBank", true, true);client.SetDevice "adb:Nexus5"Reportclient.Launch "com.experitest.ExperiBank/.LoginActivity", true, trueReportclient.Sleep 1000Reportclient.SetDevice "ios_app:iPhone6"Reportclient.Launch "com.experitest.ExperiBank", true, trueReportclient.Sleep 1000Reportclient.SetDevice "wp:LumiaPhone"Reportclient.Launch "EriBank", true, trueReportself.client.setDevice("adb:Nexus5")self.client.launch("com.experitest.ExperiBank/.LoginActivity", True, True)self.client.sleep(1000)self.client.setDevice("ios_app:iPhone6")self.client.launch("com.experitest.ExperiBank", True, True)self.client.sleep(1000)self.client.setDevice("wp:LumiaPhone")self.client.launch("EriBank", True, True)$client->setDevice("adb:Nexus5");$client->launch("com.experitest.ExperiBank/.LoginActivity", 1, 1);$client->sleep(1000);$client->setDevice("ios_app:iPhone6");$client->launch("com.experitest.ExperiBank", 1, 1);$client->client.sleep(1000);$client->setDevice("wp:LumiaPhone");$client->launch("EriBank", 1, 1);