I want to count the total no of links present in yahoo home
page. The script like

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
But while running the script it is fail (the object not
present in the object repository).How to overcome please
tell me the detail steps...for QTP9.30



I want to count the total no of links present in yahoo home page. The script like Set fileSysObj..

Answer / satyanj

check whether you have stored the Browser and Page objects
in OR.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to take whole text output from screen of Bitmap Application.

0 Answers   CitiGroup,


I want to import the sheet from the Excel to the Datatable using VB Script. I used the Syntax as 'Datatable.ImportSheet "Filename","SourceSheet","Destinat ionSheet" Ex: Datatable.ImportSheet "D:\Data1.xls","Sheet1","Global" Qtp producing run time error,How I can solve the problem

1 Answers  


Explain sga memory structures?

0 Answers  


How to remove the spaces in a string Ex: "Welcome to QTPWorld" ?

10 Answers   Cap Gemini, CTS,


compare the string without using stringcomp function?

1 Answers   CSS Corp,






how to acces the remote mechine using vb cript(QTP)

0 Answers   TCS,


write a vb script to add two 2*2 matrix

2 Answers  


How will you get the smallest subscript of an array in vbscript?

0 Answers  


What is loose binding? Why is it not a good practice to use it?

0 Answers  


write a vb script to generate 3*3 matrix

2 Answers  


Explain about the asc function?

0 Answers  


can u test the application without add-in?

1 Answers  


Categories