Analyzing recordingsWithin this section we introduce the Recorder working environment and analyze the recording of the current test example.
Recorder working environmentThe Recorder working environment basically identifies four different regions which are explained herein after.
The upper-left screen area identifies the project file view of Ranorex Studio. There, all files being created and managed for a test project are displayed in a folder-like structure.
The lower-left screen area hosts the module browser view. This storage structure plays a central role in modularization of test recordings and with test modules.
- The recording steps lead to a list of recorded actions
- These actions are listed in the sequence of their appearance in the action table
- The current example identifies 7 actions
- During the recording, all identified UI-elements (i.e. buttons, text fields, links, menu items, …) are being tracked and referenced through repository items within the repository
- Each UI-element is referenced by one repository item
- The current example identifies 5 UI-elements
Action table analysisThe action table identifies 7 different actions. Let’s have a closer look at those actions.
Example action table
- The action starts the application under test at the beginning of the recording
- This action represents the click into the name text field to place the input-cursor in the field
- The last column of this action contains a reference to the corresponding repository item which represents the UI-element ‘EnterYourName’ (i.e. the name text field)
- This action represents the text input into the name text field
- The current example outlines the input of ‘Harry’ as text into the UI-element ‘EnterYourName’ text field
- Action #4 refers to the click on the Submit button in the test application
- The reference to the UI-element, i.e. the ‘Submit’ button can be seen in the last column
- The test validation is represented as an action item
- Ranorex matches the text in the changed welcome message against a reference text
- The click action represents the resetting of the welcome message to its initial content
- The final action represents the click on the Exit button of the application under test
- This action closes the application
Repository analysisThe current example identifies 5 repository items which each refer to a corresponding UI-element in the application under test. Let’s have a closer look at them.
- This UI-element represents the Exit button of the demo application
- This UI-element represents the name text field of the demo application
- This UI-element represents the Submit button of the demo application
- This UI-element represents Reset link (i.e. button) of the demo application
- This UI-element represents the text label which contains the welcome message of the test application
Link between actions & repository itemsRecorded actions and repository items referencing identified UI-elements are managed and stored separately, but they are linked to each other. This concept is briefly explained herein.
Link between action and repository item
- The mouse clicks on the name text field (action #2), as well as the text insertion of ‘Harry’ into the name text field (action #3), refer both to the same UI-element ‘EnterYourName’ (item #2).
- UI-elements are represented by so-called repository elements
- They have a name (e.g. EnterYourName) and a location in the GUI (=path)
Sample solutionWe offer to download a prepared sample solution for this chapter.
- Unzip the project directory to any folder on your computer
- Start Ranorex Studio and open the solution file