Validating tooltips is a bit more challenging than validating other types of UI elements because they appear only when you hover over a UI element and are visible for a limited time. In this article, you’ll learn how to validate tooltips in Ranorex Studio.
You can download the sample solution for this chapter here. It contains the finished solution with all recorded actions.
Theme: Tooltip validation
Time: 15 minutes
Install the sample solution:
- Unzip to any folder on your computer.
-
Start Ranorex Studio and open the solution file
TooltipValidation.rxsln
Test definition
In this example, we want to validate that the tooltip shown below appears correctly when a user hovers the mouse over the Shuffle button in the Ranorex Demo Application.
Activate tooltip validation
Tooltips are validated using a dedicated Recorder hotkey. For a complete list of Recorder hotkeys, see Recorder control center & hotkeys.
Use this procedure to capture a tooltip for validation:
- Start recording in Ranorex Studio.
- Move the mouse cursor over the UI element whose tooltip you want to validate (in this example, the Shuffle button).
-
When the tooltip appears, press T.
- In the next screen, check whether the correct tooltip element has been selected and click Next to confirm. Ensure the attribute Exists is checked and click OK to confirm.
Result
After the recording stops, Ranorex Studio returns to the main window. The actions table shows two recorded actions. Action 2 is the tooltip validation.
- Actions table and tooltip validation action.
- Linked repository item representing the tooltip UI element.