com.atlassian.jira.webtest.framework.impl.selenium.gadget
Class AbstractGadget

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
      extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject
          extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
              extended by com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent<Dashboard>
                  extended by com.atlassian.jira.webtest.framework.impl.selenium.gadget.AbstractGadget
All Implemented Interfaces:
Component<Dashboard>, Localizable, PageObject, Gadget
Direct Known Subclasses:
ReferenceGadgetImpl

public abstract class AbstractGadget
extends AbstractSeleniumComponent<Dashboard>
implements Gadget

Abstract implementation of Gadget.

Since:
v4.3

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
protected AbstractGadget(int id, String name, Dashboard dashboard, SeleniumContext context)
           
protected AbstractGadget(String name, Dashboard dashboard, SeleniumContext context)
           
 
Method Summary
protected  Locator detector()
          Main locator of this page object.
 Locator frameLocator()
          Each gadget on Dashboard is embedded withing a frame.
 int id()
          Unique ID of the gadget.
protected  TimedCondition inGadget(TimedCondition condition)
           
protected
<T> TimedQuery<T>
inGadget(TimedQuery<T> query)
           
 TimedCondition isReady()
          Returns condition representing a query about the state of this page object: if this evaluates to true, this page object is present within the current test context and may be queried/manipulated by the test driver.
 Locator locator()
          Locator unambiguously locating this page object.
 String name()
          Return name of the gadget as visible by user on the Dashboard.
protected  int retrieveIdForSingleGadget()
           
protected  Locator titleLocator()
           
 
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.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.PageObject
context
 

Constructor Detail

AbstractGadget

protected AbstractGadget(int id,
                         String name,
                         Dashboard dashboard,
                         SeleniumContext context)

AbstractGadget

protected AbstractGadget(String name,
                         Dashboard dashboard,
                         SeleniumContext context)
Method Detail

detector

protected Locator detector()
Description copied from class: AbstractLocatorBasedPageObject
Main locator of this page object. Its presence means that this object is ready to be manipulated in the test.

Specified by:
detector in class AbstractLocatorBasedPageObject
Returns:
main locator of this page object

isReady

public TimedCondition isReady()
Description copied from class: AbstractLocatorBasedPageObject
Returns condition representing a query about the state of this page object: if this evaluates to true, this page object is present within the current test context and may be queried/manipulated by the test driver.

Generic implementation in terms of the underlying locator of this page object. Subclasses may extend it to provide additional/alternative conditions of readiness.

Specified by:
isReady in interface PageObject
Overrides:
isReady in class AbstractLocatorBasedPageObject
Returns:
condition representing availability of this page object in the current text context
See Also:
PageObject.isReady(), Conditions

name

public String name()
Description copied from interface: Gadget
Return name of the gadget as visible by user on the Dashboard.

Specified by:
name in interface Gadget
Returns:
name of the gadget

locator

public Locator locator()
Description copied from interface: Localizable
Locator unambiguously locating this page object.

Specified by:
locator in interface Localizable
Returns:
locator

id

public int id()
Description copied from interface: Gadget
Unique ID of the gadget.

Specified by:
id in interface Gadget
Returns:
gadget id

frameLocator

public Locator frameLocator()
Description copied from interface: Gadget
Each gadget on Dashboard is embedded withing a frame. This method returns this gadget's frame locator.

Specified by:
frameLocator in interface Gadget
Returns:
frame locator of this gadget's frame

titleLocator

protected final Locator titleLocator()

retrieveIdForSingleGadget

protected final int retrieveIdForSingleGadget()

inGadget

protected final TimedCondition inGadget(TimedCondition condition)

inGadget

protected final <T> TimedQuery<T> inGadget(TimedQuery<T> query)


Copyright © 2002-2013 Atlassian. All Rights Reserved.