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.
This operation is available only if you have a license for the TestComplete Mobile module.
The operation is an analogue of the
Mobile.SetCurrent() scripting method.
The operation cannot have child operations.
When you add the operation to your keyword test, TestComplete displays a wizard that contains the following pages:
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:
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).
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.
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.
Testing Mobile Applications
Preparing for Testing Android Applications
Preparing Applications, Devices, and Test Computers for iOS Testing
Device Loop Operation
Running Tests on Multiple Devices