Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What are the types of properties that quick test learns while recording?

976


How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined

1902


What is use of object spy?

1027


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

2452


When ‘option explicit’ keyword is used in qtp?

1201


how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0

1839


Is it possible to split an action? How?

1050


Explain object spy in qtp.

1010


Which scripting language used by quicktest professional (qtp)?

1095


How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?

1856


how can i pass a "cript"as a parameter in to a function

1931


How to remove associated function library?

939


What are the benefits of qtp?

1056


How you create new action in qtp?

1071


Discuss the QTP Environment?

1001