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

Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..

10 Answers   Amazon, CSC,


what is the differance between BYVAL,BYREF?

0 Answers  


How can I get the value of an object property or variable in another frame?

1 Answers   Citi Bank,


int a=4857 i need output as 7584.without using any inbuild function?

6 Answers   Aspire,


how to add action through AOM in QTP

0 Answers  






How to generate 3 digit random number?

3 Answers   IBM, Virtusa,


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

0 Answers  


What is vbscript procedures?

0 Answers  


Which operator is used to perform the comparison among 2 operands in the vbscript language?

0 Answers  


input values to accept 2 numbers & print the product, difference and sum using switch case

1 Answers   CSC,


Mention characteristics of sub procedures?

0 Answers  


What is the scope of a constant declared using public?

0 Answers  


Categories