DomListBox
Returns the text of the selected item in the list.
This functionality is supported only if you are using the Open Agent.
sText = list.GetSelText( )
Variable | Description |
---|---|
sText | The text of the selected item. STRING. |
GetSelText returns the text of the selected item in the list. If nothing is selected, GetSelText returns an empty string (""). If the item selected contains no text or is graphical, GetSelText returns a pound sign (#) followed by the index number of the item.
To get the text of the selected item with from the list box "MyDomListBox":
// Find the DomListBox in question window w = Desktop.Find("/BrowserApplication//BrowserWindow//SELECT[@id='MyDomListBox']") STRING sSelected = w.GetSelText()