To count the no of links present in the yahoo home page i
have written the script like this
Set fileSysObject=createobject("Scripting.FileSystemObject")
Set linksFileName=fileSysObject.opentextfile
("D:\samplelinkfile.txt",2,true)
Set linkDescObj=description.Create
linkDescObj("micclass").value="Link"
Set noOfLinks=browser("yahoo").Page("Yahoo!
India").ChildObjects(linkDescObj)

For i=0 to noOfLinks.count-1
linkName=noOfLinks(i).getROProperty("name")
linksFileName.writeline(linkName)
Next
linksFileName.close
Set fileSysObject=nothing

While running the script it showing error that
object "yahoo"isnot found in the object repository.
Is there any setting before running the script? if yes what
is the steps for it.Im using QTP9.0

Answers were Sorted based on User's Feedback



To count the no of links present in the yahoo home page i have written the script like this Set f..

Answer / baba

Hello buddy,

Do not bother about this type of small errors.

No need to open new test and record on yahoo page and again
pasting that code here in your code. all these long
process.ofcourse it may work. as a QTP profession you have
to go in efficient way.

Follow this steps.

Once you got that error message.

1. Just Open OR
2. Click on Add Objects button
3. Select your desired objects here (Links your case)
4. Click on Ok

go back to your test and run your test now.

if it not runs, delete your "browser("yahoo").page
("yahoo")... all these things

just add this code
systemutil.Run "www.yahoomail.com"
Set noOfLinks=browser("Yahoo! Mail: The best").Page("Yahoo!
Mail: The best").ChildObjects(linkDescObj)

it will work. no probs

All the best

Is This Answer Correct ?    3 Yes 0 No

To count the no of links present in the yahoo home page i have written the script like this Set f..

Answer / rico

Yes, this will give an error if you dont have the objects
(Browser and page) in the OR. So, here is what you can
do...open a new test and record any operaiton on yahoo page
and then later remove the steps generated in Expert view by
reocrding and later paste this code...i think this should
work

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More QTP Interview Questions

in how many ways you perform batchtesting?

2 Answers   Sapient,


can test automation improve test effectiveness?

0 Answers  


What is the basic concept of quicktest professional?

0 Answers  


what are the challenges do we face while testing webbased applcations using the automation tool QTP or any?

4 Answers   BirlaSoft,


I have a list box which contains duplicate values e.g. A,A,A,B,B,B,C,C,C.Now write a code in qtp to test the list box . Scenario #1 : I have to check whether any values are there? Scenario #2 : If duplicate values are there,then how many time it is getting duplicated? Svenario #3 : how can I test presence of items in list box ommiting duplicate values?

6 Answers   NIIT,






What is repository parameters in QTP?how will we define that????what is unmapped & mapped repository parameters????????

1 Answers  


Maximum synchronizing time out in QTP

3 Answers   Kanbay,


How QTP recognize the object??how to add objcts into object repository??

3 Answers  


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

0 Answers  


Actually How do we use this Smart Identification Technology during Recording mode.

1 Answers  


While recording a login window QTP is identifying only parent window,then how can u identify the child objects.

2 Answers   Symphony,


how can u put synchronization point in qtp,wat is exactly synchroniztion why we use it wat is benifit in qtp

13 Answers   College School Exams Tests, Mind Tree,


Categories