Connect to Device Dialog

Applies to TestComplete 15.85, last modified on October 22, 2026

Use the Connect to Device dialog to connect to a mobile device running in the BitBar device cloud or managed by a private Appium server.

Connect to Device dialog

Click the image to enlarge it.

To call the dialog

In the Object Browser of TestComplete, right-click the Mobile item in the object tree and then click Connect to Device:

Opening the Connect to Device dialog from the Object Browser

Click the image to enlarge it.

Requirements

  • An active license for TestComplete Mobile Module.

  • The Appium Support plugin must be enabled in TestComplete. You can check the plugin state in the File > Install Extensions dialog in TestComplete. You can find the plugin in the Mobile group.

  • Access to the server that manages your mobile devices. It can be one of the following:

    • A mobile device cloud provided as a service by BitBar.

      If you do not have a BitBar account, you can sign up for a free trial on the BitBar website:

      bitbar.com/signup

      To access the cloud from TestComplete tests, use the API key assigned to your BitBar account. See the Prerequisites section.

    – or –

    • A private server managed by the Appium framework. It can run on your current computer or on a remote computer in your local network. The supported Appium version is 1.18.2.

      To learn how to install and configure one, please see Set up Appium Server.

      Note: Selenium, Selendroid, and other frameworks are not supported.

      For iOS testing: the XCUITest driver must be installed on your Appium server. See Intro to Appium Drivers.

      For Android testing: the UIAutomator2 driver must be installed on your Appium server. See How to Install the UiAutomator2 Driver.

      Note: Other automation drivers for iOS and Android are not supported.

Enter BitBar API Key

If you use BitBar and there is no BitBar API key specified in the current TestComplete project, enter the API key you will use to run tests and click Apply.

Learn how to get the API Key

If you use a private mobile cloud, click Local Appium.

Connect to device

BitBar

  1. Select the mobile device and a tested application for which you want to open a testing session:

    • If the selected device is not available, TestComplete will not be able to connect to it. To command TestComplete to search for a replacement device, select the Connect to another device when the selected one is not available check box. On the Device Cloud > Mobile page of your project, you can set the search criteria for the replacement devices.

    • In the Application drop-down list box, select a mobile application for which you want to open a testing session. The application file must be either stored in the BitBar Files Library or added to the Tested Applications of the current TestComplete project. In the latter case, click Upload to BitBar to upload the application file to the BitBar Files Library and then select it in the list.

      For iOS only: To be able to launch and stop the tested application from tests or by using the Mobile Device Screen window of TestComplete, specify the bundle ID of the application when connecting to the device. It is the bundle ID that was used to compile the specified .ipa file. Add the bundleId capability to the list of desired capabilities on the View more BitBar parameters > Custom Parameters tab.

  2. To get more advanced options, click View more BitBar parameters:

    • On the Parameters tab, you can filter the device list by the device type, the version of the operating system running on the devices, their screen resolution, and their location.

    • By default, when a device is disconnected, the testing session on it is closed, and the device is restored to its initial state. Until the device is restored, it will remain unavailable. To keep the session alive to be able to reconnect to it, select the Keep the device available for quick reconnection check box. The session will be available for reconnection for up to 60 seconds.

    • If needed, on the Custom parameters tab, you can specify additional capabilities to be used for the testing session. Specify the capabilities in the JSON format. For example:

      JSON

      {
        "bitbar_project": "Automated tests",
        "bitbar_description": "Testing the Orders app"
      }

      The JSON code will be validated as you are typing it.

      Note: The capabilities you specify on the Custom capabilities tab can overwrite values specified on the Parameters tab.

      For the list of available capabilities, see the BitBar Documentation - Desired Capabilities.

To open the testing session and connect to it, click OK. To close the dialog without connecting any device, click Cancel.

Local Appium

Note: You must have your local Appium server running and available from your TestComplete workstation. For information on how to configure a local Appium server, see Set up Appium Server.

Improve device screen performance (optional)

By default, TestComplete shows the device screen in the Mobile Screen window by requesting screenshots from the Appium server. This can make the screen refresh slowly. To get a smoother screen, you can have TestComplete get the screen from the Appium MJPEG stream server instead.

To turn on MJPEG streaming, do the following:

  1. In the Parameters editor, add the appium:mjpegServerPort capability and set it to a free port on the Appium server computer. For example:

    {

      "platformName": "Android",

      "deviceName": "Pixel API 24",

      "appium:automationName": "UIAutomator2",

      "appium:mjpegServerPort": "7810"

    }

  2. Click OK.

TestComplete connects to the device and shows the MJPEG stream in the Mobile Screen window. This applies to live interaction, test recording, and test playback in TestComplete, and to test runs in TestExecute.

To go back to screenshot mode, remove the appium:mjpegServerPort capability from the connection parameters.

Note:
  • Port 7810 is the port Appium Inspector uses. Ports 9100 and 9110 are also common. TestComplete does not choose a port for you. Make sure no other program uses the port you specify.

  • Appium scales down the stream, by default to half the original width. TestComplete adjusts click coordinates automatically, so clicks in the Mobile Screen window reach the correct position on the device.

  • During test recording, the screen still refreshes more slowly. TestComplete reads the object tree in real time while recording, so this is expected behavior.

  • TestComplete saves the appium:mjpegServerPort capability in the device capabilities of recorded tests. If the capabilities of a test do not match the capabilities of the current connection, TestComplete opens a new device session when the test runs. To avoid this, use the same capabilities in both places.

  • Some Appium driver versions use a different scale factor for the stream or have problems with screen rotation. If the screen does not display correctly or clicks reach the wrong position, remove the capability to go back to screenshot mode.

To open the testing session and connect to it, click OK. To close the dialog without connecting any device, click Cancel.

TestComplete will connect to the specified device and open a testing session there. The application running in the mobile device cloud will become available. You can explore it in the Object Browser and write code that will simulate user actions over it.

See Also

About Mobile Tests
Connecting to Mobile Devices and Opening Testing Sessions

Highlight search results