How to find the ordinal position of an item in weblist without using array or instr function.ex:assume i have 5 items in weblist like US,UK,INDIA,CANADA,FRANCE.I want to know position of UK IN list

Showing Answers 1 - 3 of 3 Answers

ExpectedItem = "UK"

WebListItemCount = Browser(....).Page(...).WebList(...).GetROProperty("items count")

For i = 0 To (WebListItemCount - 1)

ItemFromList = Browser(....).Page(...).WebList(...).GetItem(i)

If ExpectedItem = ItemFromList Then
    MsgBox ExpectedItem & "position is " &(i+1)
End If
Next

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions