Use the select device command

Selects a device according to device attributes instead of a specific device ID.

When running a script, instead of checking each time whether the device under test (DUT) is available, use the Select device command to broaden the range of potential device options. When you select single or multiple attributes (such as Model, OS Version), the device or devices that meet those attributes will be selected.

Click here for more information on scheduling script executions.

Select whether the device works with or without a data table:

  • For installing a new application on a group of devices or for testing on a group of devices, use a data table.
  • If you only need one device that meets specific attributes, a data table is not required.

Select a device without a data table

  1. In the Select Device command, check the Result Variable parameter.
  2. Choose the specific attributes that will be used to select the device. The following example uses the OS parameter. The OS parameter is defined as a variable (platform), which is defined as Android or iOS. One device will be selected that will have either the Android or iOS operating system.

Select a device with a data table

  1. Create a data table with only one column that is defined as the handset type. Do not add any devices. (Devices already in the data table will be ignored.)

  2. Go to Variables and create a new variable with type = Data table. In the value field, add the data table you created.

  3. Add the Select Device command to the script outside of the loop. Check Show Advanced Parameters, check the Result data table parameter and under Value select the data table you created.

  4. Define the Loop. On the Parameters tab, select the name and column of the data table you created.

  5. In all subsequent commands used inside the loop, the Device ID parameter must be defined. Define the Device ID as follows: Type = handset, Usage = Data table, Value = name of data table and column name.