Package io.fluentlenium.core.action
Class FillSelect<E extends FluentWebElement>
java.lang.Object
io.fluentlenium.core.action.BaseFill<E>
io.fluentlenium.core.action.FillSelect<E>
- Type Parameters:
E
- type of element to fill
Provides functionality to select values in
<select>
elements.
Documentation can also be found at the FluentLenium website at Locators / Filling Forms.
-
Constructor Summary
ConstructorDescriptionFillSelect
(E element) Creates a new fill from a single element.FillSelect
(FluentList<E> list) Creates a new fill from a list of elements. -
Method Summary
Modifier and TypeMethodDescriptionprotected FluentList<E>
Excludes elements that don't have a tag name or their tag name is notselect
, so that elements with onlyselect
tags are tried to be filled.withIndex
(int index) Select an option by its index for the Select element.Select all options that display text matching the argument for the Select element.Select all options that have a value matching the argument for the Select element.
-
Constructor Details
-
FillSelect
Creates a new fill from a list of elements.- Parameters:
list
- list of elements to fill
-
FillSelect
Creates a new fill from a single element.- Parameters:
element
- element to fill
-
-
Method Details
-
getElements
Excludes elements that don't have a tag name or their tag name is notselect
, so that elements with onlyselect
tags are tried to be filled.- Overrides:
getElements
in classBaseFill<E extends FluentWebElement>
- Returns:
- list of elements
-
withIndex
Select an option by its index for the Select element.- Parameters:
index
- the select index value- Returns:
- this FillSelect instance
- Throws:
org.openqa.selenium.NoSuchElementException
- if no select element is found
-
withValue
Select all options that have a value matching the argument for the Select element.- Parameters:
value
- the value to select by- Returns:
- this FillSelect instance
- Throws:
org.openqa.selenium.NoSuchElementException
- if no select element is found
-
withText
Select all options that display text matching the argument for the Select element.- Parameters:
text
- the visible text to select by- Returns:
- this FillSelect instance
- Throws:
org.openqa.selenium.NoSuchElementException
- if no select element is found
-