public class ListBox extends DesktopElement
Constructor and Description |
---|
ListBox(org.openqa.selenium.WebElement element) |
Modifier and Type | Method and Description |
---|---|
ListBoxItem |
addToSelection(int index)
Add a row to the selection by index.
|
ListBoxItem |
addToSelection(String text)
Add a row to the selection by text.
|
List<ListBoxItem> |
items()
Returns all the list box items
|
ListBoxItem |
removeFromSelection(int index)
Remove a row from the selection by index.
|
ListBoxItem |
removeFromSelection(String text)
Remove a row from the selection by text.
|
ListBoxItem |
select(int index)
Selects an item by index.
|
ListBoxItem |
select(String text)
Selects an item by text.
|
ListBoxItem |
selectedItem()
Gets the first selected item or null otherwise.
|
List<ListBoxItem> |
selectedItems()
Gets all selected items.
|
callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callVoidCommand, createLocalDateTimeFromResponse, createRemoteWebElementFromResponse, createRemoteWebElementsFromResponse, exe, getActiveWindow, getName, parseDateTime, parseDouble
clear, click, equals, execute, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getAttribute, getCoordinates, getCssValue, getId, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, submit, toJson, toString
public List<ListBoxItem> items()
public List<ListBoxItem> selectedItems()
public ListBoxItem selectedItem()
public ListBoxItem select(int index)
index
- public ListBoxItem select(String text)
text
- public ListBoxItem addToSelection(int index)
index
- public ListBoxItem addToSelection(String text)
text
- public ListBoxItem removeFromSelection(int index)
index
- public ListBoxItem removeFromSelection(String text)
text
- Copyright © 2021. All rights reserved.