java.lang.Object
com.atlassian.jira.pageobjects.components.fields.MultiSelect
Direct Known Subclasses:
ImmediateMultiSelect, IssuePicker, MultiSelect, NoBrowseUsersUserPicker

public class MultiSelect extends Object
Minimal implementation of a FrotherControl. Constructor takes in the id the frother control is bound to.
Since:
v4.4
  • Field Details

    • elementFinder

      @Inject protected com.atlassian.pageobjects.elements.PageElementFinder elementFinder
    • pageBinder

      @Inject protected com.atlassian.pageobjects.PageBinder pageBinder
    • timeouts

      @Inject protected com.atlassian.pageobjects.elements.timeout.Timeouts timeouts
    • extendedFinder

      @Inject protected ExtendedElementFinder extendedFinder
    • textArea

      protected com.atlassian.pageobjects.elements.PageElement textArea
    • selectDiv

      protected com.atlassian.pageobjects.elements.PageElement selectDiv
    • errorDiv

      protected com.atlassian.pageobjects.elements.PageElement errorDiv
    • suggestionsContainer

      protected com.atlassian.pageobjects.elements.PageElement suggestionsContainer
    • dropTrigger

      protected com.atlassian.pageobjects.elements.PageElement dropTrigger
    • id

      protected final String id
    • itemLocator

      protected final com.google.common.base.Function<String,org.openqa.selenium.By> itemLocator
  • Constructor Details

    • MultiSelect

      public MultiSelect(String id)
      Constructs the minimal implementation based on a given select[multiple] id.
      Parameters:
      id - the id of the select[multiple] element
    • MultiSelect

      public MultiSelect(String id, com.google.common.base.Function<String,org.openqa.selenium.By> itemLocator)
      Constructs the minimal implementation based on a given select[multiple] id.
      Parameters:
      id - the id of the select[multiple] element
      itemLocator - a function that given a string will create a locator to locate the item for this multiselect given the name or all items if no name is provided
  • Method Details

    • initialize

      public void initialize()
    • isPresent

      protected com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isPresent()
    • query

      public MultiSelect query(CharSequence query)
      Clears the current issue query and types the new query.
      Parameters:
      query - the query to look up issues
      Returns:
      this multi select instance
    • queryAndWaitForOpenSuggestions

      public MultiSelect queryAndWaitForOpenSuggestions(CharSequence query)
    • freeInput

      public MultiSelect freeInput(CharSequence query)
      Focus on multi select, input some value and blur
      Parameters:
      query - input for multi select
      Returns:
      this multi select instance
    • triggerSuggestions

      public MultiSelect triggerSuggestions()
      Open suggestions drop-down using the clickable trigger in the query input element.

      Note: if the suggestions are currently open, this action will close them. Therefore this method does not wait for the outcome of the trigger. Use isSuggestionsPresent() to wait for the expected result.

      Returns:
      this multi select
    • openSuggestions

      public MultiSelect openSuggestions()
    • clearQuery

      public MultiSelect clearQuery()
    • awayFromQueryInputArea

      public MultiSelect awayFromQueryInputArea()
    • add

      public void add(String item, String label)
      Adds an item by typing it in and picking the first suggestion. Assumes that the item passed in will be used as the lozenge label
      Parameters:
      item - the item to add
    • add

      public void add(String item)
      Adds an item by typing it in and picking the first suggestion. Assumes that the item passed in will be used as the lozenge label
      Parameters:
      item - the item to add
    • addAll

      public void addAll(List<String> items)
    • addNotWait

      public void addNotWait(String item)
    • selectActiveSuggestion

      public MultiSelect selectActiveSuggestion()
    • remove

      public void remove(String item)
      Removes a given item by clicking on the (x) next to the lozenge.
      Parameters:
      item - the item to remove
    • clearAllItems

      public void clearAllItems()
    • isSuggestionsLoading

      public com.atlassian.pageobjects.elements.query.TimedCondition isSuggestionsLoading()
    • isSuggestionsPresent

      public com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isSuggestionsPresent()
    • allSuggestionGroups

      public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<SuggestionGroup>> allSuggestionGroups()
    • hasSuggestionGroup

      public com.atlassian.pageobjects.elements.query.TimedCondition hasSuggestionGroup(String groupId)
    • getSuggestionGroup

      public SuggestionGroup getSuggestionGroup(String groupId)
    • getActiveSuggestionText

      public com.atlassian.pageobjects.elements.query.TimedQuery<String> getActiveSuggestionText()
    • hasActiveSuggestion

      public com.atlassian.pageobjects.elements.query.TimedCondition hasActiveSuggestion()
    • getActiveSuggestion

      public Suggestion getActiveSuggestion()
    • allSuggestions

      public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<Suggestion>> allSuggestions()
    • getItemByName

      public MultiSelect.Lozenge getItemByName(String name)
    • getItems

      public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<MultiSelect.Lozenge>> getItems()
    • hasItems

      public com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItems()
    • hasItem

      public com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItem(String name)
    • getError

      public String getError()
    • waitUntilError

      public String waitUntilError()