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

What is the use of the date function in the vbscript language?

0 Answers  


How can I write HTML text to the window in VB Script?

2 Answers  


Hi all..I have two values. a=20 ,b=30 I want to perform c= a+b and c= a*b using user define function.please anyone give the answer

1 Answers  


What if you do not specify anything when you call a procedure?

0 Answers  


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

0 Answers  


Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex

2 Answers  


write a vb script to display factorial of a number using function

1 Answers  


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

0 Answers  


what do you mean .ota mobile format

0 Answers  


what is visual basic?

2 Answers   Seion Infotech,


I need help to write a function in vbscript to click on a link. That link looks like a tab. There are 6 tabs. When I click on 1 tab it should show as "on". when I spy the class property is on. But for the one which is not clicked the class property is blank. I have objects created in our custom object repository. Please give me some idea.

1 Answers  


What are events in the vbscript language?

0 Answers  


Categories