Facebook

Course Name Start Date Time Duration Registration Link
No Training Programs Scheduled ClickHere to Contact
Please mail To sudhakar@qtpsudhakar.com to Register for any training

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