Sample test

Relevant for: GUI tests only

The following is a sample action of a login procedure to the Advantage Online Shopping site, the sample Web site. When you create tests, UFT One 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.



The browser invokes the Advantage Shopping Web site.

Advantage Shopping is the name of the Web page test object.

UserMenu is the name of the button 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 One object model.

Browser("Advantage Shopping").Page("Advantage Shopping").Link("UserMenu").Click
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "tutorial"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("password").SetSecure "5fa0c7324efd369ed5a1cb015311eb47"
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("sign_in_btnundefined").Click

For more examples and details, see the UFT One tutorials.