So in today’s tutorial, I will be showing how Object Spy & Object Identification in QTP work together in order for you to program UFT/QTP to do what you want it to do.
So first I went to amazon.com, not logged in, chose an object to work with: the sign in button
I then use Object Spy to see the details of that button:
So for the uppermost half, you can see the Object hierarchy. It begins with Browser, then Page, then finally the Link. Just as there are directories in computers (C:\Users\Admin\Pictures), there are directories for webpage objects. This one goes:
But to find out the property values for link, we first must know what properties are associated with Links. To do this, you need to use Object Identification. You can find it under the Tools tab:
Clicking on Object Identification, click on the drop-down menu for environments, then select the Web Environment because we are literally working with a web application, which is the internet explorer browser, in order to sign into Amazon.com
You then choose Link from the Test Object Classes:
Under Mandatory Properties, you see that the only properties for Links are html tag and text. You then go back to object spy and click the “copy the clipboard” button for properties and their values:
You paste these property values into notepad:
You then find the values for the html tag and text properties:
You then use these values in your final code:
So now you have the directory to the sign in button. The “.Click” tells the software to click the button on that directory. This allows you to go to the sign in page: