com.atlassian.jira.pageobjects.components.fields
Class MultiSelect

java.lang.Object
  extended by com.atlassian.jira.pageobjects.components.fields.MultiSelect
Direct Known Subclasses:
IssuePicker, 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

Nested Class Summary
static class MultiSelect.Lozenge
           
 
Field Summary
protected  com.atlassian.pageobjects.elements.PageElement dropTrigger
           
protected  com.atlassian.pageobjects.elements.PageElementFinder elementFinder
           
protected  com.atlassian.pageobjects.elements.PageElement errorDiv
           
protected  ExtendedElementFinder extendedFinder
           
protected  String id
           
protected  com.google.common.base.Function<String,org.openqa.selenium.By> itemLocator
           
protected  com.atlassian.pageobjects.PageBinder pageBinder
           
protected  com.atlassian.pageobjects.elements.PageElement selectDiv
           
protected  com.atlassian.pageobjects.elements.PageElement suggestionsContainer
           
protected  com.atlassian.pageobjects.elements.PageElement textArea
           
protected  com.atlassian.pageobjects.elements.timeout.Timeouts timeouts
           
 
Constructor Summary
MultiSelect(String id)
          Constructs the minimal implementation based on a given select[multiple] id.
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.
 
Method Summary
 void add(String item)
          Adds an item by typing it in and picking the first suggestion.
 void add(String item, String label)
          Adds an item by typing it in and picking the first suggestion.
 void addNotWait(String item)
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<SuggestionGroup>> allSuggestionGroups()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<Suggestion>> allSuggestions()
           
 MultiSelect awayFromQueryInputArea()
           
 void clearAllItems()
           
 MultiSelect clearQuery()
           
 Suggestion getActiveSuggestion()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<String> getActiveSuggestionText()
           
 String getError()
           
 MultiSelect.Lozenge getItemByName(String name)
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<MultiSelect.Lozenge>> getItems()
           
 SuggestionGroup getSuggestionGroup(String groupId)
           
 com.atlassian.pageobjects.elements.query.TimedCondition hasActiveSuggestion()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItem(String name)
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItems()
           
 com.atlassian.pageobjects.elements.query.TimedCondition hasSuggestionGroup(String groupId)
           
 void initialize()
           
protected  com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isPresent()
           
 com.atlassian.pageobjects.elements.query.TimedCondition isSuggestionsLoading()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isSuggestionsPresent()
           
 MultiSelect query(CharSequence query)
          Clears the current issue query and types the new query.
 void remove(String item)
          Removes a given item by clicking on the (x) next to the lozenge.
 MultiSelect selectActiveSuggestion()
           
 MultiSelect triggerSuggestions()
          Open suggestions drop-down using the clickable trigger in the query input element.
 String waitUntilError()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 Detail

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 Detail

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

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

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

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()


Copyright © 2002-2014 Atlassian. All Rights Reserved.