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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use the object spy in quicktest professional (qtp) 8.0 version?

511


How to run a test using quicktest professional?

528


Can we create user defined functions in qtp?

559


How to do call a output parameter from one action to another action??/

1872


How to get popup error message.

1030






Explain quicktest professional testing process?

564


What is Cross browser testing? Does UFT support it?

621


How do know the number of browsers opened?

627


After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

5880


Tell me one scenario, the complex functionality you have automated in your project?

1475


Hi I know two types of testing processes. 1. Reaquirments stage,test design,code review's, Design review's, Test Plan, Test Cases design, test execution, Defect Reporting and tracking, UAT, Signoff. 2.Test Initiation , Test Plan, Test Design, Execution,Bug tracking, UAT, Sign off.

1374


How to create Reusable and Multiple Actions?

1711


Explain quicktest professional (qtp) testing process?

539


How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained, tracked, controlled, and tested?

698


Mention the test steps of qtp.

540