Skip to main content

SeeTestAutomation- SetDevice

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

SetDevice (Title)

Description

Set the active device under test

Parameters

  • Title: Insert device name
    • For Android: Prefix 'adb:' is required ('adb:MyAndroidDevice')
    • For iOS: Prefix 'ios_app:' is required ('ios_app:MyIOSDevice')

Code Examples

In the following example, we will launch application Experibank on an Android device, then switch to an iOS device and launch the same application.

C# Example Expand source

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

VBScript Example Expand source

client.SetDevice "adb:Nexus5"
Report
client.Launch "com.experitest.ExperiBank/.LoginActivity", true, true
Report
client.Sleep 1000
Report
client.SetDevice "ios_app:iPhone6"
Report
client.Launch "com.experitest.ExperiBank", true, true
Report
client.Sleep 1000
Report

Python Example Expand source

self.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)

Perl Example Expand source

$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);