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:
|
Allocation policy |
String |
Wait | No wait |
The behavior if the requested device is unavailable, where:
|
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:
|
Audio recording |
String |
True | False |
The audio recording for the selected device. Available once the device is closed, where:
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.
|
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