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:
While recording, use only the mouse for navigation
Avoid using other input devices such as graphic tablets, touchpads, pens, etc.
Click every step
Do not use the tab key to navigate through forms.
Close other applications
Close any other applications or tools that you don’t need for the test.
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
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.
Set display scaling to 100 %
In the Windows display settings, set display scaling to 100 % for all of your displays.
Before recording any steps, choose your testing technology and add the application under test (AUT).
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.
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
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 recording
The application under test comes into focus.
In the text field, enter ‘Harry‘ and click Submit.
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.
Click Validate. Recording pauses and the Recorder switches to validation mode.
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.
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.
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 and end test recording
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
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.
Unzip to any folder on your computer
Start Ranorex Studio and open the solution file
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.