Select Device Operation

Applies to TestComplete 15.20, last modified on January 19, 2022

Description

You can have multiple physical and virtual mobile devices connected to TestComplete at the same time. To indicate a specific device a keyword test should work with, use the Select Device operation. All subsequent test operations will be performed on this device, unless specified otherwise.

Requirements

This operation is available only if you have a license for the TestComplete Mobile module.

Scripting Analogue

The operation is an analogue of the Mobile.SetCurrent() scripting method.

Child Operations

The operation cannot have child operations.

Operation Parameters

When you add the operation to your keyword test, TestComplete displays a wizard that contains the following pages:

Select Device

On this page, you can choose which of the connected devices the operation will use.

Typically, you select a device by choosing its name in the list.

If you want to specify a device via parameters, select Parameterized Device and click Next. You will be able to specify the name of the device and its index on the next page of the wizard.

Specify Device Parameters

This page is shown if you selected Parameterized Device on the “Select Device” page of the wizard. It contains the following parameters:

Name

Required. The device name. It is specified by the device’s DeviceName property in the Object Browser.

  • For iOS devices - the device name specified in Settings | General | About | Name.

  • For physical Android devices and virtual machines running Android-x86 – this is the device model specified in Settings | About phone (or About tablet) | Model number.

  • For Android emulators – the string in the format emulator-port, where port is emulator’s console port (5554 by default).

Index

The zero-based index of the device among all connected devices with the same name.

Modifying Parameters

After adding the operation to the test, you can modify the operation’s parameters via the same wizard as you used to add the operation. To invoke the wizard, simply double-click the operation’s row in the Keyword Test editor.

Remarks

For information on testing mobile applications with TestComplete, see the topics of the Testing Mobile Applications section.

To perform the same test on multiple mobile devices, you can use the Device Loop keyword operation. This operation is analogous to Select Device operation, but oriented to multi-device tests: in this operation you define a list of devices where the test actions will be performed.

See Also

Mobile Category
Testing Mobile Applications
Preparing for Testing Android Applications (Legacy)
Preparing Applications, Devices, and Test Computers for iOS Testing (Legacy)
Device Loop Operation
Running Tests on Multiple Devices (Legacy)

Highlight search results