com.atlassian.jira.pageobjects.pages
Class JiraLoginPage

java.lang.Object
  extended by com.atlassian.jira.pageobjects.pages.AbstractJiraPage
      extended by com.atlassian.jira.pageobjects.pages.JiraLoginPage
All Implemented Interfaces:
com.atlassian.pageobjects.Page, com.atlassian.pageobjects.page.LoginPage
Direct Known Subclasses:
JiraBtfLoginPage, JiraOdLoginPage

public abstract class JiraLoginPage
extends AbstractJiraPage
implements com.atlassian.pageobjects.page.LoginPage

Base class for each flavor of JIRA login page.

Since:
v6.2

Field Summary
static String PASSWORD_ADMIN
           
static String USER_ADMIN
           
 
Fields inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraPage
body, driver, elementFinder, footerElement, metaElement, pageBinder, timeouts
 
Constructor Summary
JiraLoginPage()
           
 
Method Summary
 com.atlassian.pageobjects.elements.PageElement getError()
          Get first error in the form.
 Iterable<com.atlassian.pageobjects.elements.PageElement> getErrors()
           
protected abstract  com.atlassian.pageobjects.elements.PageElement getLoginButton()
          The button to submit the login form.
abstract  com.atlassian.pageobjects.elements.PageElement getLoginForm()
          The login form
abstract  Iterable<com.atlassian.pageobjects.elements.PageElement> getMessages()
          The aui messages in the login form
protected abstract  com.atlassian.pageobjects.elements.PageElement getPasswordField()
          The text field the password is put on login.
protected abstract  com.atlassian.pageobjects.elements.PageElement getRedirect()
          The element holding the redirect information.
protected abstract  com.atlassian.pageobjects.elements.PageElement getRememberMeTickBox()
          The tick box for remember me cookie.
abstract  com.atlassian.pageobjects.elements.PageElement getSignUpHint()
          The element containing the signup hint
protected abstract  com.atlassian.pageobjects.elements.PageElement getUsernameField()
          The text field the username is put on login.
 boolean hasErrors()
           
 com.atlassian.pageobjects.elements.query.TimedCondition isAt()
          Timed condition checking if we're at given page.
<M extends com.atlassian.pageobjects.Page>
M
login(String username, String password, boolean rememberMe, Class<M> nextPage, Object... args)
           
<M extends com.atlassian.pageobjects.Page>
M
login(String username, String password, Class<M> nextPage)
          Logs in a user and sends the browser to the next page
<M extends com.atlassian.pageobjects.Page>
M
login(String username, String password, Class<M> nextPage, Object... args)
           
<M extends com.atlassian.pageobjects.Page>
M
login(User user, Class<M> nextPage, Object... args)
           
<M extends com.atlassian.pageobjects.Page>
M
loginAndFollowRedirect(String username, String password, Class<M> redirectPage, Object... args)
           
<M extends com.atlassian.pageobjects.Page>
M
loginAndFollowRedirect(User user, Class<M> redirectPage, Object... args)
           
 DashboardPage loginAndGoToHome(String username, String password)
           
<M extends com.atlassian.pageobjects.Page>
M
loginAsSysAdmin(Class<M> nextPage)
          Logs in the default sysadmin user and sends the browser to the next page
abstract
<M extends com.atlassian.pageobjects.Page>
M
loginAsSysAdmin(Class<M> nextPage, Object... args)
           
 DashboardPage loginAsSysadminAndGoToHome()
           
abstract
<M extends com.atlassian.pageobjects.Page>
M
loginAsSystemAdminAndFollowRedirect(Class<M> redirectPage, Object... args)
           
<M extends com.atlassian.pageobjects.Page>
M
loginWithRedirect(String username, String password, boolean rememberMe, boolean followRedirect, Class<M> nextPage, Object... args)
           
 void performLoginSteps(String username, String password, boolean rememberMe)
           
 
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
 
Methods inherited from interface com.atlassian.pageobjects.Page
getUrl
 

Field Detail

USER_ADMIN

public static final String USER_ADMIN
See Also:
Constant Field Values

PASSWORD_ADMIN

public static final String PASSWORD_ADMIN
See Also:
Constant Field Values
Constructor Detail

JiraLoginPage

public JiraLoginPage()
Method Detail

getUsernameField

protected abstract com.atlassian.pageobjects.elements.PageElement getUsernameField()
The text field the username is put on login.


getPasswordField

protected abstract com.atlassian.pageobjects.elements.PageElement getPasswordField()
The text field the password is put on login.


getRememberMeTickBox

protected abstract com.atlassian.pageobjects.elements.PageElement getRememberMeTickBox()
The tick box for remember me cookie.


getLoginButton

protected abstract com.atlassian.pageobjects.elements.PageElement getLoginButton()
The button to submit the login form.


getRedirect

protected abstract com.atlassian.pageobjects.elements.PageElement getRedirect()
The element holding the redirect information.


getSignUpHint

public abstract com.atlassian.pageobjects.elements.PageElement getSignUpHint()
The element containing the signup hint


getLoginForm

public abstract com.atlassian.pageobjects.elements.PageElement getLoginForm()
The login form


getMessages

public abstract Iterable<com.atlassian.pageobjects.elements.PageElement> getMessages()
The aui messages in the login form


loginAsSysAdmin

public abstract <M extends com.atlassian.pageobjects.Page> M loginAsSysAdmin(Class<M> nextPage,
                                                                             Object... args)

loginAsSystemAdminAndFollowRedirect

public abstract <M extends com.atlassian.pageobjects.Page> M loginAsSystemAdminAndFollowRedirect(Class<M> redirectPage,
                                                                                                 Object... args)

performLoginSteps

public void performLoginSteps(String username,
                              String password,
                              boolean rememberMe)

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

login

public <M extends com.atlassian.pageobjects.Page> M login(String username,
                                                          String password,
                                                          Class<M> nextPage,
                                                          Object... args)

login

public <M extends com.atlassian.pageobjects.Page> M login(User user,
                                                          Class<M> nextPage,
                                                          Object... args)

loginAndFollowRedirect

public <M extends com.atlassian.pageobjects.Page> M loginAndFollowRedirect(User user,
                                                                           Class<M> redirectPage,
                                                                           Object... args)

loginAndFollowRedirect

public <M extends com.atlassian.pageobjects.Page> M loginAndFollowRedirect(String username,
                                                                           String password,
                                                                           Class<M> redirectPage,
                                                                           Object... args)

loginAndGoToHome

public DashboardPage loginAndGoToHome(String username,
                                      String password)

loginAsSysadminAndGoToHome

public DashboardPage loginAsSysadminAndGoToHome()

login

public <M extends com.atlassian.pageobjects.Page> M login(String username,
                                                          String password,
                                                          boolean rememberMe,
                                                          Class<M> nextPage,
                                                          Object... args)

login

public <M extends com.atlassian.pageobjects.Page> M login(String username,
                                                          String password,
                                                          Class<M> nextPage)
Logs in a user and sends the browser to the next page

Specified by:
login in interface com.atlassian.pageobjects.page.LoginPage
Type Parameters:
M - The page type
Parameters:
username - The username to login
password - The password to login with
nextPage - The next page to visit, which may involve changing the URL. Cannot be null.
Returns:
The next page, fully loaded and initialized.

loginAsSysAdmin

public <M extends com.atlassian.pageobjects.Page> M loginAsSysAdmin(Class<M> nextPage)
Logs in the default sysadmin user and sends the browser to the next page

Specified by:
loginAsSysAdmin in interface com.atlassian.pageobjects.page.LoginPage
Type Parameters:
M - The page type
Parameters:
nextPage - The next page to visit, which may involve changing the URL. Cannot be null.
Returns:
The next page, fully loaded and initialized.

loginWithRedirect

public <M extends com.atlassian.pageobjects.Page> M loginWithRedirect(String username,
                                                                      String password,
                                                                      boolean rememberMe,
                                                                      boolean followRedirect,
                                                                      Class<M> nextPage,
                                                                      Object... args)

getError

public com.atlassian.pageobjects.elements.PageElement getError()
Get first error in the form. If there is no errors, this element's PageElement.isPresent() method will return false.

Returns:
element representing the first error on the page

getErrors

public Iterable<com.atlassian.pageobjects.elements.PageElement> getErrors()

hasErrors

public boolean hasErrors()


Copyright © 2002-2014 Atlassian. All Rights Reserved.