com.atlassian.jira.pageobjects.websudo
Class JiraWebSudoPage

java.lang.Object
  extended by com.atlassian.jira.pageobjects.pages.AbstractJiraPage
      extended by com.atlassian.jira.pageobjects.websudo.JiraWebSudoPage
All Implemented Interfaces:
JiraWebSudo, com.atlassian.pageobjects.Page, com.atlassian.pageobjects.page.WebSudoPage

public class JiraWebSudoPage
extends AbstractJiraPage
implements JiraWebSudo, com.atlassian.pageobjects.page.WebSudoPage

Since:
v4.4

Field Summary
 
Fields inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraPage
body, driver, elementFinder, footerElement, metaElement
 
Constructor Summary
JiraWebSudoPage()
           
JiraWebSudoPage(String destination)
           
 
Method Summary
<T> T
authenticate(Class<T> targetPage)
           
<T> T
authenticate(String password, Class<T> targetPage, Object... args)
          Submit the password for websudo and bind the passed page.
 JiraWebSudoPage authenticateFail(String password)
          Submit the wrong password for websudo.
<T> T
cancel(Class<T> expectedPage, Object... args)
          This handles cancelling the web sudo authentication and binding to the expected page that cancel should navigate to.
<T extends com.atlassian.pageobjects.Page>
T
confirm(Class<T> targetPage)
           
<T extends com.atlassian.pageobjects.Page>
T
confirm(String password, Class<T> targetPage)
           
 String getUrl()
           
 com.atlassian.pageobjects.elements.query.TimedCondition isAt()
          Timed condition checking if we're at given page.
 
Methods inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraPage
back, createXsrfUrl, doWait, execKeyboardShortcut, getHeader, getPageTitle, getXsrfToken, isAdmin, isLoggedIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraWebSudoPage

public JiraWebSudoPage()

JiraWebSudoPage

public JiraWebSudoPage(String destination)
Method Detail

isAt

public com.atlassian.pageobjects.elements.query.TimedCondition isAt()
Description copied from class: AbstractJiraPage
Timed condition checking if we're at given page.

Specified by:
isAt in class AbstractJiraPage
Returns:
timed condition checking, if the test is at given page

getUrl

public String getUrl()
Specified by:
getUrl in interface com.atlassian.pageobjects.Page

confirm

public <T extends com.atlassian.pageobjects.Page> T confirm(Class<T> targetPage)
Specified by:
confirm in interface com.atlassian.pageobjects.page.WebSudoPage

confirm

public <T extends com.atlassian.pageobjects.Page> T confirm(String password,
                                                            Class<T> targetPage)
Specified by:
confirm in interface com.atlassian.pageobjects.page.WebSudoPage

authenticate

public <T> T authenticate(Class<T> targetPage)

authenticate

public <T> T authenticate(String password,
                          Class<T> targetPage,
                          Object... args)
Description copied from interface: JiraWebSudo
Submit the password for websudo and bind the passed page.

Specified by:
authenticate in interface JiraWebSudo
Type Parameters:
T - the type of the page to bind.
Parameters:
password - the password to submit.
targetPage - the page to bind after the submit.
args - arguments for targetPage during the bind.
Returns:
a newly bound page after websudo.

authenticateFail

public JiraWebSudoPage authenticateFail(String password)
Description copied from interface: JiraWebSudo
Submit the wrong password for websudo.

Specified by:
authenticateFail in interface JiraWebSudo
Parameters:
password - the password to submit.
Returns:
this websudo form.

cancel

public <T> T cancel(Class<T> expectedPage,
                    Object... args)
This handles cancelling the web sudo authentication and binding to the expected page that cancel should navigate to.

Specified by:
cancel in interface JiraWebSudo
Type Parameters:
T - The page class type.
Parameters:
expectedPage - The expected page to navigate to after cancelling.
args - optional arguments to be passed to PageBinder.bind(Class, Object...)
Returns:
The page object that is expected to navigate to after cancelling.


Copyright © 2002-2012 Atlassian. All Rights Reserved.