com.atlassian.jira.webtest.selenium.harness.util
Class NavigatorImpl

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
      extended by com.atlassian.jira.webtest.selenium.harness.util.NavigatorImpl
All Implemented Interfaces:
Navigator

public class NavigatorImpl
extends SeleniumContextAware
implements Navigator


Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
NavigatorImpl(SeleniumContext ctx)
           
 
Method Summary
 void browseProject(String projectKey)
          Goes to the browse page for the project with the given key.
 BulkChangeWizard bulkChange(IssueNavigatorNavigation.BulkChangeOption bulkChangeOption)
          Initiate the bulk change wizard on the current search results.
 Navigator click(String id)
           
 Navigator clickAndWaitForPageLoad(String id)
          Click and wait for the page to load
 Navigator collapseContentSection(String sectionId)
          Collapses a particular expanded content session in the content pane of the issuenavigator
 String createIssue(String projectName, String issueType, String summary)
          Creates an issue in the database
 Dashboard currentDashboard()
          Goes to the dashboard action which will navigate to the most recent dashboard in the session.
 Dashboard dashboard(String id)
          Returns dashboard navigation and utilities for the dashboard with the given id.
 void disableWebSudo()
           
protected  void editCurrentIssue()
           
 Navigator editIssue(String issueKey)
           
 Navigator expandAllNavigatorSections()
          Expands all collapsed navigator sections in the left hand column of the issuenavigator
 Navigator expandContentSection(String sectionId)
          Expands a particular collapsed content session in the content pane of the issuenavigator
 Navigator findAllIssues()
          Finds all issues using simple navigation.
 Navigator findIssuesWithJql(String jql)
           
 Navigator gotoAdmin()
           
 Navigator gotoBrowseProject(String projectName)
           
 Navigator gotoCreateIssueScreen(String project, String issueType)
          Goes to the first page for creating an issue but doesn't actually create an issue.
 Navigator gotoFindIssues()
           
 Navigator gotoFindIssuesAdvanced()
          Goes to the JQL view of the issue navigator.
 Navigator gotoFindIssuesSimple()
          Goes to the issue navigator and ensures the simple search mode.
 Navigator gotoHome()
           
 Navigator gotoIssue(String issueKey)
           
 Navigator gotoManageFilters()
          Navigates to the Manage Filters page.
 Navigator gotoPage(String relativeUrl, boolean waitForPageToLoad)
          Navigates to the page specified by the relative URL.
 Navigator gotoUserProfile()
           
 Navigator gotoUserProfile(String user)
           
 Navigator gotoUserProfileTab(String tab)
           
 Navigator gotoUserProfileTab(String tab, String user)
           
 IssueNavigation issue()
          Returns a handle on issue navigation utilities.
 IssueNavigatorNavigation issueNavigator()
          Returns an object that can be used to control the issue navigator.
 Navigator login(String username)
          Login using the user name and password as the same value
 Navigator login(String username, String password)
           
 Navigator login(User user, String destination)
          Login and redirect to a specified destination.
 Navigator loginAsSystemAdmin(String destination)
          Login as the system administrator and redirect to a specified destination.
 Navigator logout(String xsrfToken)
           
 Navigator openHistoryTab()
          Go to the 'History' tab on the view issue screen.
 void webSudoAuthenticate(String password)
          Checks if we have been redirected to the websudo login form and logs in.
 void webSudoAuthenticateUsingLastPassword()
           
 
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
 

Constructor Detail

NavigatorImpl

public NavigatorImpl(SeleniumContext ctx)
Method Detail

login

public Navigator login(String username)
Description copied from interface: Navigator
Login using the user name and password as the same value

Specified by:
login in interface Navigator
Parameters:
username - the username and password to use
Returns:
a Navigator instance of call chaining

login

public Navigator login(String username,
                       String password)
Specified by:
login in interface Navigator

loginAsSystemAdmin

public Navigator loginAsSystemAdmin(String destination)
Description copied from interface: Navigator
Login as the system administrator and redirect to a specified destination. Waits for the desination page to load. Admin must not be already logged in (leaving full implementation of that for PageObjects).

Specified by:
loginAsSystemAdmin in interface Navigator
Parameters:
destination - URL chunk to set as os_destination in the login URL
Returns:
a Navigator instance of call chaining

login

public Navigator login(User user,
                       String destination)
Description copied from interface: Navigator
Login and redirect to a specified destination. User must not be already logged in (leaving full implementation of that for PageObjects).

Specified by:
login in interface Navigator
Parameters:
user - User to extract username and password from
destination - destination to set as os_destination in the login URL
Returns:
a Navigator instance of call chaining

logout

public Navigator logout(String xsrfToken)
Specified by:
logout in interface Navigator

gotoPage

public Navigator gotoPage(String relativeUrl,
                          boolean waitForPageToLoad)
Description copied from interface: Navigator
Navigates to the page specified by the relative URL.

NOTE: URL must be relative. Do not use leading '/' as this breaks on Orion server.

Specified by:
gotoPage in interface Navigator
Parameters:
relativeUrl - relative URL - not starting with '/'
Returns:
this navigator

gotoHome

public Navigator gotoHome()
Specified by:
gotoHome in interface Navigator

gotoManageFilters

public Navigator gotoManageFilters()
Description copied from interface: Navigator
Navigates to the Manage Filters page.

Specified by:
gotoManageFilters in interface Navigator
Returns:
this navigator

gotoFindIssues

public Navigator gotoFindIssues()
Specified by:
gotoFindIssues in interface Navigator
Returns:

gotoFindIssuesSimple

public Navigator gotoFindIssuesSimple()
Description copied from interface: Navigator
Goes to the issue navigator and ensures the simple search mode.

Specified by:
gotoFindIssuesSimple in interface Navigator
Returns:
the Navigator

gotoFindIssuesAdvanced

public Navigator gotoFindIssuesAdvanced()
Description copied from interface: Navigator
Goes to the JQL view of the issue navigator.

Specified by:
gotoFindIssuesAdvanced in interface Navigator
Returns:
the Navigator

gotoAdmin

public Navigator gotoAdmin()
Specified by:
gotoAdmin in interface Navigator
Returns:

webSudoAuthenticate

public void webSudoAuthenticate(String password)
Description copied from interface: Navigator
Checks if we have been redirected to the websudo login form and logs in.

Specified by:
webSudoAuthenticate in interface Navigator

webSudoAuthenticateUsingLastPassword

public void webSudoAuthenticateUsingLastPassword()
Specified by:
webSudoAuthenticateUsingLastPassword in interface Navigator

disableWebSudo

public void disableWebSudo()
Specified by:
disableWebSudo in interface Navigator

gotoUserProfile

public Navigator gotoUserProfile()
Specified by:
gotoUserProfile in interface Navigator
Returns:

gotoUserProfile

public Navigator gotoUserProfile(String user)
Specified by:
gotoUserProfile in interface Navigator
Returns:

gotoUserProfileTab

public Navigator gotoUserProfileTab(String tab)
Specified by:
gotoUserProfileTab in interface Navigator
Returns:

gotoUserProfileTab

public Navigator gotoUserProfileTab(String tab,
                                    String user)
Specified by:
gotoUserProfileTab in interface Navigator
Returns:

gotoIssue

public Navigator gotoIssue(String issueKey)
Specified by:
gotoIssue in interface Navigator
Returns:
this navigator instance

openHistoryTab

public Navigator openHistoryTab()
Description copied from interface: Navigator
Go to the 'History' tab on the view issue screen.

Specified by:
openHistoryTab in interface Navigator
Returns:
this navigator instance

editCurrentIssue

protected void editCurrentIssue()

editIssue

public Navigator editIssue(String issueKey)
Specified by:
editIssue in interface Navigator
Returns:

findAllIssues

public Navigator findAllIssues()
Description copied from interface: Navigator
Finds all issues using simple navigation. Use Navigator.findIssuesWithJql(String) for JQL searching NOTE: This will reset the issue navigator navType to simple if it is currently JQL

Specified by:
findAllIssues in interface Navigator
Returns:
this navigator

findIssuesWithJql

public Navigator findIssuesWithJql(String jql)
Specified by:
findIssuesWithJql in interface Navigator
Returns:

clickAndWaitForPageLoad

public Navigator clickAndWaitForPageLoad(String id)
Description copied from interface: Navigator
Click and wait for the page to load

Specified by:
clickAndWaitForPageLoad in interface Navigator
Parameters:
id - element id
Returns:
this navigator

click

public Navigator click(String id)
Specified by:
click in interface Navigator
Returns:

gotoBrowseProject

public Navigator gotoBrowseProject(String projectName)
Specified by:
gotoBrowseProject in interface Navigator
Returns:

createIssue

public String createIssue(String projectName,
                          String issueType,
                          String summary)
Description copied from interface: Navigator
Creates an issue in the database

Specified by:
createIssue in interface Navigator
Parameters:
projectName - - the name of the project - can be nulll
issueType - the type of issue - can be nulll
summary - the summary of the issue
Returns:
the newly created issue key

browseProject

public void browseProject(String projectKey)
Description copied from interface: Navigator
Goes to the browse page for the project with the given key.

Specified by:
browseProject in interface Navigator
Parameters:
projectKey - the project's key.

dashboard

public Dashboard dashboard(String id)
Description copied from interface: Navigator
Returns dashboard navigation and utilities for the dashboard with the given id.

Specified by:
dashboard in interface Navigator
Parameters:
id - the id of the dashboard
Returns:
A Dasbhoard navigation instance

currentDashboard

public Dashboard currentDashboard()
Description copied from interface: Navigator
Goes to the dashboard action which will navigate to the most recent dashboard in the session.

Specified by:
currentDashboard in interface Navigator
Returns:
A Dasbhoard navigation instance

expandAllNavigatorSections

public Navigator expandAllNavigatorSections()
Description copied from interface: Navigator
Expands all collapsed navigator sections in the left hand column of the issuenavigator

Specified by:
expandAllNavigatorSections in interface Navigator
Returns:
this navigator

expandContentSection

public Navigator expandContentSection(String sectionId)
Description copied from interface: Navigator
Expands a particular collapsed content session in the content pane of the issuenavigator

Specified by:
expandContentSection in interface Navigator
Parameters:
sectionId - the id of the section to expand
Returns:
this navigator

bulkChange

public BulkChangeWizard bulkChange(IssueNavigatorNavigation.BulkChangeOption bulkChangeOption)
Description copied from interface: Navigator
Initiate the bulk change wizard on the current search results.

Specified by:
bulkChange in interface Navigator
Parameters:
bulkChangeOption - whether to bulk change all results or just the current page.
Returns:
an instance of the bulk change wizard which will be used to step through the wizard.

issue

public IssueNavigation issue()
Description copied from interface: Navigator
Returns a handle on issue navigation utilities.

Specified by:
issue in interface Navigator
Returns:
Issue navigation utilities

issueNavigator

public IssueNavigatorNavigation issueNavigator()
Description copied from interface: Navigator
Returns an object that can be used to control the issue navigator.

Specified by:
issueNavigator in interface Navigator
Returns:
an object that can be used to control the issuer navigator.

gotoCreateIssueScreen

public Navigator gotoCreateIssueScreen(String project,
                                       String issueType)
Description copied from interface: Navigator
Goes to the first page for creating an issue but doesn't actually create an issue.

Specified by:
gotoCreateIssueScreen in interface Navigator
Parameters:
project - The name of the project to create the issue in
issueType - The type of issue to create
Returns:
this object

collapseContentSection

public Navigator collapseContentSection(String sectionId)
Description copied from interface: Navigator
Collapses a particular expanded content session in the content pane of the issuenavigator

Specified by:
collapseContentSection in interface Navigator
Parameters:
sectionId - the id of the section to collapse
Returns:
this navigator


Copyright © 2002-2012 Atlassian. All Rights Reserved.