i have developed the below QTP script to count the no of
items available in the web list "Select a product" in
www.bankrate.com and also want to print what are the
items??? can any one help me to rectify the below script???
SystemUtil.Run "iexplore.exe","www.bankrate.com"
a=Browser("title:=Mortgage Rates Credit Cards Refinance
Home CD Rates by Bankrate.com").page("title:=Mortgage Rates
Credit Cards Refinance Home CD Rates by
Bankrate.com").Weblist("name:=select").GetTOProperty("items
count")
msgbox a
Dim List()
ReDim List(a-1)
For i = 1 To a
List(i-1)=Browser("title:=Mortgage Rates Credit Cards
Refinance Home CD Rates by Bankrate.com").page
("title:=Mortgage Rates Credit Cards Refinance Home CD
Rates by Bankrate.com").Weblist("name:=select").GetItem(i)
Print List(i-1)
Next
Answer / vasanth
Even though i gave you solution, I would like to suggest
you how to debug better in DP.
structure here is
browser>page>webtable>weblist
try to print a property from browser and then page and then
webtable. Rather then trying to get the value from your
last element.Example
a=Browser("title:=Mortgage Rates Credit
Cards.*").getROproperty("name")
msgbox a
and next check page
a=Browser("title:=Mortgage Rates Credit Cards.*").page
("title:=Mortgage Rates Credit Cards Refinance Home.*")
getROproperty("url")
msgbox a
In this way you will know when do you have problem in the
structure. I hope this helps you debug more of DP problem.
have a nice one.
Here is correct script,
SystemUtil.Run "iexplore.exe","www.bankrate.com"
a=Browser("title:=Mortgage Rates Credit Cards.*").page
("title:=Mortgage Rates Credit Cards Refinance
Home.*").WebTable("name:=select","text:=2.Select a
product: 30 year fixed 15 year fixed 5/1 ARM.*").Weblist
("name:=select","html
id:=selProductTypePurchase").GetROProperty("items count")
msgbox a
Dim List()
ReDim List(a-1)
For i = 1 To a
List(i-1)=Browser("title:=Mortgage Rates Credit
Cards.*").page("title:=Mortgage Rates Credit Cards
Refinance Home.*").WebTable("name:=select","text:=2.Select
a product: 30 year fixed 15 year fixed 5/1 ARM.*").Weblist
("name:=select","html id:=selProductTypePurchase").GetItem
(i)
Print List(i-1)
Next
Is This Answer Correct ? | 0 Yes | 0 No |
what is event handling?
How can you create a file object to work with the files in the vbscript language?
How to check the particular window is exist or not with out using check points
Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript
i have developed the below QTP script to count the no of items available in the web list "Select a product" in www.bankrate.com and also want to print what are the items??? can any one help me to rectify the below script??? SystemUtil.Run "iexplore.exe","www.bankrate.com" a=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetTOProperty("items count") msgbox a Dim List() ReDim List(a-1) For i = 1 To a List(i-1)=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page ("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetItem(i) Print List(i-1) Next
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
Which operator is used to perform the comparison among 2 operands in the vbscript language?
accept an email id & validate it .email id should not exceed 25 characters the mail id should contain 3 characters excluding domain name,@ and .(dot) the last 3 characters of the domain should be net,com or org
How to find arry size in qtp vb script
how to find greatest of n numbers!