Class NeoAutocompleteField
java.lang.Object
com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
com.onenetwork.platform.tools.test.ui.neo.components.NeoTextField
com.onenetwork.platform.tools.test.ui.neo.components.NeoAutocompleteField
public class NeoAutocompleteField extends NeoTextField
This field represents the AutocompleteFeild react Component
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPONENT_NAME
protected org.openqa.selenium.WebElement
textElement
Fields inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
context, driver, element
-
Constructor Summary
Constructors Constructor Description NeoAutocompleteField(NeoUIContext context, org.openqa.selenium.WebElement el)
-
Method Summary
Modifier and Type Method Description void
clearAllItems()
void
clearItem(boolean clearAll, java.lang.String... inputValues)
To clear all values set clearAll param as true To clear individual selected valued, set clearAll param as false and pass String values for items to be removed Clear All to be passed true only for fields that allow Multiple values.void
clearItem(java.lang.String inputValue)
java.util.List<java.lang.String>
getValues()
Used to get all selected value from the autocomplete field.boolean
isAutoCompleteEnabled()
java.util.List<java.lang.String>
listAllValues(java.lang.String wildCardValue, boolean returnNullIfNoneFound)
This method lists all the values in the auto-complete list and returns null if the value of returnNullIfNoneFound is true and emptyArrayList
if there are no matches found.void
setValue(java.lang.String inputValue)
overrides the super setValue method to allow for value selection from dropdown menu list.void
setValue(java.lang.String... autoCompVal)
This method selects the first value from dropdown list matching the input autoCompVal and does it repeatedly for all the supplied input valuesvoid
setValueInexact(java.lang.String value)
void
setWildCardValue(java.lang.String inputValue)
Sets the attribute value directly for the textElement To be used only in case when the field allows wildcards and exact value needs to be set supplied This also prevents the drop down menu from popping upMethods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoTextField
clear, getFieldLabelElement, getValue
Methods inherited from class com.onenetwork.platform.tools.test.ui.neo.components.NeoComponent
getEl, getFieldErrorMessage, getTooltipMessage, isDisplayed, setMultipleValues
-
Field Details
-
COMPONENT_NAME
public static final java.lang.String COMPONENT_NAME- See Also:
- Constant Field Values
-
textElement
protected org.openqa.selenium.WebElement textElement
-
-
Constructor Details
-
Method Details
-
setValue
public void setValue(java.lang.String... autoCompVal)This method selects the first value from dropdown list matching the input autoCompVal and does it repeatedly for all the supplied input values- Parameters:
autoCompVal
-
-
setValue
public void setValue(java.lang.String inputValue)overrides the super setValue method to allow for value selection from dropdown menu list. Always selects the first value in the list.- Overrides:
setValue
in classNeoTextField
- See Also:
NeoTextField.setValue(java.lang.String)
-
getValues
public java.util.List<java.lang.String> getValues()Used to get all selected value from the autocomplete field. if no values were selected then it will return the empty list.- Returns:
- List
-
clearItem
public void clearItem(boolean clearAll, java.lang.String... inputValues)To clear all values set clearAll param as true To clear individual selected valued, set clearAll param as false and pass String values for items to be removed Clear All to be passed true only for fields that allow Multiple values. For single select fields or fields that allow wildcards, the individual item names to be paased.- Parameters:
clearAll
-inputValues
-
-
clearItem
public void clearItem(java.lang.String inputValue) -
clearAllItems
public void clearAllItems() -
setWildCardValue
public void setWildCardValue(java.lang.String inputValue)Sets the attribute value directly for the textElement To be used only in case when the field allows wildcards and exact value needs to be set supplied This also prevents the drop down menu from popping up- Parameters:
inputValue
-
-
setValueInexact
public void setValueInexact(java.lang.String value) -
isAutoCompleteEnabled
public boolean isAutoCompleteEnabled() -
listAllValues
public java.util.List<java.lang.String> listAllValues(java.lang.String wildCardValue, boolean returnNullIfNoneFound)This method lists all the values in the auto-complete list and returns null if the value of returnNullIfNoneFound is true and emptyArrayList
if there are no matches found. After populating all the values, it clears the supplied value from the text field- Parameters:
wildCardValue
-returnNullIfNoneFound
-- Returns:
-