public class DomListBox extends DomElement
Modifier | Constructor and Description |
---|---|
protected |
DomListBox(JtfObjectHandle handle,
Desktop desktop)
Creates a new DomListBox with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount()
Gets the number of items in the listbox.
|
List<ItemIdentifier> |
getItems()
Gets the list of items in the listbox.
|
List<Integer> |
getSelectedIndices()
Gets the indices of the selected item(s).
|
List<ItemIdentifier> |
getSelectedItems()
Gets the names of the selected item(s).
|
boolean |
isAllowsMultiSelect()
Gets whether the control is multiselectable.
|
void |
multiSelect(List<ItemIdentifier> items)
Selects a list of items.
|
void |
select(int itemIndex)
Selects an item.
|
void |
select(ItemIdentifier item)
Selects an item.
|
void |
select(String itemText)
Selects an item.
|
void |
setAllowsMultiSelect(boolean allowsMultiSelect)
Sets whether the control is multiselectable.
|
void |
setSelectedIndices(List<Integer> selectedIndices)
Sets the indices of the selected item(s).
|
void |
setSelectedItems(List<ItemIdentifier> selectedItems)
Sets the names of the selected item(s).
|
void |
unselect(int itemIndex)
Unselects an item.
|
void |
unselect(ItemIdentifier item)
Unselects an item.
|
void |
unselect(String itemText)
Unselects an item.
|
domClick, domClick, domClick, domDoubleClick, domDoubleClick, domDoubleClick, domDoubleClick, domMouseMove, domMouseMove, executeJavaScript, executeJavaScript, getCssStyle, getDomAttribute, getDomAttributeList, getDomAttributeList, getHtmlRect, getText, highlight, scrollIntoView, setDomAttribute, unhighlight
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, isVisible, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected DomListBox(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the DomListBoxdesktop
- the desktop on which this object livespublic void multiSelect(List<ItemIdentifier> items)
items
- the items to selectpublic void select(ItemIdentifier item)
item
- the item to selectpublic void select(String itemText)
itemText
- the item to selectpublic void select(int itemIndex)
itemIndex
- the item to selectpublic void unselect(ItemIdentifier item)
item
- the item to unselectpublic void unselect(String itemText)
itemText
- the item to unselectpublic void unselect(int itemIndex)
itemIndex
- the item to unselectpublic boolean isAllowsMultiSelect()
public void setAllowsMultiSelect(boolean allowsMultiSelect)
allowsMultiSelect
- whether the control is multiselectablepublic int getItemCount()
public List<ItemIdentifier> getItems()
In Silk Test 14.0 or later, whitespace in the list is trimmed consistently across all supported browsers. For some browser versions, this whitespace handling differs to Silk Test versions prior to Silk Test 13.5. You can re-enable the old behavior by setting the OPT_COMPATIBILITY option to a version lower than 13.5.0.
public List<Integer> getSelectedIndices()
public void setSelectedIndices(List<Integer> selectedIndices)
selectedIndices
- the indices of the selected item(s)public List<ItemIdentifier> getSelectedItems()
public void setSelectedItems(List<ItemIdentifier> selectedItems)
selectedItems
- the names of the selected item(s)Copyright 2009-2012 Micro Focus. All Rights Reserved.