Package org.xwiki.test.ui.po
Class SuggestInputElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.SuggestInputElement
-
public class SuggestInputElement extends BaseElement
Represents the actions possible on the suggest input widget.- Since:
- 10.6RC1
- Version:
- $Id: 8a9ee8ff08a661a85115aa0840027b371b4689b0 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSuggestInputElement.SuggestionElement
-
Constructor Summary
Constructors Constructor Description SuggestInputElement(org.openqa.selenium.WebElement originalInput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SuggestInputElementclear()Removes the typed text.SuggestInputElementclearSelectedSuggestions()Removes all the selected elements.SuggestInputElementclick()Clicks on the text input.List<SuggestInputElement.SuggestionElement>getSelectedSuggestions()List<SuggestInputElement.SuggestionElement>getSuggestions()List<String>getValues()SuggestInputElementhideSuggestions()Hides the suggestions panel.SuggestInputElementselectByIndex(int index)Selects an element by clicking on the suggestion with the given position.SuggestInputElementselectByValue(String value)Selects an element by clicking on the suggestion with the given value.SuggestInputElementselectByVisibleText(String text)Selects an element by clicking on the suggestion with the given label.SuggestInputElementselectTypedText()Selects and creates an element with the input text.SuggestInputElementsendKeys(CharSequence... keysToSend)Sends the given sequence of keys to the input.SuggestInputElementwaitForSuggestions()Waits until the suggestions have been loaded.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
click
public SuggestInputElement click()
Clicks on the text input.- Returns:
- the current suggest input element
-
clear
public SuggestInputElement clear()
Removes the typed text.- Returns:
- the current suggest input element
-
clearSelectedSuggestions
public SuggestInputElement clearSelectedSuggestions()
Removes all the selected elements.- Returns:
- the current suggest input element
-
sendKeys
public SuggestInputElement sendKeys(CharSequence... keysToSend)
Sends the given sequence of keys to the input.- Returns:
- the current suggest input element
-
waitForSuggestions
public SuggestInputElement waitForSuggestions()
Waits until the suggestions have been loaded.- Returns:
- the current suggest input element
-
getSuggestions
public List<SuggestInputElement.SuggestionElement> getSuggestions()
- Returns:
- a list of all the suggestion elements
-
selectByIndex
public SuggestInputElement selectByIndex(int index)
Selects an element by clicking on the suggestion with the given position.- Returns:
- the current suggest input element
-
selectByValue
public SuggestInputElement selectByValue(String value)
Selects an element by clicking on the suggestion with the given value.- Returns:
- the current suggest input element
-
selectByVisibleText
public SuggestInputElement selectByVisibleText(String text)
Selects an element by clicking on the suggestion with the given label.- Returns:
- the current suggest input element
-
selectTypedText
public SuggestInputElement selectTypedText()
Selects and creates an element with the input text.- Returns:
- the current suggest input element
-
getSelectedSuggestions
public List<SuggestInputElement.SuggestionElement> getSelectedSuggestions()
- Returns:
- list of suggestion elements found in the suggestion panel
-
hideSuggestions
public SuggestInputElement hideSuggestions()
Hides the suggestions panel.- Returns:
- the current suggest input element
-
-