Skip to main content

Introduction to Mobile Recorder in Katalon Studio

Mobile Recorder

To start recording a mobile test, click on the Mobile Recorder icon on the main toolbar, and select your device type. Katalon Studio supports local Android or iOS/Remote/Kobiton mobile devices.



The Mobile Recorder dialog with multiple components appears for your recording sessions.

Action Bar

Action Bar located on the top left corner contains the Capture Object, Start, and Stop buttons.

  • Capture Object: When you click this button, Katalon Studio captures all mobile elements displayed on the current screen of the device.
  • Start: Click on this button to start recording, Katalon will deploy and open the application on the configured device. This button is enabled after you specify the AUT.
  • Stop: Click on this button to pause recording.

Configurations

The Configurations area is where you choose a mobile device and application under test (AUT) for the recording session.

  • 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, you can 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.

Device View and All Objects

To select an object, you can click on any object either in the tree of All Objects or in Device View. Katalon highlights their counterpart accordingly for verification.

  • 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, you can click on the Capture Object button to reload Device View and refresh All Objects.

Capture objects on Android app

Available Actions

Available Actions contains multiple buttons representing Mobile actions that can be performed on the AUT. There are two types of Mobile actions, including object action and application action.

  • Object action: Object actions require you to select an object on Device View or All Objects to perform the action. Select an object, and you can see which actions are enabled for that object.
  • Application action: application actions do not require a selected object to perform.

    Available actions

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 (Available from version 8.3.0)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 (Available from version 8.3.0)Take a screenshot of the current device screen.
Switch To Web View (Available from version 8.3.0)Switch the current device to web view context.
Switch To Native (Available from version 8.3.0)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 these available actions, from version 8.4.0, you can right-click on any element in Device view or All objects and directly perform the Capture Object action or add Verify and Wait keywords as test steps from the context menu. The selected verification action is recorded in Recorded Actions. You might need to double-click on Input to add necessary values to some keyword.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 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).

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.

Captured Objects

Captured Objects display all objects that you have interacted during the recording session. For each object captured by Katalon, you can find its detailed properties shown in the Object Properties table by double-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. Katalon Studio 7.6.0 onwards fully supports selector strategies supported by Appium except for Android Data Matcher. To learn more, see Find Mobile Objects.

If you prefer another locator strategy among the provided option, you can choose it and generate a new locator. Then click Highlight to see if your newly updated locator can detect the target object correctly.

  • Default locator is unique in detecting that object:

    object properties

  • You can always choose your preferred locator strategy among the provided options:

    capture objects

  • Remember to verify if your newly created locator can identify the target object:

    Verify new locators in captured objects section

Export recorded actions to a test case

When you finish a recording session, click Save Script. The Folder Browser dialog pops up asking you where to store recently captured objects.

There are 3 options to export the recorded actions to a test case:

  • Export to new test case (chosen by default)
  • Append to test case
  • Overwrite test case



See also: