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 vbscript procedures?
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
Is vbscript a case-sensitive or case-insensitive?
best training centre in bangalore
how to genarate a random numbers in vb?
write a vb script to generate the following pattern ***** **** *** ** *
What is the difference between vb debugger and the script debugger?
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
How to write a general script which should does the following a). If a page object is given, it should identify the page object of the corresponding page(site). b). It should identify all the links of that particular page. in QTP tool?
2 Answers IBM, Infosys, Wipro,
What are the environments supported by vbscript language?
Join the multiple array with out using JOIN function
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?