Create a test
After you launched your application, you can use AI Record to automatically generate a test, or AI Inspection to identify objects.
For more about AI Record in AI Codeless Testing, see Use AI Record in Codeless.
This topic describes how to use AI Inspection to create an AI Codeless test.
Inspect your application for objects
After your application is launched, AI Codeless Testing can identify the objects in the application visually, similar to the way a person would. You can then add steps to your test that perform operations on these objects.
For the types of objects Codeless identifies and the operations supported, see the AI-based testing section of the UFT One Help Center.
To inspect your application for objects:
Make sure you have successfully launched your application and navigated to the screen or page whose objects you want to test.
Skip this step if you already opened your desktop web application without creating an environment.
Click the AI Inspection button on the top.
After the AI Inspection window opens, directly click an open web page or the device screen. If you click an unsupported application or press Esc, the Select Application button appears to prompt you to click again.
The LIVE APPLICATION tab displays the current web page or device screen and begins inspecting it. When the inspection is complete, AI Codeless Testing highlights the objects that it identifies.
- Select the Visual Elements and/or Texts check boxes to show the visual or text objects in your app or web page.
- Click Select a different application to select a different context to inspect.
Tip: As you navigate within the browser or device, to inspect the current page or screen, manually click the Re-inspect button , or click the Delayed re-inspect button to set the delay for an automatic reinspection.
If AI Codeless Testing was unable to identify an object, click the Help us to improve link on the bottom.
The Feedback Tool window opens the current page or app screen, highlighting all identified visual objects. Provide details about object identification and click SEND FEEDBACK. For details, see the Feedback Tool documentation.
Once you have the objects in your application highlighted, you can add AI steps to your test with a single click.
To add AI test steps:
Make sure you are in the LIVE APPLICATION tab and that you have inspected your application.
The LIVE APPLICATION tab shows the web page or device screen currently displayed in the web browser or remote access window.
Click a highlighted object. A tooltip opens and the right pane shows the step.
On the tooltip, you can modify the step action, edit the value field, and then click Add to test. Alternatively, click Edit to modify additional step details including Text, Position, and Action on the right pane.
Once the step is successfully added to your script, the right pane shows the step count, success message, and the Run on application button for you to do a trial run. Click the Dot Menu icon next to the Run on application button to set a delay for the trial run.
Note: Make sure that the inspected web page or device screen is visible before you click the Run on application button. Otherwise, the step may be run on other open applications or windows.
Steps created with AI Inspection are marked with an AI indicator, as shown below:
To edit or fine-tune these steps in the Editor, see Manually create and edit steps.
Note: Avoid adding steps with objects that were incorrectly identified. For example, if a button is identified as a text box, or a check mark is identified as a button, such objects may be identified inconsistently and fail in subsequent test runs.
Add property-based steps
You can also add property-based steps to your test using the built-in Spy. Use this option if the AI engine was unable to identify an object. Note that if you add property-based steps, you cannot run the test on a different environment.
To add property-based test steps:
- Make sure the browser or remote window is open.
Click PROPERTIES-BASED SPY button. The focus moves to the browser or remote access window. Click an object that AI engine was unable to identify.
AI Codeless Testing opens a dialog box with the identified object name and properties.
Note: The Spy in AI Codeless Testing supports only Web and Mobile technology.
- Accept the default values or edit them as required.
Click APPLY. A step is added to the AI Codeless Testing step list.
Since these steps were created with property-based detection, they are marked with a PB (Property Based) icon.
If necessary, modify the step. Click the EDIT STEP tab:
Check the Object Hierarchy. To modify the captured value, select an entry from the drop down or click the Highlight Object button to locate the selected object in the application.
Note: Make sure that the inspected web page or device screen is visible before you click the Highlight Object button.
- Make the necessary edits, such as Object Logical Name, and Action.
If your step contains syntax errors, AI Codeless Testing displays a red symbol in the step, underlines incorrect text, and shows an error message in the EDIT STEP tab.
For additional step-editing options, see Manually create and edit steps.
- Repeat the above steps to spy on additional objects.