Class AutoComplete

  • All Implemented Interfaces:
    org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

    public abstract class AutoComplete
    extends AbstractInputComponent
    Component wrapper for the PrimeFaces p:autoComplete.
    • Constructor Detail

      • AutoComplete

        public AutoComplete()
    • Method Detail

      • getItems

        public org.openqa.selenium.WebElement getItems()
      • getItemValues

        public List<String> getItemValues()
      • getPanel

        public org.openqa.selenium.WebElement getPanel()
      • getDropDownButton

        public org.openqa.selenium.WebElement getDropDownButton()
      • getValue

        public String getValue()
      • isClearAjaxified

        public boolean isClearAjaxified()
        Is the input using AJAX "clear" event?
        Returns:
        true if using AJAX for clear
      • isItemSelectAjaxified

        public boolean isItemSelectAjaxified()
        Is the input using AJAX "itemSelect" event?
        Returns:
        true if using AJAX for itemSelect
      • isItemUnselectAjaxified

        public boolean isItemUnselectAjaxified()
        Is the input using AJAX "itemUnselect" event?
        Returns:
        true if using AJAX for itemUnselect
      • isQueryAjaxified

        public boolean isQueryAjaxified()
        Is the input using AJAX "query" event?
        Returns:
        true if using AJAX for query
      • getValues

        public List<String> getValues()
        If using multiple mode gets the values of the tokens.
        Returns:
        the values in a list
      • getTokens

        public List<org.openqa.selenium.WebElement> getTokens()
        Gets the actual token elements in mutliple mode.
        Returns:
        the List of tokens
      • setValue

        public void setValue​(String value)
        Sets the value and presses tab afterwards. Attention: Pressing tab selects the first suggested value.
        Parameters:
        value - the value to set
      • setValueWithoutTab

        public int setValueWithoutTab​(Serializable value)
        Sets the value without pressing tab afterwards.
        Parameters:
        value - the value to set
        Returns:
        the delay in milliseconds
      • sendTabKey

        public void sendTabKey()
        Sends the Tab-Key to jump to the next input. Attention: Pressing tab selects the first suggested value.
      • clear

        public void clear()
        Clears the Autocomplete input and guards AJAX for "clear" event.
        Specified by:
        clear in interface org.openqa.selenium.WebElement
        Overrides:
        clear in class AbstractInputComponent
      • wait4Panel

        public void wait4Panel()
        Waits until the AutoComplete-Panel containing the suggestions shows up. (eg after typing)
      • show

        public void show()
        Shows the AutoComplete-Panel.
      • hide

        public void hide()
        Hides the AutoComplete-Panel.
      • activate

        public void activate()
        Activates search behavior
      • deactivate

        public void deactivate()
        Deactivates search behavior
      • addItem

        public void addItem​(String item)
        Adds an item to the input field. Especially useful in 'multiple' mode.
        Parameters:
        item - the item to add to the tokens
      • removeItem

        public void removeItem​(String item)
        Removes an item from the input field. Especially useful in 'multiple' mode.
        Parameters:
        item - the item to remove from the tokens
      • search

        public void search​(String value)
        Execute the AutoComplete search.
        Parameters:
        value - the search to execute
      • getDelay

        public int getDelay()
        Delay to wait in milliseconds before sending each query to the server.
        Returns:
        Delay in milliseconds.