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:

  1. 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.

  2. 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.

  3. 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.

Back to top

Add AI steps

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:

  1. 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.

  2. 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.

  3. After you successfully add a step to your test, the right pane shows the step count and success message. You can click the Run on application button to run the step. This tests that your step is correct, and advances the application to the next state, re-inspecting the application for the next step.

    You can instruct AI Codeless Testing to provide time for the application to load after running the step, before re-inspecting the application. Click the Dot Menu icon next to the Run on application button and set a delay.

    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.

Back to top

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:

  1. Make sure the browser or remote window is open.
  2. 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.

  3. Accept the default values or edit them as required.
  4. 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.

  5. If necessary, modify the step. Click the EDIT STEP tab:

    1. 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.

    2. Make the necessary edits, such as Object Logical Name, and Action.
    3. 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.

    4. For additional step-editing options, see Manually create and edit steps.

  6. Repeat the above steps to spy on additional objects.

Back to top

Next steps: