Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
New Schedule in MindQ Systems, Madhapur By SUDHAKAR
Course Name Date Time Duration Type Branch
UFT + UFTPro 20th September 2017 7.30 AM - 9.00 AM IST 25Days Classroom + Online Hitech City
Selenium+Appium 4th October 2017 4.30 PM - 6.00 PM IST 40Days Online -

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Monday, May 4, 2009

ListBox Object


The default method for List box is "Select".
Ex:-
Browser("Mercury Tours").Page("Find Flights").WebList("depart").Select "London"
Can we do anything more with ListBox?
1. Selecting more items in a list
2. Get all items from a list
'Selecting more items in a list
 
Browser("Mercury Tours").Page("Find Flights").WebList("depart").Select "London"
Browser("Mercury Tours").Page("Find Flights").WebList("depart"). ExtendSelect "Paris"
'Select is to select single item in a list box
'ExtendSelect is to select more than one item after selecting an item in list box using select method
'Get all items from a list
 
Dim iCount
Dim iIndex
iCount=Browser("Countrywide").Page("Countrywide").WebList("LoanType").GetROProperty("items count")
For iIndex=1 to iCount
msgbox Browser("Countrywide").Page("Countrywide").WebList("LoanType").GetItem(iIndex)
Next

1 comment :

  1. How to Remove the Duplicate value in List box list using vb script.. plz tel

    ReplyDelete