Package FlaNium.WinAPI.elements
Class ComboBox
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebElement
-
- FlaNium.WinAPI.DesktopElement
-
- FlaNium.WinAPI.elements.ComboBox
-
- 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 ComboBox extends DesktopElement
-
-
Constructor Summary
Constructors Constructor Description ComboBox(org.openqa.selenium.WebElement element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollapse()Collapses the element.StringeditableText()The text of the editable element inside the combobox.voidexpand()Expands the element.ExpandCollapseStateexpandCollapseState()Gets the ExpandCollapseState of the element.booleanisEditable()Flag which indicates, if the combobox is editable or not.booleanisReadOnly()Flag which indicates, if the combobox is read-only or not.List<ComboBoxItem>items()Gets all items.ComboBoxItemselect(String value)Select the first item which matches the given text.ComboBoxItemselectedItem()Gets the first selected item or null otherwise.List<ComboBoxItem>selectedItems()Gets all selected items.ComboBoxItemselectIndex(int index)Select an item by index.voidsetEditableText(String value)Set the text of the editable element inside the combobox.Stringvalue()-
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
-
collapse
public void collapse()
Collapses the element.
-
expand
public void expand()
Expands the element.
-
select
public ComboBoxItem select(String value)
Select the first item which matches the given text.- Parameters:
value- The text to search for.- Returns:
- The first found item or null if no item matches.
-
selectIndex
public ComboBoxItem selectIndex(int index)
Select an item by index.- Parameters:
index- The index to search for.- Returns:
- The first found item or null if no item matches.
-
setEditableText
public void setEditableText(String value)
Set the text of the editable element inside the combobox. Only works if the combobox is editable.
-
isEditable
public boolean isEditable()
Flag which indicates, if the combobox is editable or not.
-
isReadOnly
public boolean isReadOnly()
Flag which indicates, if the combobox is read-only or not.
-
value
public String value()
- Returns:
- Selected value.
-
selectedItem
public ComboBoxItem selectedItem()
Gets the first selected item or null otherwise.
-
selectedItems
public List<ComboBoxItem> selectedItems()
Gets all selected items.
-
items
public List<ComboBoxItem> items()
Gets all items.
-
expandCollapseState
public ExpandCollapseState expandCollapseState()
Gets the ExpandCollapseState of the element.
-
editableText
public String editableText()
The text of the editable element inside the combobox. Only works if the combobox is editable.
-
-