Working with Dynamic Content

Q: How can I record and run components on objects that change dynamically from viewing to viewing?

Sometimes the content of objects in a Web page or application changes due to dynamic content. You can create dynamic descriptions of these objects so that QuickTest will recognize them when it runs the test.

Q: How can I check that a child window exists (or does not exist)?

Sometimes a link in one window creates another window.

You can use the Exist property to check whether or not a window exists. For example:

Browser("Window_name").Exist

You can also use the ChildObjects method to retrieve all child objects (or the subset of child objects that match a certain description) on the Desktop or within any other parent object.

For more information on the Exist property and ChildObjects method, refer to the QuickTest Professional Object Model Reference.

Q: How does QuickTest record on dynamically generated URLs and Web pages?

QuickTest actually clicks links as they are displayed on the page. Therefore, QuickTest records how to find a particular object, such as a link on the page, rather than the object itself. For example, if the link to a dynamically generated URL is an image, then QuickTest records the "IMG" HTML tag, and the name of the image. This enables QuickTest to find this image in the future and click on it.

No comments: