Understanding Test Object and Native Properties and Operations In QTP

Understanding Test Object and Native Properties and Operations


The identification property set for each test object is created and maintained by QuickTest. The native property set for each run-time object is created and maintained by the object creator (for example, Microsoft for Microsoft Internet Explorer objects, Netscape for Netscape Browser objects, the product developer for ActiveX objects, and so on).

Similarly, a test object operation is a method or property that QuickTest recognizes as applicable to a particular test object class. For example, the Click method is applicable to a WebButton test object. As you add steps to your test, you specify which operation to perform on each test object. If you record steps, QuickTest records the relevant operation as it is performed on an object.

During a run session, QuickTest performs the specified test object operation on the run-time object. Native operations are the methods of the object in your application as defined by the object creator.

Property values of objects in your application may change dynamically each time your application opens, or based on certain conditions. You may need to modify the identification property values to match the native property values. You can modify identification properties manually while designing your test, or use SetTOProperty statements during a run session. You can also use regular expressions to identify property values based on conditions or patterns you define, or you can parameterize property values with Data Table parameters so that a different value is used during each iteration of the test. For more information on modifying object properties, see Managing Test Objects in Object Repositories. For more information on parameterization, see Parameterizing Values. For more information on regular expressions, see Understanding and Using Regular Expressions.

You can view or modify the identification property values that are stored with your test in the Object Properties or Object Repository dialog box. For more information, see Specifying or Modifying Property Values.

You can view the current identification property values of any object on your desktop using the Properties tab of the Object Spy. For more information, see Viewing Object Properties and Operations Using the Object Spy.

You can view the syntax of the test object operations as well as the native operations of any object on your desktop using the Operations tab of the Object Spy. For more information, see Viewing Object Properties and Operations Using the Object Spy.

You can retrieve or modify property values of the test object during the run session by adding GetTOProperty and SetTOProperty statements in the Keyword View or Expert View. You can retrieve property values from the run-time object during the run session by adding GetROProperty statements. For more information, see Retrieving and Setting Identification Property Values.

If the available test object operations and identification properties for a test object do not provide the functionality you need, you can access the internal operations and properties of the run-time object using the Object property. You can also use the attribute object property to identify Web objects in your application according to user-defined properties. For information, see Accessing Native Properties and Operations.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.