public class MultiSelect extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MultiSelect.Lozenge |
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
MultiSelect |
freeInput(CharSequence query)
Focus on multi select, input some value and blur
|
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() |
@Inject protected com.atlassian.pageobjects.elements.PageElementFinder elementFinder
@Inject protected com.atlassian.pageobjects.PageBinder pageBinder
@Inject protected com.atlassian.pageobjects.elements.timeout.Timeouts timeouts
@Inject protected ExtendedElementFinder extendedFinder
protected com.atlassian.pageobjects.elements.PageElement textArea
protected com.atlassian.pageobjects.elements.PageElement selectDiv
protected com.atlassian.pageobjects.elements.PageElement errorDiv
protected com.atlassian.pageobjects.elements.PageElement suggestionsContainer
protected com.atlassian.pageobjects.elements.PageElement dropTrigger
protected final String id
protected final com.google.common.base.Function<String,org.openqa.selenium.By> itemLocator
public MultiSelect(String id)
id
- the id of the select[multiple] elementpublic MultiSelect(String id, com.google.common.base.Function<String,org.openqa.selenium.By> itemLocator)
id
- the id of the select[multiple] elementitemLocator
- 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 providedpublic void initialize()
protected com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isPresent()
public MultiSelect query(CharSequence query)
query
- the query to look up issuespublic MultiSelect freeInput(CharSequence query)
query
- input for multi selectpublic MultiSelect triggerSuggestions()
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.
public MultiSelect clearQuery()
public MultiSelect awayFromQueryInputArea()
public void add(String item, String label)
item
- the item to addpublic void add(String item)
item
- the item to addpublic void addNotWait(String item)
public MultiSelect selectActiveSuggestion()
public void remove(String item)
item
- the item to removepublic void clearAllItems()
public com.atlassian.pageobjects.elements.query.TimedCondition isSuggestionsLoading()
public com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> isSuggestionsPresent()
public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<SuggestionGroup>> allSuggestionGroups()
public com.atlassian.pageobjects.elements.query.TimedCondition hasSuggestionGroup(String groupId)
public SuggestionGroup getSuggestionGroup(String groupId)
public com.atlassian.pageobjects.elements.query.TimedQuery<String> getActiveSuggestionText()
public com.atlassian.pageobjects.elements.query.TimedCondition hasActiveSuggestion()
public Suggestion getActiveSuggestion()
public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<Suggestion>> allSuggestions()
public MultiSelect.Lozenge getItemByName(String name)
public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<MultiSelect.Lozenge>> getItems()
public com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItems()
public String getError()
public String waitUntilError()
Copyright © 2002-2017 Atlassian. All Rights Reserved.