-
Book Overview & Buying
-
Table Of Contents
Advanced UFT 12 for Test Engineers Cookbook
In the previous recipe, you have learned about using the Description object. This recipe will show you how to get a collection of runtime objects and perform checkpoints to verify the values of specific properties. In our example, we will describe how to retrieve images from a web page, and then perform a check operation using a Checkpoint object that we would store beforehand in OR.
Proceed with the following steps:
We will create a Description object and then define the appropriate property-value pairs for identification, as follows:
Dim oDesc, i, oImgCollection
Set oDesc=Description.Create
oDesc("html tag").value="IMG|img"
oDesc("html tag").RegularExpression = trueThe following statement will retrieve a collection of images from the Google page:
set oImgCollection=Browser("title:=Google").Page("title:=Google").ChildObjects(oDesc)With this collection, we can now implement a loop that uses our Checkpoint object to validate the required properties:
For i =...
Change the font size
Change margin width
Change background colour