Using child objects

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.

How to do it...

Proceed with the following steps:

  1. 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 = true
  2. The following statement will retrieve a collection ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.