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
How to use the object spy in quicktest professional (qtp) 8.0 version?
How to run a test using quicktest professional?
Can we create user defined functions in qtp?
How to do call a output parameter from one action to another action??/
How to get popup error message.
Explain quicktest professional testing process?
What is Cross browser testing? Does UFT support it?
How do know the number of browsers opened?
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.
Tell me one scenario, the complex functionality you have automated in your project?
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.
How to create Reusable and Multiple Actions?
Explain quicktest professional (qtp) testing process?
How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained, tracked, controlled, and tested?
Mention the test steps of qtp.