Class AutocompleteField
java.lang.Object
com.onenetwork.platform.tools.test.ui.components.Component
com.onenetwork.platform.tools.test.ui.components.TextField
com.onenetwork.platform.tools.test.ui.components.AutocompleteField
public class AutocompleteField extends TextField
Represents an instance of
One.form.AutocompleteField.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AutocompleteField(UIContext context, org.openqa.selenium.WebElement formItemEl)
-
Method Summary
Modifier and Type Method Description int
getFilteredItemsCount()
Gets number of visible filtered itemsjava.util.List<java.lang.String>
getFilteredItemsList()
Gets list of items filtered by user inputvoid
setValue(java.lang.String val)
Sets the value in the input Element with the supplied parameter value.org.openqa.selenium.WebElement
submitSelectedItem()
Submits selected item and returns itsWebElement
void
type(java.lang.String val)
Types in value into autocomplete text boxMethods inherited from class com.onenetwork.platform.tools.test.ui.components.TextField
callSetValue, clear, getId, getInputEl, getValue, isUsingNativeClick, setUseNativeClick, typeValue
Methods inherited from class com.onenetwork.platform.tools.test.ui.components.Component
getEl, isDisplayed, isRequired
-
Constructor Details
-
Method Details
-
setValue
public void setValue(java.lang.String val)Description copied from class:TextField
Sets the value in the input Element with the supplied parameter value.- Overrides:
setValue
in classTextField
- See Also:
TextField.setValue(java.lang.String)
-
type
public void type(java.lang.String val)Types in value into autocomplete text box- Parameters:
val
- value to type in
-
getFilteredItemsList
public final java.util.List<java.lang.String> getFilteredItemsList()Gets list of items filtered by user input- Returns:
- list of item strings
-
submitSelectedItem
public org.openqa.selenium.WebElement submitSelectedItem()Submits selected item and returns itsWebElement
- Returns:
WebElement
of selected item if found, otherwisenull
-
getFilteredItemsCount
public int getFilteredItemsCount()Gets number of visible filtered items- Returns:
- number of visible filtered items
-