Record a test | Ranorex Studio User Guide
Help CenterUser GuideRanorex Studio fundamentals

Record a test

In this chapter, you’ll learn how to record a test and become familiar with the underlying automation concepts.

In this chapter

    Steps for successful recording

    Ranorex Studio supports a wide range of environments, specifications, and settings. To make your first recording a success regardless of your environment, we recommend the following:

    Use a mouse

    While recording, use only the mouse for navigation

    Avoid using other input devices such as graphic tablets, touchpads, pens, etc.

    Click every step

    Click every step

    Do not use the tab key to navigate through forms.

    Close other applications

    Close other applications

    Close any other applications or tools that you don’t need for the test.

    Open the user guide on another machine

    Open the user guide on another machine

    If possible, open the user guide on another machine or tablet for reference while recording your test.

    Click pause/continue in the recorder

    Click pause/continue in the Recorder

    To check back to the user guide or perform actions that you don’t want to be recorded, just click the Pause button in the Recorder control center.

    Avoid using high DPI display

    Set display scaling to 100 %

    In the Windows display settings, set display scaling to 100 % for all of your displays.

    Recording preparation

    Before recording any steps, choose your testing technology and add the application under test (AUT).

    Start recording by clicking Record in Ranorex Studio

    Click RECORD in Ranorex Studio

    In the Recorder view of Ranorex Studio, click RECORD.
    Click Desktop, because the Ranorex Demo Application is a desktop application.

    Further reading

    The various options for selecting other technologies are described in Ranorex Studio fundamentals > Ranorex Recorder > ⇢ Technology selection

    Selecting the application under test (AUT)

    Selecting the application under test (AUT)

    To add the application, click Add app…
    In the Explorer dialog that appears, browse to where you saved the Demo Application.
    Select the program file RxDemoApp.exe and click Open.

    Record the test

    tipp icon

    Hint

    Remember, if you’re not using whitelisting, all user interactions are captured once recording has started, even if they are not performed on the AUT.

    • Click Pause to pause recording. Click Continue to resume recording.
    • Click Stop to end recording.

    Learn more about the Recorder control center in Ranorex Studio fundamentals > Ranorex Recorder > ⇢ Recorder control center & hotkeys.

    Read about whitelisting in Ranorex Studio fundamentals > ⇢ Whitelisting.

    To start recording, click Record. Ranorex Studio is minimized to the taskbar automatically.
    The Recorder control center shows that recording is active.

    Starting the test recording

    Starting the recording

    The application under test comes into focus.
    In the text field, enterHarry‘ and click Submit.

    Recording the text insertion

    Validate the test

    We’ve recorded the UI interaction. Now it’s time to validate whether the interaction has led to the desired result, i.e. if the welcome message has changed accordingly.

    Further reading

    The concept of test validation is introduced in Ranorex Studio fundamentals > Test validation > ⇢ Introduction.

    Setting up a validation is explained in depth in Ranorex Studio fundamentals > Test validation > ⇢ Concept of validation.

    Click Validate. Recording pauses and the Recorder switches to validation mode.

    Activating test validation

    Activating test validation

    Select the UI element to validate:

    • Mouse over the changed welcome message. A purple frame follows your mouse movement.
    • The purple frame indicates which element is currently selected for validation.
    • Once your selection matches the welcome message, click it.
    Validation element selection

    Selecting the element to validate

    To confirm the UI element, click Next.

    Select the validation attributes:

    • Text and Visible are the default validation attributes for text-based validations. No other attributes are required.
    • To confirm the selection, click OK.
    Validation element & attribute selection

    Confirming the element and attribute selection

    Finalize and end recording

    Once you’ve finished the validation action, Ranorex automatically continues recording. The next step is to finalize and end the test recording.

    Click Reset to reset the welcome message to its initial state.
    Click the Exit button of the Demo Application.
    In the Recorder control center, click Stop to end the recording.

    Finalize & end test recording

    Finalize and end test recording

    Result(s):

    The recording ends, and you return to the Recorder view. If you followed the instructions exactly, you should see 7 recorded actions and 5 identified UI elements, organized in two folders as shown below.

    Recording result in Recorder view

    Recording result in Recorder view

    Download the sample solution

    You can build your own test solution according to the instructions in this chapter. Alternatively, you can download a prepared sample test solution.

    Sample solution

    Theme: Recording a test

    Time: Less than 10min

    Download sample file

    Installation:

    Unzip to any folder on your computer
    Start Ranorex Studio and open the solution file Introduction.rxsln

    tipp icon

    Hint

    The sample solution is available for Ranorex versions 8.0 or higher. You must accept the automatic solution upgrade for versions 8.2 and higher.