Class ListBoxTester
-
- All Implemented Interfaces:
-
com.vaadin.browserless.Clickable
public class ListBoxTester<T extends ListBox<V>, V> extends ComponentTester<T>
Tester for ListBox components.
- Since:
1.0
-
-
Constructor Summary
Constructors Constructor Description ListBoxTester(T component)Wrap given component for testing.
-
Method Summary
Modifier and Type Method Description VgetSelected()Get the currently selected item. voidselectItem(String selection)Select item by client string representation. List<String>getSuggestions()Get available items as String representations sent to the client. List<V>getSuggestionItems()Get the actual items for the dropdown as a List. -
Methods inherited from class com.vaadin.browserless.ComponentTester
ensureComponentIsUsable, find, getComponent, isUsable, setModal -
Methods inherited from class com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClick -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ListBoxTester
ListBoxTester(T component)
Wrap given component for testing.
- Parameters:
component- target component
-
-
Method Detail
-
getSelected
V getSelected()
Get the currently selected item.
- Returns:
current selection
-
selectItem
void selectItem(String selection)
Select item by client string representation.
- Parameters:
selection- item representation string
-
getSuggestions
List<String> getSuggestions()
Get available items as String representations sent to the client. Any filter that is set is taken into account.
- Returns:
List of item representation strings
-
getSuggestionItems
List<V> getSuggestionItems()
Get the actual items for the dropdown as a List. Any filter that is set is taken into account.
- Returns:
List of items
-
-
-
-