'checking for a particular item in the list box and select it
var_SearchItem = "Hyderabad"
var_ItemsCount = Browser("MonsterIndia.com - More").Page("MonsterIndia.com - More").WebList("loc").GetROProperty("items count")
For i =1 to var_ItemsCount
var_Item = Browser("MonsterIndia.com - More").Page("MonsterIndia.com - More").WebList("loc").GetItem(i)
If ucase(var_SearchItem) = ucase(var_Item) Then
msgbox "found"
Exit for
End If
Next
Note:
While selecting an item from a list box the index starts from 0
and while getting an item from a list box the index starts from 1
Browser("MonsterIndia.com - More").Page("MonsterIndia.com - More").WebList("loc").Select i-1
'some of the important properties of the list object
items count
selected item index
all items
selected items count
value : selected item value
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment