Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Aug 08, 2017 09:42

By Allana Miller

Selects a device(s) according to device attributes, instead of a specific device ID.

When running a script, instead of checking each time whether the DUT is available, use the Select device command to broaden the range of potential device options. Choose single or multiple attributes (e.g. Model, OS Version) and the device(s) that meet those attributes will be selected.

** Click here for more information on scheduling script executions

Select 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 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 example below 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 which will have either the Android or iOS operating system.

      Using the Select Device command without a data table.

How to use Select device with a data table:

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

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

Create a data table and add it to the script variables.

Step 2: 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.

Insert the Select Device command and add parameters.

Step 3: Define the Loop
In the Parameters tab, select the name and column of the data table you created.

Define the loop

Step 4: 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.

Define all functions in the loop.