public class ComboBox extends DesktopElement
Constructor and Description |
---|
ComboBox(org.openqa.selenium.WebElement element) |
Modifier and Type | Method and Description |
---|---|
void |
collapse()
Collapses the element.
|
String |
editableText()
The text of the editable element inside the combobox.
|
void |
expand()
Expands the element.
|
ExpandCollapseState |
expandCollapseState()
Gets the ExpandCollapseState of the element.
|
boolean |
isEditable()
Flag which indicates, if the combobox is editable or not.
|
boolean |
isReadOnly()
Flag which indicates, if the combobox is read-only or not.
|
List<ComboBoxItem> |
items()
Gets all items.
|
ComboBoxItem |
select(String value)
Select the first item which matches the given text.
|
ComboBoxItem |
selectedItem()
Gets the first selected item or null otherwise.
|
List<ComboBoxItem> |
selectedItems()
Gets all selected items.
|
ComboBoxItem |
selectIndex(int index)
Select an item by index.
|
void |
setEditableText(String value)
Set the text of the editable element inside the combobox.
|
String |
value() |
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 void collapse()
public void expand()
public ComboBoxItem select(String value)
value
- The text to search for.public ComboBoxItem selectIndex(int index)
index
- The index to search for.public void setEditableText(String value)
public boolean isEditable()
public boolean isReadOnly()
public String value()
public ComboBoxItem selectedItem()
public List<ComboBoxItem> selectedItems()
public List<ComboBoxItem> items()
public ExpandCollapseState expandCollapseState()
public String editableText()
Copyright © 2021. All rights reserved.