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
What are the types of properties that quick test learns while recording?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
What is use of object spy?
Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan
When ‘option explicit’ keyword is used in qtp?
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
Is it possible to split an action? How?
Explain object spy in qtp.
Which scripting language used by quicktest professional (qtp)?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
how can i pass a "cript"as a parameter in to a function
How to remove associated function library?
What are the benefits of qtp?
How you create new action in qtp?
Discuss the QTP Environment?