Open device command

Allocates one or more devices to the current script execution and prepares them for usage. Allocated devices are available to the execution without interruption until either the Close device function is used or the script ends.

This command allows you to run automation scripts without having to manually open the devices in the Perfecto UI. Furthermore, it allows automation scripts to be managed by an execution center, such as QC.

This setting is essential to disable device video in tests, in addition to setting the Video recording parameter value to norecord (False).

For best practice, use the automatic device allocation when running the script on a single device, or if the required devices should be available with no waiting time. Use the manual device allocation when running a script with a lenient timeframe, or if multiple devices are required and the testing requires each device for an extended time. The Open device and Close device functions enable users to open required devices, and release those that are not in use making them available for other users.

All allocated devices will close once the script execution is completed, unless they are open in the IDE.

To guarantee no interruption, allocated devices must be reserved.

Opened devices are automatically in their default state orientation and home screen.

Parameters

Name Type Possible values Description

Device ID*

Device

 

The device for this command. By default, this is the device under test (DUT).

Run script

String

True | False

Specify whether to run the open script or not, where:

  • True runs the open script.

  • False does not run the open script.

Allocation policy

String

Wait | No wait

The behavior if the requested device is unavailable, where:

  • Wait pus the script in 'Pending' until all requested devices become available.

  • No wait causes the script to fail if one of the requested devices is not available.

Timeout

Number

 

The waiting time, in minutes, for the device to be available. This parameter is only relevant when using Wait as the allocation policy.

Video recording

String

True | False

The video recording for the selected device. Available when the device is closed, where:

  • True enables video recording

  • False disables video recording

Audio recording

String

True | False

The audio recording for the selected device. Available once the device is closed, where:

  • True enables audio recording

  • False disables audio recording

Applicable only to iOS fast video devices.

Allocation mode

String

Add | Replace

The allocation mode for the selected device. A device can be allocated as an addition to other open devices, or allocated as a single device closing any open devices being used in the script.

  • Add keeps previously allocated devices allocated

  • Replace releases previously allocated devices

Comment

String

 

Adds a comment to the script

On-fail Result*

Condition

Ignore | Break | Continue | Abort | Catch

The behavior when the command fails.

* Mandatory parameter