com.atlassian.jira.webtest.framework.impl.selenium.page
Class AbstractSeleniumFlowPage<P extends ParentPage,N extends Page>

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.page.AbstractSeleniumPage
                  extended by com.atlassian.jira.webtest.framework.impl.selenium.page.AbstractSeleniumFlowPage<P,N>
All Implemented Interfaces:
Cancelable<P>, PageObject, Submittable<N>, FlowPage<P,N>, Page
Direct Known Subclasses:
AbstractSeleniumConvertToSubtask, AbstractSeleniumMoveSubTask

public abstract class AbstractSeleniumFlowPage<P extends ParentPage,N extends Page>
extends AbstractSeleniumPage
implements FlowPage<P,N>

Abstract Selenium implementation of FlowPage. It represents a flow page that navigates to the next step and cancels the flow through clickable links/buttons.

The Cancelable.cancel() and FlowPage.next() methods are defined as template methods using hooks returning locators for the 'next' and 'cancel' clickable items.

Since:
v4.3

Field Summary
protected  P flowParent
           
protected  int stepNumber
           
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
protected AbstractSeleniumFlowPage(SeleniumContext ctx, P flowParent, int stepNo)
           
 
Method Summary
 P cancel()
          Cancel and get the target page object of the cancel operation.
protected abstract  Locator cancelLocator()
          Locator of a clickable 'cancel' object on the page.
 N next()
          Submit this flow page and go to the next one in the flow.
protected abstract  Locator nextLocator()
          Locator of a clickable 'next' object on the page.
protected abstract  Class<N> nextStepType()
          Next page type
 int stepNumber()
          Step number in the flow.
 N submit()
           Submit this page object.
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.page.AbstractSeleniumPage
isAt
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
detector, 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.page.Page
isAt
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PageObject
context, isReady
 

Field Detail

flowParent

protected final P extends ParentPage flowParent

stepNumber

protected final int stepNumber
Constructor Detail

AbstractSeleniumFlowPage

protected AbstractSeleniumFlowPage(SeleniumContext ctx,
                                   P flowParent,
                                   int stepNo)
Method Detail

cancel

public final P cancel()
Description copied from interface: Cancelable
Cancel and get the target page object of the cancel operation.

Specified by:
cancel in interface Cancelable<P extends ParentPage>
Returns:
target page object of this cancel operation

submit

public final N submit()
Description copied from interface: Submittable

Submit this page object.

NOTE: as with most of the actions in the framework, this Submittable instance is only responsible for validating any pre-conditions that may exist for the submit operation (usually there are none), but not the results of it. It is conceivable that clients will attempt to submit page objects that contain invalid form data and, as a result, the submit operation will not result in navigating to the target object. It is up to the clients to validate if they assumptions as to the result of the operation were valid, which may be done by querying appropriate objects participating in the interaction, e.g. calling PageObject.isReady().

Specified by:
submit in interface Submittable<N extends Page>
Returns:
target page object of this submit operation.
See Also:

next

public final N next()
Description copied from interface: FlowPage
Submit this flow page and go to the next one in the flow. Synonym for Submittable.submit().

Specified by:
next in interface FlowPage<P extends ParentPage,N extends Page>
Returns:
next page in the flow

stepNumber

public final int stepNumber()
Description copied from interface: FlowPage
Step number in the flow.

Specified by:
stepNumber in interface FlowPage<P extends ParentPage,N extends Page>
Returns:
step number of this step

cancelLocator

protected abstract Locator cancelLocator()
Locator of a clickable 'cancel' object on the page.

Returns:
cancel object locator

nextLocator

protected abstract Locator nextLocator()
Locator of a clickable 'next' object on the page.

Returns:
next object locator

nextStepType

protected abstract Class<N> nextStepType()
Next page type

Returns:
next page type


Copyright © 2002-2013 Atlassian. All Rights Reserved.