DomListBox
Returns the index of an item in the list box.
This functionality is supported only if you are using the Open Agent.
iIndex = list.FindItem(sItem)
| Variable | Description |
|---|---|
| iIndex | The item index. INTEGER. |
| sItem | The item to find. STRING. |
If the item sItem is not found, FindItem returns zero (0).
To find the index of the item with the name "Lookup" from the list box "MyDomListBox":
// Find the DomListBox in question
window w = Desktop.Find("/BrowserApplication//BrowserWindow//SELECT[@id='MyDomListBox']")
// Find the index of the item
INTEGER iIndex = w.FindItem("Lookup")