Skip to main content

Spy mobile utility

The Mobile Object Spy utility allows you to capture available test objects of a mobile application. These captured objects are then applied directly in your mobile automation tests. Besides capturing, you can also modify the object properties directly with the utility, which helps save time and effort in managing test objects.

See the following table to learn about the device types you can use with Mobile Object Spy:

Device typeDescription
Local devicesWith local devices, you need to set up the development environment before testing.

- Android Emulator
- Android real device
- iOS Simulator
- iOS real device
Remote devices- Test mobile apps with your existing custom devices
- Install Kobiton plugin and access your Kobiton devices
Cloud devicesYou can test with Android and iOS mobile devices with no further setups. A Test Execution - Cloud Mobile Native App Testing subscription is required. For more details, see Test Execution - Cloud overview.

Capture objects with Mobile Object Spy​

Requirements

Capture Mobile objects of an application​

Follow the steps on how to capture Mobile objects of an application using Spy Mobile Utility:

  1. From the main Toolbar, click the Spy Mobile icon and select your device type, for instance, Android Devices.

    Record Mobile
  2. In the displayed Mobile Object Spy dialog, specify the following information at the Configurations section:

    Configuring device
    • Device Name: A mobile device where Katalon Studio launches the application. All of your connected devices should be displayed in this list
    • Start with: In the drop-down list, you can select either Application File or Application ID
      • Application File: Add your application (.apk file for Android, .ipa for iOS)
      • Application ID: Specify the application ID of your application, which is either the package name of an Android app or the bundle identifier of an iOS app
  3. Click Start to begin spying the application under test (AUT). Wait until the AUT is launched, you can see the application display in Device View and the objects in All Objects.

    • Device View is a simulator of the device's screen.

    • All Objects captures and organizes all the displayed mobile objects of Device View in a tree.

    Mobile Object Spy dialog
  4. When you click any object either in All Objects or in Device View, Katalon Studio highlights their counterpart for verification.

    To make sure the Device View displays the current screen of the AUT on the device, you can click the Capture Object button to reload Device View and refresh All Objects.

  5. Tick on any object checkbox in All Objects.

    Katalon Studio captures the selected objects and displays objects' properties in the Object Properties table.

    The most important property of an object is its locator strategy and value. The default locator is a unique value in detecting that object. If you prefer another locator strategy, choose among the provided options and generate a new locator. Then click Highlight to confirm your newly updated locator can detect the target object on its screen correctly.

    Object properties panel
  6. Click Add to Object Repository to save the object you want to use in your tests.

    Add object to repository
  7. In the displayed Add Element to Object Repository dialog, select where you want to save the objects, then click OK.

    Add Element to Object Repository dialog

    You can select one of these options to save:

    • Merge changes into existing objects: Add unique changes of the newly recorded object to the existing object, but still keep the existing object ID.
    • Create duplicate objects: Save the newly recorded object separately from the existing object.
    • Replace existing objects: The newly recorded object overrides the ID and attributes of the existing object.

    The captured objects will be added to Object Repository accordingly.

  8. You can continue with the current mobile screen or navigate to other interfaces as needed.

Use Mobile Object Spy with custom desired capabilities for remote Appium devices​

Katalon Studio now supports the use of custom desired capabilities with remote Appium type when using the Mobile Object Spy feature. This enhancement is especially useful when working with multiple remote device types.

Requirements

Capture objects using custom capabilities​

  1. From the main Toolbar, click the Mobile Object Spy icon and select Custom Capabilities.

    Select Custom Mobile Capability
  2. Select the custom capability.

  3. Click Start to launch the AUT and spy using the selected capabilities.

  4. Select, review, and save the mobile objects you have captured to your Object Repository.

Use Mobile Object Spy on cloud devices​

Use Mobile Object Spy on Cloud devices to inspect mobile objects without a local device setup, making it accessible to users with minimal coding experience.

Requirements

Upload a mobile app​

Follow this dedicated guide to upload your app to True Platform: Upload a mobile app to True Platform.

Spy objects with a Cloud device​

You can capture objects on a Cloud device. Follow these steps:

  1. From the main toolbar, click the Spy Mobile icon and select Katalon True Platform Devices.

    select spy with cloud device
  2. In the Test Execution Cloud Configurations section, do as follows:

    configure cloud device
    1. Device Name: Select the mobile operating system (OS), the version of the OS, and Studio will list out the available devices accordingly.

    You can also select Any Phone or Any Tablet to let the system choose a suitable device that meets your requirements.

    1. Show only high availability devices: This option, enabled by default, filters the list to show devices with high availability status. You can then choose a device for testing without delays.

      • When enabled: Only devices with high availability status are shown.
      • When disabled: All devices are shown.
    2. Application: Select the application file you want to test from your TestOps uploads.

  3. Click Start to launch the AUT.

  4. Follow from Step 3 of Capture objects with Mobile Object Spy to capture objects.

Known limitations​

  • Appium known limitation: You may get incorrect object highlighting when rotating the device to landscape view. For workaround, after rotating, you need to click on the Capture Object button to refresh the All Objects tree, then the highlighting will work normally.
  • Mobile Object Spy does not support capturing Android EditText message.
  • Depending on the cloud devices, the default timeout is in the range of 60-120 seconds.
Was this page helpful?