Skip to main content

Mobile Recorder utility

The Mobile Recorder utility in Katalon Studio allows you to create automated test cases for mobile applications. You perform actions on the application under test (AUT) as a user, and the recorder captures these actions to generate test cases.

Device types

Katalon Studio provides three recording options for mobile test automation. Each option has distinct advantages, disadvantages, and prerequisites.

Device typesProsConsPrerequisites
Local devicesDirect control, no subscription needed.Complex mobile device setup process with occasional bugs.For Android:
Remote devicesAccess to a wide range of real devices for thorough testing, useful for cross-platform compatibility.Requirements of remote servers and management of network connections, potential latency issuesSee:
TestCloud devicesAccess to multiple devices and configurations, no hardware needed, simple setup for users with minimal to no coding experience.Slower interaction and execution times compared to local devices.Subscription to TestCloud Mobile Native App testing. See TestCloud overview.

Record a mobile application

This section shows you how to create a test case with the Record Mobile function, from starting a session to configuring specific test actions on your chosen mobile device.

Follow these steps to configure and execute your recording session effectively:
  1. Click the Record Mobile icon on the main toolbar, and select your device type.

  2. In the displayed Mobile Recorder dialog, specify the device information in the Configurations section.
    • Device Name: A mobile device where Katalon launches the application. All of your connected devices should be displayed in this list.
    • Start with: In the drop-down list, select either Application File or Application ID.
      • Application File: Browse your tested application (.apk file for Android; .ipa file for iOS).
      • Application ID: Specify the application ID of your tested application, which is either the package name of an Android app or the bundle identifier of an iOS app.
    For example, here we use the Android emulator for configuration setup.
  3. Click Start on the action bar to begin recording.

    After starting the application, you can see the application display in Device View and the objects in All Objects:

    • Device View is a simulator of the device screen. You can interact with the AUT in this view.
    • All Objects captures and organizes all the displayed mobile objects of Device View in a tree.
    To make sure the Device View displays the current screen of the AUT on the device, click the Capture Object button on the action bar to reload Device View and refresh All Objects.
  4. Perform actions on the AUT:
    1. Select any object either in the tree of All Objects or in Device View. Katalon highlights their counterpart accordingly for verification.
    2. Choose a button in Available Actions to perform an action on the selected object.

      To learn about available actions and UI elements, see Available Actions and Validate UI elements.

    3. Repeat these two steps until all the actions you need to perform are completed.
  5. Review the recorded actions.

    The Recorded Actions table shows all of the recorded actions and related input/output that you have performed on the AUT. These items later become test steps of your test case.

    recorded actions

    You can manually add new actions using keywords by clicking on Add, delete unwanted actions by clicking on Remove, or rearrange recorded actions by click on Move Up or Move Down.

  6. Review properties of captured objects.

    Captured Objects displays all interacted objects during the recording session. For each object captured, you can find its detailed properties shown in the Object Properties table by clicking on it.

    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 option and generate a new locator. Then click Highlight to confirm your newly updated locator can detect the target object correctly.

    Verify new locators in captured objects section

    For information about locator strategies, see Locator strategies for Mobile objects.

  7. When you finish a recording session, click Stop, then click Save Script.
    The Add Element to Object Repository dialog pops up asking you where to store recently captured objects. You can decide whether to merge, create duplicates or replace the existing objects:
    Add Element to Object Repository dialog
    • 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.
  8. After clicking OK, there are 3 options to export the recorded actions to a test case:

    export options

    • Export to new test case: Creates a new test case with the recorded actions.

    • Append to test case: Adds the recorded actions to the end of an existing test case.

    • Overwrite test case: Replaces the existing actions in a test case with the recorded actions.

    After choosing your Export Option, click OK.

You have successfully set up and used the Mobile Recorder utility in Katalon Studio to create a mobile test case.

Use Mobile Recorder on TestCloud devices

From Katalon Studio version 9.5.0 onwards, you can use TestCloud mobile devices for recording and playback. This feature removes the need for complex local setups and makes it easier for users with minimal coding experience to conduct mobile testing.

You just need to upload your application file to TestOps and directly record objects on a TestCloud device.

Here's a demo video of using mobile recorder on TestCloud devices:

Requirements

Upload a mobile app to TestOps

TestCloud allows you to perform automated tests on mobile native applications. You can upload a mobile application and local Katalon Studio tests to TestOps, then use TestCloud to orchestrate test executions without having to set up local emulators or simulators.

Follow these steps to upload a mobile application to TestOps.

  1. Sign in to Katalon TestOps and go to your project.
  2. Go to Test Execution > Application Repository.
  3. In the Application Repository page, click Upload Application.
    Application Repository list in Katalon TestOps
  4. In the Upload Application dialog box, click Choose Files and select the application you want to upload.
    Choose application file to upload to Katalon TestOps.
    Note:
    • Application Repository supports uploading application files in .apk, .aab, and .ipa.
    • The size limit for the uploaded application is 500MB.

Your mobile application file is successfully uploaded to TestOps.

Record objects on a TestCloud device

To begin capturing objects on a TestCloud device, follow these steps:

  1. From the main Toolbar, click the Record Mobile icon and select TestCloud Devices.
  2. In the TestCloud Configurations section, do as follows:
    1. Device Name: Select the mobile operating system (OS), the version of the OS, and Studio will list out the available devices accordingly.
      For example, here we select the Android OS version 14, and the device Galaxy S24.
    2. 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.

    3. Application: Select the application file you want to test from your TestOps uploads.
  3. Click Start on the action bar to launch the AUT.
  4. Follow from step 4 of Record a mobile application to select objects.

Available Actions

Available Actions contains multiple mobile action buttons that can be performed on the AUT.

Available Actions

There are two types of actions:

  • Object action: Require selecting an object in Device View or All Objects to perform the action. After selecting, you can see which actions are enabled for that object.
  • Application action: Do not require selecting an object to perform.

Available ActionsDescription
TapTap on a mobile element.
Tap And HoldTap and hold on a mobile element for a duration.
SwipeSimulate swiping fingers on the mobile device.
Get TextGet the text of a mobile element.
Set TextSet the text on a mobile element. It also clears the previous value of the mobile element.
Send Keys Simulates keystroke events on the specified element, as though you typed the value key-by-key.
Set Encrypted TextEnter an encrypted text in an input field and clear the existing value of the input field. To encrypt a raw text, from the main menu, Help > Encrypt Text.
Clear TextClear text of a mobile element.
Scroll To TextScroll to an element which contains the given text.
Hide KeyboardHide the keyboard if it is showing.
Press Back (Available on Android only)Simulate pressing back button on a mobile device.
Take Screenshot Take a screenshot of the current device screen.
Switch To Web View Switch the current device to web view context.
Switch To Native Switch the current device driver to native context.
Switch To LandscapeSwitch the current mode of the device to landscape mode.
Switch To PortraitSwitch the current mode of the device to portrait mode.

Validate UI elements

Besides the available actions, you can right-click on any element in Device View or All Objects to access the context menu.

Then, you can capture the selected object or add Verify and Wait keywords as test steps.

The selected verification action is recorded in Recorded Actions table. You might need to double-click on Input field to add necessary values to some keywords.context menu

OptionDescription
Capture ObjectUsed for capturing an object.
Verify Element ExistVerify if a mobile element is present.
Verify Element Not ExistVerify if a mobile element is NOT present.
Verify Element VisibleVerify if a mobile element is visible.
Verify Element Not VisibleVerify if a mobile element is NOT visible.
Verify Element Checked

Verify if a mobile element is checked. Applicable to:

  • Checkbox

  • Radio button

Verify Element Not Checked

Verify if a mobile element is not checked. Applicable to:

  • Checkbox

  • Radio button

Verify Element Text

Verify the text of an element. After adding this keyword, you need to get text and parse it in the Input.

Wait for Element PresentWait for the given mobile element to present within the given time (in seconds).
Wait for Element Not PresentWait for the given element to NOT be present within the given time (in seconds).

Configure object tree display

You can configure the display of the object tree in Project Settings > Test Design > Mobile.

OptionDescription
Minimal
  • Default option
  • Uses the Driver.execute("mobile: source") method and displays minimal elements in the object tree
  • Better performance, but some elements might be missing
Full
  • Uses the Driver.getPageSource() and displays all elements in the object tree
  • Might cause performance issue
Was this page helpful?