Package com.hp.lft.sdk.web
Interface ListBox
- All Superinterfaces:
Clickable
,EnabledProvider
,LocationInfoProvider
,SupportDragAndDrop
,SupportsNativeObject
,TestObject
,TestObjectDescriber
,VisibleProvider
,WaitUntilEnabledProvider
,WaitUntilVisibleProvider
,WebElement
,WebTestObject
,WebTestObjectDescriber
A Web drop-down box or multiple selection list.
HTML example:
<select name="select">
<option value="value1"> Value 1</option>
<option value="value2" selected> Value 2</option>
<option value="value3> Value 3</option>
</select>
HTML example:
<select name="select">
<option value="value1"> Value 1</option>
<option value="value2" selected> Value 2</option>
<option value="value3> Value 3</option>
</select>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deselect
(int... itemIndices) Deselects items in the list based on the item indices.void
Deselects a list of items in the list box.void
Deselects items in the list based on the item names.void
extendSelect
(int... itemIndices) Selects additional items from the multi-selection list, by index.void
extendSelect
(ListItem... items) Selects additional items from the multi-selection list, by ListItem item.void
extendSelect
(String... items) Selects additional items from the multi-selection list, by name.Returns the initial text value, which is set when the object is reset.Returns an item with the given text.getItems()
Returns all of the items in the list.Returns a collection of all selected items.getType()
Returns the attribute "type" of the HTML element.getValue()
Returns this object's text value.int
Returns the number of items that are displayed in the list box.boolean
Indicates whether the user can select multiple items.void
select
(int... itemIndices) Selects items in the list based on the item indices.void
Selects a list of items in the list box.void
Selects items in the list based on the item names.Methods inherited from interface com.hp.lft.sdk.EnabledProvider
isEnabled
Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider
getAbsoluteLocation, getLocation, getSize
Methods inherited from interface com.hp.lft.sdk.SupportDragAndDrop
dragAndDropOn, dragAndDropOn
Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject
getNativeObject
Methods inherited from interface com.hp.lft.sdk.TestObject
callFTMethod, callFTMethod, exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists
Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber
describe
Methods inherited from interface com.hp.lft.sdk.WaitUntilEnabledProvider
waitUntilEnabled, waitUntilEnabled
Methods inherited from interface com.hp.lft.sdk.WaitUntilVisibleProvider
waitUntilVisible, waitUntilVisible
Methods inherited from interface com.hp.lft.sdk.web.WebElement
doubleClick, doubleClick, fireEvent, getAccessibilityName, getCSSSelector, getRole, getXPath, hoverTap, hoverTap, longPress, longPress, pan, pan, pinch, pinch, swipe, swipe
Methods inherited from interface com.hp.lft.sdk.web.WebTestObject
getAttribute, getAttributes, getClassName, getComputedStyle, getComputedStyles, getId, getInnerHTML, getInnerText, getName, getOuterHTML, getOuterText, getTagName, getTitle, isVisible
Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber
describe, describe
-
Method Details
-
getValue
Returns this object's text value.- Returns:
- this object's text value.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getDefaultValue
Returns the initial text value, which is set when the object is reset.- Returns:
- the initial text value, which is set when the object is reset.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
isMultiple
Indicates whether the user can select multiple items.- Returns:
- true, if the user can select multiple items.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getVisibleItemsCount
Returns the number of items that are displayed in the list box.- Returns:
- the number of items that are displayed in the list box.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getItems
Returns all of the items in the list.- Returns:
- all of the items in the list.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getSelectedItems
Returns a collection of all selected items.- Returns:
- a collection of all selected items.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
extendSelect
Selects additional items from the multi-selection list, by name.- Parameters:
items
- the texts of the items to add to the selection.- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
extendSelect
Selects additional items from the multi-selection list, by index.- Parameters:
itemIndices
- the indices of the items to add to the selection.- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
extendSelect
Selects additional items from the multi-selection list, by ListItem item.- Parameters:
items
- the items to add to the selection.- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
select
Selects a list of items in the list box.- Parameters:
items
- the items to select.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
select
Selects items in the list based on the item names.- Parameters:
items
- the texts of the items to select.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
select
Selects items in the list based on the item indices.- Parameters:
itemIndices
- the item indices to select.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
deselect
Deselects a list of items in the list box.- Parameters:
items
- the items to deselect.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
deselect
Deselects items in the list based on the item names.- Parameters:
items
- the texts of the items to deselect.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
deselect
Deselects items in the list based on the item indices.- Parameters:
itemIndices
- the indices of the items to deselect.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getItem
Returns an item with the given text.- Parameters:
text
- the text of this item.- Returns:
- an item with the given text.
-
getType
Returns the attribute "type" of the HTML element.- Returns:
- the attribute "type" of the HTML element.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-