Working With Mobile Screen Window

Applies to TestComplete 12.60, last modified on September 17, 2018

This topic outlines some testing tasks that you can do using the Mobile Screen.

Viewing Device Screen

Choosing the Device

If your computer is connected to several mobile devices, emulators or virtual machines, you can select the device or machine screen to be displayed in the Mobile Screen. To do that:

  • Select the desired device name from the window toolbar:

    Selecting a Mobile Device to be Displayed

This list is automatically updated when you connect or disconnect devices.

Zooming the View

To change the zoom level:

  • Click the Zoom toolbar item and use the track bar to set the desired zoom level.

    You can click Best Size to fit the device screen picture into the maximal size of the Mobile Screen.

-- or --

  • Resize the Mobile Screen. TestComplete will change the zoom appropriately.

Recording

To start recording a test for your Android or iOS application, select either Test | Record | Record Keyword Test or Test | Record | Record Script from the TestComplete main menu, or use the appropriate toolbar buttons (see Recording in TestComplete).

From the Mobile Screen, you can start recording only gestures (multi-touch events). This type of recording is supported for Android applications. See below.

Gestures (Multi-Touch Events)

Recording a Multi-Touch Event (Gesture) (For Android Only)

Using TestComplete, you can also record and play back multi-touch gestures.

You can record gestures only on physical devices. For more information, see Recording Gestures (Multi-Touch Events).

To record a gesture:

  • Click Record Gesture on the Mobile Screen’s toolbar. This will open the Add Gesture dialog.

  • Enter the gesture name and select a collection to save it to.

  • Perform a gesture on your physical device.

  • Press the Stop Recording button in the Add Gesture dialog.

TestComplete will add the recorded gesture to the Android Gesture collection of your test project.

Checking How a Gesture Works (For Android Only)

To check how the recorded gesture works:

  • Click Select Gesture on the Mobile Screen’s toolbar.

  • Select the gesture in the Select Gesture to Run dialog and click Run.

TestComplete will perform the gesture on the connected Android device.

Other Test-Related Tasks

Updating Image Repository Data

To add a new image to the Image Repository collection:

  • Click the Add Image toolbar item.

  • TestComplete will open the Add Image to Image Repository wizard.

  • On the Select the region from the picture page of the wizard, select the needed region.

  • On the further pages of the wizard, specify the name for the new item and select the image set to which it will be added.

  • Click Finish to add the image to Image Repository.

Taking Device Screenshots

Click Take Screenshot on the Mobile Screen’s toolbar and specify the file name and location where the image file will be created.

Note: You can send the captured screenshots to your colleagues to demonstrate an issue, or use them for some other purposes. However, you cannot use them in your image-based tests, as TestComplete captures these images with lossy compression. For information on capturing images for image-based tests, see above.

Launching Tested Applications

To launch a tested Android application or tested iOS application added to your current test project’s Tested Applications collection, click the Run Apps toolbar item and choose the desired application from the drop-down list.

Note: If the application’s Deploy to the device on start parameter is enabled, TestComplete first installs the application on the device and then launches it.

Installing the Android Agent (For Android Only)

TestComplete Android Agent is a helper utility that facilitates data exchange between TestComplete and the mobile device. To install the Agent on the connected device, click the Install Android Agent toolbar item. The Agent will be deployed and launched on the device.

Emulating Physical Device Buttons (For Android Only)

To emulate pressing physical buttons of the device, use the buttons shown at the Mobile Screen’s footer: Back, Home, Settings (Recents), Volume Down, Volume Up and On/Off.

To learn how to emulate other types of physical buttons, see Simulating Physical Button Events.

Rotating Mobile Screen Image (For Android Only)

You can rotate the image in the Mobile Screen by using the Rotate Left and Rotate Right buttons. This is useful if the image is in a wrong orientation (this may see this with some Android devices).

See Also

Testing Mobile Applications
Image-Based Testing
Preparing for Testing Android Applications
Preparing Applications, Devices, and Test Computers for iOS Testing
Connecting TestComplete to Android Devices

Highlight search results