Object Spy in QTP 9.2

Previous2122 2324252627282930Next

Object Spy is an inbuilt feature of Quick Test used to interrogate properties and methods associated with an Object.

Object Spy lists down all the Properties and Methods associated with a Test Object.

How to Locate Object Spy in QTP 9.2?

1. You can either navigate to ToolBar and Click Object Spy.

2. Open Object repository then Navigate to Tools and Click Object Spy.

3. In the Object Repository Window Click the Object Spy Icon.

Once you select the Object Spy You will see a blank object Spy window with a hand button on the right of the screen. Clicking on the hand Button you can then point it to the Object in the Application and click on the application. Look at the Image below


Once you click on an object all the properties of the object is listed in the Object Spy Window.


Previous2122 2324252627282930Next

7 comments:

Keerthi said...

hi friend,
This blog is really good and helping me a lot.I am very thankful to you.I have an doubt to ask you regarding this, could you please help me.How to use object spy,i.e. to write script using descrptive programing.I have seen an example but it includes loops but without how can I write the script.could you please help.I would be very thankful to you my friend.I have been in this topics since week but still I did not find correct answer.can you please help.
I really appretiate your work on writing this blog.It really helped me a lot.
Regards.

Kanikaram Kiranpaul said...

Hi Keerthi

Glad that this blog helped you.

A simple script to show how Descriptive programming is used is displayed below we are using gmail login page as reference.

'Script to set username and password to login
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "xxxxxx"
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").Set "yyyyyy"
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").click
Browser("Title:=Gmail.*").Page("title:=Gmail.*").Sync

in this script we are not using the object logical names but the properties and values of the object. with this there is no need of Object Repository and the objects in the application are identified based on the properties and values. For ex if we look at the webbutton we are using the name property and its value as Sign in.

Hope you understood.

Refer this link

http://qtp4free.blogspot.com/2010/07/write-script-to-login-in-to-gmail.html

Anonymous said...

very good article on DP.

chirag verma said...

'***************Gmail test dynamic scripting----descriptive programming***************
Set brmain=description.Create
brmain("creationtime").value=0
brmain("name").value="Gmail: Email from Google"
Set brinbox=description.Create
brinbox("creationtime").value=0
brinbox("name").value="Gmail - Inbox"
Set pgmain=description.Create
pgmain("micclass").value="page"
pgmain("title").value="Gmail: Email from Google"
Set pginbox=description.Create
pginbox("micclass").value="page"
pginbox("title").value="Gmail - Inbox"
Set user_name=description.Create
user_name("micclass").value="webedit"
user_name("name").value="Email"
user_name("height").value=22
Set pwd=description.Create
pwd("micclass").value="webedit"
pwd("name").value="Passwd"
Set signbtn=description.Create
signbtn("micclass").value="webbutton"
signbtn("name").value="Sign in"
Set signoutlk=description.Create
signoutlk("name").value="Sign out"
signoutlk("micclass").value="link"
browser(brmain).page(pgmain).webedit(user_name).Set "chiragverma09"
browser(brmain).page(pgmain).webedit(pwd).Set "chirag7026"
browser(brmain).page(pgmain).webbutton(signbtn).Click
browser(brinbox).page(pginbox).link(signoutlk).Click
browser(brmain).Close



Lakshmi said...

Cloud computing Training in chennai Job oriented cloud computing training is offered by Peridot Systems in Chennai, Adyar. We provide 100% placement for all our

clients with certification support. Experts are experienced with 12 years in line of cloud computing technically. We helps to achieve everyone's goals career.
Cloud computing Training in chennai

mercy said...

Informatica Training in chennai Job oriented Salesforce training is offered by Peridot Systems in Chennai, Adyar. We provide 100% placement for all our clients with certification support. Experts are experienced with 12 years in line of Informatica Training technically. We helps to achieve everyone's goals career.
visit:Informatica training in chennai

Unknown said...

I get a lot of great information from this blog. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
salesforce training in hyderabad

Post a Comment

/* Tynt Insight tracker ----------------------------------------------- */