Create your test structure

Install and enable UFT One's AI Object Detection. Then, create a test structure to test the Advantage Online Shopping site.

Note: For AI-based testing, the procedure for creating a test structure is same as web testing. If you have already known how to create a structure for web testing, you can ignore this topic.

Enable UFT One's AI Object Detection

To using AI-based testing in UFT One, you must have AI Object Detection installed and enabled. For details, see Prerequisites.

UFT One 23.4 and earlier: AI Object Detection is called AI Features in the installation.

Back to top

Add the UFT One browser extension

Before testing a web app, you must enable the OpenText UFT Agent relevant for the browsers you want to test.

This tutorial uses the Chrome browser to create and run your test. Add and enable the OpenText UFT Agent Chrome extension before continuing. For details, see Enable the OpenText UFT Agent extension on Google Chrome.

Once enabled, you'll see the OpenText UFT Agent icon in your browser toolbar:

Back to top

Create a new UFT One solution, test, and actions

UFT One actions are the building blocks of your test. This exercise describes how to create separate, modular actions to represent each of the steps in the following user flow on the Advantage Online Shopping site:

  1. Logging in to the site
  2. Selecting a laptop, and adding it to the cart
  3. Checking out and paying for the laptop
  4. Logging out of the site

Start UFT One

First, close your browser window. UFT One will only recognize and record on browser windows opened after UFT One has been opened.

Then, click the UFT One shortcut from your desktop, or access it from the Windows menu.

After the splash screen closes, in the Add-ins Manager, confirm that the Web Add-in is selected, and clear all other Add-ins.

Tip: We generally recommend loading only the add-ins required for your test. This keeps your test lean and simple, and also enhances UFT One performance.

Create a new test

Click the New button, and confirm that GUI Test is selected.

Enter the following details:

Name AdvantageDEMO
Location

Keep the default:

C:\Users\<username>\Documents\UFT One

Solution Name AITestingTutorial

Ensure that the Create directory for solution checkbox is selected, and then click Create.

Tip: UFT One solutions enable you to group your tests according to functionality, and open and edit multiple tests or other documents in the same UFT One session.

Solutions also enable you to share resources across tests.

Your test appears in the Solution Explorer and the canvas with a default action:

Create actions

  1. Rename Action1 to Login.

    In the canvas, right-click the Action1 box and select Action Properties.

    • In the Name field, enter Login.
    • In the message that opens about this action being a reusable action, click Yes.
  2. Create a new action called SelectLaptop. To do this, click anywhere in the canvas, and select Call to New Action.

    • Name your new action SelectLaptop.
    • Ensure that both Reusable Action and At the end of the test are selected.
  3. Repeat the previous step to create additional actions, named Checkout and Logout.

    Save your test when you're done.

Your test should look like this:

Back to top

Next steps: