|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent<P> com.atlassian.jira.webtest.framework.impl.selenium.component.AbstractSeleniumDropdown<P>
public abstract class AbstractSeleniumDropdown<P extends PageObject>
Abstract implementation of the AjsDropdown
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.webtest.framework.component.AjsDropdown |
---|
AjsDropdown.CloseMode<PP extends PageObject>, AjsDropdown.Item<R extends PageObject>, AjsDropdown.Section<Q extends PageObject> |
Field Summary |
---|
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware |
---|
assertThat, client, context, timeouts |
Constructor Summary | |
---|---|
protected |
AbstractSeleniumDropdown(String id,
P parent,
SeleniumContext ctx)
Requires a unique id of the dropdown list used to evaluate its presence on the page. |
Method Summary | |
---|---|
TimedQuery<List<AjsDropdown.Section<P>>> |
allSections()
Get all sections of this drop-down. |
AjsDropdown.CloseMode<P> |
close()
Close this drop-down |
protected SeleniumLocator |
detector()
Main locator of this page object. |
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. |
TimedCondition |
isClosed()
A timed condition that queries, whether this component is currently closed. |
TimedCondition |
isOpen()
Checks if this component is open. |
TimedCondition |
isOpenable()
Represents a question: is this component capable of being opened in the current test context? |
protected abstract TimedCondition |
isOpenableByContext()
Whether there is appropriate context to open this drop-down (e.g. |
TimedQuery<AjsDropdown.Item<P>> |
item(String text)
Find first position matching test |
TimedQuery<Integer> |
itemCount()
Number of items in this drop-down |
Locator |
locator()
Locator unambiguously locating this page object. |
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 class com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent |
---|
parent |
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject |
---|
isReady |
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject |
---|
body, conditions, css, forClass, id, jQuery, locatorFor, name, queries, waitFor, xpath |
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware |
---|
context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.webtest.framework.core.component.Component |
---|
parent |
Methods inherited from interface com.atlassian.jira.webtest.framework.core.Openable |
---|
open |
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PageObject |
---|
context, isReady |
Constructor Detail |
---|
protected AbstractSeleniumDropdown(String id, P parent, SeleniumContext ctx)
id
- unique id of this dropdown that is assigned to the container divparent
- parent component of this dropdownctx
- Selenium contextMethod Detail |
---|
protected SeleniumLocator detector()
AbstractLocatorBasedPageObject
detector
in class AbstractLocatorBasedPageObject
public Locator locator()
Localizable
locator
in interface Localizable
public final TimedCondition isOpen()
Openable
isOpen
in interface Openable<AjsDropdown<P extends PageObject>>
TimedCondition
public TimedCondition isClosed()
Openable
isClosed
in interface Openable<AjsDropdown<P extends PageObject>>
TimedCondition
public final TimedCondition isOpenable()
Openable
Represents a question: is this component capable of being opened in the current test context?
If the returned condition evaluates to true
, this component may be safely opened by means of
Openable.open()
.
NOTE: if
Openable.isOpen()
evaluates to true
, this condition will automatically evaluate to
false
, as it is not possible to open a component that is already open.
isOpenable
in interface Openable<AjsDropdown<P extends PageObject>>
protected abstract TimedCondition isOpenableByContext()
public TimedCondition hasItem(String itemText)
AjsDropdown
hasItem
in interface AjsDropdown<P extends PageObject>
itemText
- text of the position to find
public TimedCondition hasSection(String id)
AjsDropdown
hasSection
in interface AjsDropdown<P extends PageObject>
id
- unique pag ID of the section to find
public TimedQuery<Integer> itemCount()
AjsDropdown
itemCount
in interface AjsDropdown<P extends PageObject>
public TimedQuery<List<AjsDropdown.Section<P>>> allSections()
AjsDropdown
allSections
in interface AjsDropdown<P extends PageObject>
public TimedQuery<AjsDropdown.Item<P>> item(String text)
AjsDropdown
item
in interface AjsDropdown<P extends PageObject>
text
- text of the position to find
null
,
if position with given text does not exist in this drop-downAjsDropdown.hasItem(String)
public TimedQuery<AjsDropdown.Section<P>> section(String id)
AjsDropdown
section
in interface AjsDropdown<P extends PageObject>
id
- unique page ID of the section
null
,
if such section does not exist within this drop-downAjsDropdown.hasItem(String)
public TimedQuery<AjsDropdown.Item<P>> selectedItem()
AjsDropdown
selectedItem
in interface AjsDropdown<P extends PageObject>
public AjsDropdown.CloseMode<P> close()
AjsDropdown
close
in interface AjsDropdown<P extends PageObject>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |