com.atlassian.jira.pageobjects.components
Class MultiSelect

java.lang.Object
  extended by com.atlassian.jira.pageobjects.components.MultiSelect
Direct Known Subclasses:
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.Item
           
 
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 clear()
           
 MultiSelect.Item getItemByName(String name)
           
 List<MultiSelect.Item> getItems()
           
protected  com.atlassian.pageobjects.elements.PageElement getTextArea()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItem(String name)
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Boolean> hasItems()
           
 void initialize()
           
 void remove(String item)
          Removes a given item by clicking on the (x) next to the lozenge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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

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

clear

public void clear()

getItemByName

public MultiSelect.Item getItemByName(String name)

getItems

public List<MultiSelect.Item> getItems()

hasItems

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

hasItem

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

getTextArea

protected com.atlassian.pageobjects.elements.PageElement getTextArea()


Copyright © 2002-2012 Atlassian. All Rights Reserved.