com.atlassian.jira.webtest.framework.component
Interface AjsDropdown<P extends PageObject>

Type Parameters:
P - type of the parent pag object
All Superinterfaces:
Component<P>, Localizable, Openable<AjsDropdown<P>>, PageObject
All Known Subinterfaces:
CommentInput.CommentVisibilityDropdown, DashboardToolsMenu, DotDialog.DDDropDown, FcSuggestions<F>, IssuePicker.Suggestions
All Known Implementing Classes:
AbstractFcSuggestions, AbstractSeleniumDropdown, IssuePickerSuggestions, SeleniumDashboardToolsMenu, SeleniumDDDropDown

public interface AjsDropdown<P extends PageObject>
extends Component<P>, Openable<AjsDropdown<P>>, Localizable

Represents a AJS.DropdownSelect component used in JIRA dialogs and pickers as an auto-complete suggestions container.

The AjsDropdown contains a list of items grouped into one, or more sections. Occasionally it may contain first-class items, i.e. items not grouped in any section. To retrieve a particular section or item, usage of section(String) and item(String) is preferred to allSections(). Additionally, item(String) is the only method capable of retrieving first-class items (as explained above).

Since:
v4.3

Nested Class Summary
static interface AjsDropdown.CloseMode<PP extends PageObject>
           
static interface AjsDropdown.Item<R extends PageObject>
          A single position in the drop-down list.
static interface AjsDropdown.Section<Q extends PageObject>
          Section of the drop-down list.
 
Method Summary
 TimedQuery<List<AjsDropdown.Section<P>>> allSections()
          Get all sections of this drop-down.
 AjsDropdown.CloseMode<P> close()
          Close this drop-down
 TimedCondition hasItem(String itemText)
          Check if this drop-down has item with given itemText.
 TimedCondition hasSection(String id)
          Check if this drop-down has section with given id.
 TimedQuery<AjsDropdown.Item<P>> item(String text)
          Find first position matching test
 TimedQuery<Integer> itemCount()
          Number of items in this drop-down
 TimedQuery<AjsDropdown.Section<P>> section(String id)
          Find section with given id.
 TimedQuery<AjsDropdown.Item<P>> selectedItem()
          Get currently selected position of in the list.
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.component.Component
parent
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.Openable
isClosed, isOpen, isOpenable, open
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.Localizable
locator
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PageObject
context, isReady
 

Method Detail

hasItem

TimedCondition hasItem(String itemText)
Check if this drop-down has item with given itemText.

Parameters:
itemText - text of the position to find
Returns:
condition querying whether a position with given text exists in this drop-down

hasSection

TimedCondition hasSection(String id)
Check if this drop-down has section with given id.

Parameters:
id - unique pag ID of the section to find
Returns:
condition querying whether a section with given ID exists in this drop-down

itemCount

TimedQuery<Integer> itemCount()
Number of items in this drop-down

Returns:
total number of items

section

TimedQuery<AjsDropdown.Section<P>> section(String id)
Find section with given id. Id of the section must be known by the client. Some sections do not have headings, so retrieving sections by their id is impractical.

Parameters:
id - unique page ID of the section
Returns:
section with given ID, or null, if such section does not exist within this drop-down
See Also:
hasItem(String)

allSections

TimedQuery<List<AjsDropdown.Section<P>>> allSections()
Get all sections of this drop-down.

Returns:
list of all sections

item

TimedQuery<AjsDropdown.Item<P>> item(String text)
Find first position matching test

Parameters:
text - text of the position to find
Returns:
position matching text, or null, if position with given text does not exist in this drop-down
See Also:
hasItem(String)

selectedItem

TimedQuery<AjsDropdown.Item<P>> selectedItem()
Get currently selected position of in the list.

Returns:
timed query for selected position

close

AjsDropdown.CloseMode<P> close()
Close this drop-down

Returns:
close mode with the target parent instance


Copyright © 2002-2012 Atlassian. All Rights Reserved.