Object Spy In QTP

Viewing Object Properties and Operations Using the Object Spy

Using the Object Spy pointing hand mechanism, you can view the supported properties and operations of any object in an open application. As you move the pointing hand over the objects in the application, their details are displayed in the Object Spy. These details may include the test object's hierarchy tree, its identification properties and values, and the operations associated with the object. For operations, the syntax is also displayed. For information about using the run-time object's operations or retrieving the values of its properties, see Retrieving and Setting Identification Property Values and Accessing Native Properties and Operations.

In most environments, you can choose to view the identification properties, the native properties, the test object operations, or the native operations.

To view identification properties, native properties, test object operations, or native operations:

  1. Open your application to the page containing the object on which you want to spy.

  2. Select Tools > Object Spy or click the Object Spy toolbar button  to open the Object Spy dialog box.

  3. Select the details you want to view for the object. For more information, see The Object Spy Dialog Box.

  4. If the objects on which you want to spy have a deep hierarchy, or long property names and values, resize the Object Spy dialog box to view all the information without scrolling.

  5. In the Object Spy dialog box, click the pointing hand  . QuickTest is hidden. As you move the pointing hand over the objects in your application, the objects are highlighted, and you can view their test object hierarchy and properties or operations in the Object Spy dialog box.
  6. Note: Highlighting the object in the application is supported only in some environments.
    For more information on using the pointing hand, see Tips for Working with the Pointing Hand.

  7. Hover over an object in your application. The object is highlighted in the application, and the Object Spy displays the corresponding test object, its properties or operations, and the test object hierarchy tree. You can move your mouse from one object to another in your application (without clicking) to view information on each object.
  8. To view different details about the test object in the Object Spy dialog box, hold the left Ctrl key and click the relevant options in the dialog box.
    To view the properties and operations of another test object currently displayed in the test object hierarchy tree, hold the left Ctrl key and select the relevant test object.

  9. To capture information about a particular object and its parent objects in the Object Spy, click on the object (in your application). The Object Spy displays the test object hierarchy tree and details for the selected object according to the object details tab and object type radio button that are selected.
  10. After clicking on an object, you can change the selected radio button or tab to view additional details.
    To view properties, values, or operations of other test objects currently displayed in the test object hierarchy tree, select that test object in the tree.

Post a Comment

Previous Post Next Post