Skip to main content

Record Web utility in Katalon Studio

You can create an automated test script with test recording. In Katalon Studio, you only need to manually interact with your website and perform all the desired actions as a real user while the Katalon Recorder utility record them.

You can create a new test script or edit an existing test script by using the Katalon Recorder utility. This manual includes a tutorial of how to record test scripts and a brief introduction to each panel of the Katalon Web Recorder.

Record a new test case

To record a new test case, do as follows:
  1. From the main toolbar, click on Record Web to open the Web Recorder.
    The Web Recorder dialog appears.
  2. Enter a URL of your web application. For example, https://katalon-demo-cura.herokuapp.com/.
  3. Next to the URL text box, click the Record dropdown and select the browser type for the recording session.
    recorder browser
    TypeDescriptionSupported browsers
    New BrowsersStart recording in a new browser.
    • Chrome (Recommended)
    • Chrome (with Profile)

    • Firefox
    • Edge Chromium
    • Internet Explorer (only available on Windows)
    Active BrowsersUse the current browser to start recording. Download and install the Katalon Recorder add-on first and use your preferred browser to start recording:
    • Chrome

    • Firefox

    • Edge Chromium

    Note: The default browser is Chrome. To change the default browser, go to Project > Settings > Execution > Default execution and choose your preferred browser from the dropdown list. set default execution
  4. Click Record to start the recording session.
    A browser instance is launched automatically. Wait for your web page to load and interact with its elements. When you hover over an element, the browser highlights the element and displays its correspondent XPath on the top of the page.
  5. Interact with the web page. In this example, user signs in with the provided credentials. The recorded steps are generated automatically in Recorded Actions. When user types in a password in the Password field, Katalon Web Recorder uses the Set Encrypted Text keyword automatically. The input value is encrypted to ensure security.
  6. Once you are done, click on Stop recording, then click on Save Script.
During your recording, Katalon Studio captures the objects that you have interacted with. When saving your test script, Katalon Web Recorder exports a list of objects used in the test case. Choose a directory you want your test objects to be stored in to continue.

Record using an existing test case

With Web Recorder, you can modify existing test cases instead of creating a brand new test case.

Follow these steps:

  1. Open any existing test case to continue recording.
  2. Click on the Record icon to open Web Recorder. A confirmation dialog appears asking you to continue on recording the current test case.

    If you choose No, I want a clean session, Katalon Studio opens a new recording session without any pre-recorded steps from the current test case.

    If you choose Yes, all the existing test steps and test case variables are imported to the Recorded Actions and Variables tabs in Web Recorder respectively. You do not need to repeat the test steps having been recorded.record on existing test case

  3. Interact with the AUT.
  4. When saving your script, Katalon Studio automatically detects similar existing objects in the Objects Repository and asks you for further action to optimize the Object Repository.Add element to object repository
    The objects highlighted in red are objects already existed in the Object Repository. Katalon Studio identifies duplicate objects based on the ID (for example: Object Repository/Page_CURA Healthcare Service/a_Make Appointment) and several attributes of the object.
    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.

Validate UI elements

Given that you enter incorrect username or password, you can validate if the website displays an error message indicating a failed login attempt.

verify fail message

Or you can verify if the next screen after a successful login is "right" by verifying if a specific UI element is present.

In the drop-down list of the Run button, you can find some Run options. The two of them labeled with Debug are advanced options for validating recorded script, and saving you from running all test steps over and over again if you have a Katalon Studio Enterprise license:

  • Run all steps: Execute all steps that are enabled on Web Recorder.
  • Debug: Run selected steps: Execute only one or many selected steps. You can select multiple steps using either Ctrl or Shift key.

  • Debug: Run from selected step: Execute the currently selected step and all the steps after the selected one.

Katalon Web Recorder utility components

Recorded actions

Available actions in Katalon Web Recorder utility is the same as Katalon Studio built-in keywords. You can add any action, call another test case, and/or use Custom Keywords.
Note:
  • Katalon Studio does not support recording the click action on test objects with the type: <input type="file">, which defines a file upload box with a browse button.

Captured objects

During your recording, Katalon captures the objects that you have interacted with. When saving test script, Katalon Web Recorder exports a list of objects used in the test case. To learn more about WebUI test objects, see: WebUI test objects.

Variables

In Katalon Web Recorder, you can manage the variables directly related to your recording.

Logs

When running the recorded actions, you can investigate the execution by looking at its real-time detailed logs. Execution logs are displayed on the Logs tab.

For advanced features such as branching, looping or validation, refer to this article: Control Statements.
Note:
Was this page helpful?