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
Answer / satyanj
check whether you have stored the Browser and Page objects
in OR.
Is This Answer Correct ? | 1 Yes | 0 No |
Mention the rules for using option explicit statement?
What is the differene between QTP 8.2 and QTP 9.0 and QTP 9.1,Pls give me answer ASAP.
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
How will you convert a given number to long in vbscript?
Which constant is used for print and display functions and works as same as pressing enter key?
What is difference between vbscript and vba?
Explain the adodb.stream class?
a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?
What is variant in vb script?
What is the extension of the vbscript file?
What is the difference between for loop and while loop?
My questions is while writting descriptve programming, lets take flight reservation. Line1: systemutil.Run "D:\Program Files\Mercury Interactive\QuickTestProfessional\samples\flight\app\flight4 a.exe" dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "mercury" dialog("text:=Login").WinEdit("attached text:=Password:").Set "mercury" dialog("text:=Login").WinButton("text:=OK").click window("text:=Flight Reservation").Activate window("text:=Flight Reservation").ActiveX ("acx_name:=MaskEdBox").Type "111111" window("text:=Flight Reservation").WinComboBox("attached text:=Fly From:").Select "Frankfurt" window("text:=Flight Reservation").WinComboBox("attached text:=Fly To:").Select "London" window("text:=Flight Reservation").WinButton ("text:=FLIGHT").Click window("text:=Flight Reservation").dialog("text:=Flights Table").WinList("text:=From").Select "13536 FRA 08.00AM LON 08.45AM SR $163.00" window("text:=Flight Reservation").dialog("text:=Flights Table").WinButton("text:=OK").Click window("text:=Flight Reservation").WinEdit("attached text:=Name:").Exist window("text:=Flight Reservation").WinEdit("attached text:=Name:").Set "sagar", Now i m getting the error in the last line. it is not accepting the WinEdit("attached text:=Name:") Please do solve this urgent...! and i want to know how to insert additional properties for an object and which properties we need to select from the object spy.