To add AI-based test steps:
-
Select the project to which you want to add the test step. Position the cursor at the desired insert position in the test
script.
-
In the toolbar, click
Record Locator.
Optional: If the application under test (AUT) is not open yet, the
Select Application dialog displays.
The
Locator Spy window opens and displays the application under test.
-
Make sure that
Locator Spy is set to AI mode.
-
Locator Spy remembers the last used recording mode. If
Locator Spy is not in AI mode, click
Stop Recording Locator, switch the radio button to
AI mode, and click
Start Recording Locator.
-
The AI engine is started up. A screenshot is taken for processing. A banner with the text
Retrieving Object Hierarchy is displayed on top of the AUT. Depending on the hardware, this might last three to six seconds. Avoid to interact with the
AUT while a banner is active.
-
Highlighting and distinguishing AI Objects and OCR Objects:
-
Detected AI Objects will be highlighted with pink rectangles. OCR Objects are hidden by default. If you hover over a text,
any OCR Object detected for that text will be highlighted.
-
If you hover over an AI or OCR Object, a preview of the
findWithAI statement is displayed in the locator text field.
-
To record a locator, position the mouse over the object you want to identify and press
Ctrl+Alt. Additional attributes and the confidence of the AI Object identification are displayed in the
Locator Attributes table of the
Locator Details section.
Optional: Click the drop down symbol next to the
findWithAI statement to see and choose alternative ways of specifying the locator for the picked AI or OCR Object.
-
Click
Paste Locator to Editor to paste the
findWithAI statement at the current cursor position of the test script or click
Copy Locator to Clipboard to manually paste the statement.
-
Optional: Record additional AI Locators using one of the following two options:
-
Select another AI or OCR Object from the tree in the
Locator Details section. The chosen AI Object is highlighted in the AUT.
-
Click
"Start Recording Locator again.