Sample test

Relevant for: GUI tests only

The following is a sample action of a login procedure to the Mercury Tours site, the sample Web site. When you create tests, UFT creates both a graphical representation and script of the steps you perform on your application.

The graphical representation of these steps is displayed in the Keyword View.

The table below provides an explanation of each step in the Keyword View.

Step

Description

The browser invokes the Welcome: Mercury Tours Web site.

Welcome: Mercury Tours is the name of the Web page test object.

userName is the name of the edit box test object. Set is the method performed on the edit box. tutorial is the value property of this edit box.

password is the name of the edit box test object. SetSecure is an encryption method performed on the edit box. 4ff405198a68b24867227da98b21e547cfc0c2f47d31 is the encrypted value of the password.

Sign-In is the name of the image link test object. Click is the method performed on the image. 26, 4 are the x- and y-coordinates where the image was clicked.

The Editor displays these same steps using a VBScript program based on the UFT object model.

Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "tutorial"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4ff405198a68b24867227da98b21e547cfc0c2f47d31"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 26,4

For more examples and details, see the UFT Tutorials .