public class SelectElement extends TestBenchElement implements HasSelectByText, HasLabel, HasPlaceholder
Modifier and Type | Class and Description |
---|---|
static class |
SelectElement.ItemElement |
Constructor and Description |
---|
SelectElement() |
Modifier and Type | Method and Description |
---|---|
void |
closePopup()
Closes the popup with options, if it is open.
|
List<SelectElement.ItemElement> |
getItems() |
Stream<SelectElement.ItemElement> |
getItemsStream() |
SelectElement.ItemElement |
getSelectedItem() |
SelectElement.ItemElement |
getSelectedOptionItem() |
String |
getSelectedText()
Gets the text of the currently selected option.
|
boolean |
isOpened() |
void |
openPopup()
Opens the popup with options, if it is not already open.
|
void |
selectByText(String text)
Selects the first option matching the given text.
|
void |
selectItemByIndex(int index) |
callFunction, clear, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isIE, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getPlaceholder
getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, setProperty, setProperty, setProperty, setProperty
clear, click, findElement, findElements, getAttribute, getCssValue, getLocation, getRect, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submit
$, $
public void openPopup()
public void closePopup()
public boolean isOpened()
public void selectItemByIndex(int index)
public Stream<SelectElement.ItemElement> getItemsStream()
public List<SelectElement.ItemElement> getItems()
public void selectByText(String text)
HasSelectByText
selectByText
in interface HasSelectByText
text
- the text of the option to selectpublic String getSelectedText()
HasSelectByText
getSelectedText
in interface HasSelectByText
public SelectElement.ItemElement getSelectedOptionItem()
public SelectElement.ItemElement getSelectedItem()
Copyright © 2019. All rights reserved.