Monday, February 11, 2008

Object Hierarchy in QTP

An interesting point for you to know is (some of you might already be familiar with this)


Even though the object on which you record may be embedded in several levels of objects, the recorded hierarchy does not include these objects. For example, even if the WebButton object on which you record is actually contained in several nested WebTable objects, which are all contained within a Browser and Page, the recorded hierarchy is only Browser > Page > WebButton



For Example (see below image) Object Spy identifies several levels of hierarchy for Submit button, but while recording (or even when using Descriptive Programming) it just uses the below line of code.





SwfWindow(“Teller”).SwfButton(“Submit”).Click