Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryCalendarFAQRegisterUsergroupsLog in

Share | 
 

 QTP Notes

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 142
Points : 410
Reputation : 0
Join date : 2007-12-29
Location : Chennai

PostSubject: QTP Notes   Mon Dec 01, 2008 10:05 am

3.0 How QuickTest identifies objects
3.1 Object Identification

3.1.1 Object Identification While Recording
Stores Object as Test Object, Determining the class it fits.
For each test object class, QuickTest always learns a list of mandatory properties. Checks whether this description is enough to uniquely identify the object. If it is not, QuickTest adds assistive properties, one by one, to the description, until it has a unique description.

3.1.2 Object Identification During Test Run
Searches for a run-time object that exactly matches the description of the test object
It expects to find a perfect match for both the mandatory and any assistive properties of test object
Uses Smart Identification mechanism to identify an object, even when the recorded description is no longer accurate.

3.2 Object Repository Introduction
The Object Repository dialog box displays a test tree of all objects in the current action or the entire test.


















You can use the Object Repository dialog box to view or modify the properties of any test object in the repository or to add new objects to your repository.

3.2.1 Identifying the Object
The top part of the dialog box displays information about the object:

Information Description
Logical name The name that QuickTest assigns to the object.
Class The class of the object.
Find Opens the Find dialog box, where you can find a property or value that occurs several times in the same action.
Replace Opens the Replace dialog box, where you can modify a property or value that occurs several times in the same action.

3.2.2 Viewing the Objectís Properties

The default properties for the object are listed in the Properties pane of the dialog box. The pane includes the properties, their values, and their types:

Pane Element Description
Type The icon indicates that the value of the property is currently a constant. The icon indicates that the value of the property is currently a Data Table parameter. The icon indicates that the value of the property is currently an environment variable parameter. The icon indicates that the value of the property is currently a random number parameter.
Property The name of the property.
Value The value of the property.
Enable Smart Identification Indicates whether or not QuickTest uses Smart Identification to identify this object during the test run if it is not able to identify the object using the test object description. Note that this option is available only if Smart Identification properties are defined for the objectís class in the Object Identification dialog box. Note: When you select Disable Smart Identification during the test run in the Run tab of the Test Settings dialog box, this option is disabled, although the setting is saved. When you clear the Disable Smart Identification during the test run check box, this option returns to its previous on or off setting after the test run.
Add/Remove Opens the Add/Remove Properties dialog box which lists the properties that can be used to identify the object.

3.3 Use the Object Spy
Using the Object Spy, you can view the properties of any object in an open application. In addition to viewing object properties, the Object Spy also enables you to view both the run-time object methods and the test object methods associated with an object and to view the syntax for a selected method.

3.3.1 To view object properties:
Open your browser or application to the page containing the object on which you want to spy.

Choose Tools > Object Spy to open the Object Spy dialog box and display the Properties tab. Alternatively, click the Object Spy button from the Object Repository dialog box.

In the Object Spy dialog box, click the pointing hand. Both QuickTest and the Object Spy are minimized so that you can point to and click on any object in the open application.

Note: If the window on which you want to spy is partially hidden by another window, hold the pointing hand over the partially hidden window for a few seconds. The window comes into the foreground. You can now point and click on the object you want. You can configure the length of time required to bring a window into the foreground in the General tab of the Options dialog box.

If the object on which you want to spy can only be displayed by performing an event (such as a right-click or a mouse-over to display a context menu), hold the Ctrl key. The pointing hand temporarily turns into a standard arrow and you can perform the event. When the object on which you want to spy is displayed, release the Ctrl key. The arrow becomes a pointing hand again.

Click the object for which you want to view properties. The Object Spy returns to focus and displays the object hierarchy tree and the properties of the object that is selected within the tree.

To view the properties of the test object, click the Test Object Properties radio button. To view the properties of the run-time object, click the Run-Time Object Properties radio button.

Tip: You can use the Object property to retrieve the values of the run-time properties displayed in the Object Spy.

You can use the GetTOProperty and SetTOProperty methods to retrieve and set the value of test object properties for test objects in your test. You can use the GetROProperty to retrieve the current property value of the objects in your application during the test run.

If you want to view properties for another object within the displayed tree, click the object in the tree.

If you want to copy an object property or value to the clipboard, click the property or value. The value is displayed in the selected property/value box. Highlight the text in the selected property/value box and use Ctrl + C to copy the text to the clipboard or right-click the highlighted text and choose Copy from the menu.
Note: If the value of a property contains more than one line, the Values cell of the object properties list indicates multi-line value. To view the value, click the Values cell. The selected property/value box displays the value with delimiters indicating the line breaks.

3.3.2 To view object methods:
Open your browser or application to the page containing the object on which you want to spy.

Choose Tools > Object Spy to open the Object Spy dialog box. Alternatively, click the Object Spy button from the Object Repository dialog box.

Click the Methods tab.

Click the pointing hand. Both QuickTest and the Object Spy are minimized so that you can point to any object on the open application.

Note: If the object you want is partially hidden by another window, hold the pointing hand over the partially hidden window for a few seconds. The window comes into the foreground. You can now point and click on the object you want. You can configure this option in the Options dialog box.

If the object on which you want to spy can only be displayed by performing an event (such as a right-click or a mouse-over to display a context menu), hold the Ctrl key. The pointing hand temporarily turns into a standard arrow and you can perform the event. When the object on which you want to spy is displayed, release the Ctrl key. The arrow becomes a pointing hand again.

Click the object for which you want to view the associated methods. The Object Spy returns to focus and displays the object hierarchy tree and the run-time object or test object methods associated with the object that is selected within the tree.


To view the methods of the test object, click the Test Object Methods radio button. To view the methods of the run-time object, click the Run-Time Object Methods radio button.

Tip: You can use the Object property to activate the run-time object methods displayed in the Object Spy.

If you want to view methods for another object within the displayed tree, click the object on the tree.

If you want to copy the syntax of a method to the clipboard, click the method in the list. The syntax is displayed in the selected method syntax box. Highlight the text in the selected method syntax box and use Ctrl + C to copy the text to the clipboard, or right-click the highlighted text and choose Copy from the menu.
Back to top Go down
http://knowledgeshare.forumotion.com
 
QTP Notes
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» I won the Grand Prize (iPad) THANK YOU ALL!!!
» Are tannins your trigger? I'd like to compare notes.
» [SOLVED] snipping tool & sticky notes shortcut missing

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: Testing :: Automation-
Jump to: