mercredi 13 juin 2018

QTP - Determine whether to continue with action or not

I am like a week into automation testing and I have an issue that I need help with..

What I have is the following (Action Names):

Open Application

Login

Find Accommodation

Select Accommodation

Confirm Booking

Search

Search Results

Booking Details

Close Application

The 3 actions in bold above is where my issue is.

In the 'Search' page of the application, you can either search by name or by booking number.

If you search by name, you're taken to the 'Search Results' page and presented with a DataGrid where you need to select your booking and click on next, then you go to the 'Booking Details' page

If you search by number, you're immediately taken to the 'Booking Details' page

Now with the actions, the order - whether you choose name or number search - is

Search

Search Results

Booking Details

So I am trying to figure out a way of how I can 'skip' the 'Search Results' action when I search by number.

I'm sure it will be some form of an if statement, but I am not that familiar with the UFT tool yet and perhaps there is a way of doing it with UFT?

Even if I use an if statement, I do not know what my condition criteria would be. Any help will be appreciated.

Aucun commentaire:

Enregistrer un commentaire