Package FlaNium.WinAPI.elements
Class ListBox
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebElement
-
- FlaNium.WinAPI.DesktopElement
-
- FlaNium.WinAPI.elements.ListBox
-
- All Implemented Interfaces:
org.openqa.selenium.interactions.Locatable,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsDriver
public class ListBox extends DesktopElement
-
-
Constructor Summary
Constructors Constructor Description ListBox(org.openqa.selenium.WebElement element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListBoxItemaddToSelection(int index)Add a row to the selection by index.ListBoxItemaddToSelection(String text)Add a row to the selection by text.List<ListBoxItem>items()Returns all the list box itemsListBoxItemremoveFromSelection(int index)Remove a row from the selection by index.ListBoxItemremoveFromSelection(String text)Remove a row from the selection by text.ListBoxItemselect(int index)Selects an item by index.ListBoxItemselect(String text)Selects an item by text.ListBoxItemselectedItem()Gets the first selected item or null otherwise.List<ListBoxItem>selectedItems()Gets all selected items.-
Methods inherited from class FlaNium.WinAPI.DesktopElement
callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callVoidCommand, castTo, createLocalDateTimeFromResponse, createRemoteWebElementFromResponse, createRemoteWebElementsFromResponse, exe, execute, getActiveWindow, getAttribute, getElementRect, getName, mouseActions, parseDateTime, parseDouble, screenshotActions, setAsRootElement, toCoordinateElement, touchActions
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebElement
clear, click, equals, execute, findElement, findElement, findElements, findElements, getAccessibleName, getAriaRole, getCoordinates, getCssValue, getDomAttribute, getDomProperty, getId, getLocation, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, submit, toJson, toString
-
-
-
-
Method Detail
-
items
public List<ListBoxItem> items()
Returns all the list box items- Returns:
-
selectedItems
public List<ListBoxItem> selectedItems()
Gets all selected items.- Returns:
-
selectedItem
public ListBoxItem selectedItem()
Gets the first selected item or null otherwise.- Returns:
-
select
public ListBoxItem select(int index)
Selects an item by index.- Parameters:
index-- Returns:
-
select
public ListBoxItem select(String text)
Selects an item by text.- Parameters:
text-- Returns:
-
addToSelection
public ListBoxItem addToSelection(int index)
Add a row to the selection by index.- Parameters:
index-- Returns:
-
addToSelection
public ListBoxItem addToSelection(String text)
Add a row to the selection by text.- Parameters:
text-- Returns:
-
removeFromSelection
public ListBoxItem removeFromSelection(int index)
Remove a row from the selection by index.- Parameters:
index-- Returns:
-
removeFromSelection
public ListBoxItem removeFromSelection(String text)
Remove a row from the selection by text.- Parameters:
text-- Returns:
-
-