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

Write a program to resize an array of 5 elements to 4 elements and display all the elements.

1 Answers  


How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?

1 Answers  


how to find number of characters(letter a) in the sentence Rain Rain Go away

4 Answers  


Which function is used to perform string comparison?

0 Answers  


What is the technology used by vb script?

0 Answers  






i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false

0 Answers  


How will you check that a variable is an array in vbscript?

0 Answers  


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

0 Answers   CSC,


How will you format a number in percetage format in vbscript?

0 Answers  


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

0 Answers  


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


What purpose does ‘on error resume next’ serves?

0 Answers  


Categories