Interface Navigation

All Known Implementing Classes:
NavigationImpl

public interface Navigation
An interface for navigating around JIRA
Since:
v3.13
  • Method Details

    • login

      void login(String userName)
      This assumes the standard JIRA test behaviour of having the user name the same value as the password
      Parameters:
      userName - the user name and password to login as
    • login

      void login(String userName, String userPassword)
      Login the given user.

      Note that this will assert that the login suceeded.

      Parameters:
      userName - the user name and password to login as
      See Also:
    • login

      void login(String userName, String userPassword, boolean useCookie)
    • loginUsingURLParameters

      void loginUsingURLParameters(String userName, String userPassword, boolean useCookie)
      Login by adding parameters to the Dashboard URL

      e.g. http://localhost:8090/jira/secure/Dashboard.jspa?os_username=admin&os_password=admin

      Parameters:
      userName -
      userPassword -
      useCookie -
    • loginUsingForm

      void loginUsingForm(String userName, String userPassword, boolean useCookie, boolean assertSuccess)
      Login by navigating to the Dashboard and filling out the login form and submitting it
      Parameters:
      userName -
      userPassword -
      useCookie -
      assertSuccess -
    • loginUsingForm

      void loginUsingForm(String userName, String userPassword)
    • loginAttempt

      void loginAttempt(String userName, String userPassword)
      Attempts to login the given user without asserting success.
      Parameters:
      userName -
      userPassword -
    • logout

      void logout()
      Logout current user.
    • getCurrentPage

      String getCurrentPage()
      Returns the relative path of the current page. E.g. if currently at http://web.com:9999/jira/browse/HSP-1, this method will return "/browse/HSP-1". Also caters for situations when no context path is set, e.g. http://standalone.com/browse/HSP-1.

      Use this method with WebTester.gotoPage(java.lang.String).

      Returns:
      the relative path of the current page.
    • clickLink

      void clickLink(com.meterware.httpunit.WebLink webLink)
      Follows the URL in the given WebLink.
      Parameters:
      webLink - WebLink
    • clickLinkWithPost

      void clickLinkWithPost(com.meterware.httpunit.WebLink webLink, InputStream bodyInputStream)
      Follows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.
      Parameters:
      webLink - WebLink
      bodyInputStream - POST request body
    • clickLinkWithPost

      void clickLinkWithPost(com.meterware.httpunit.WebLink webLink)
      Follows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.
      Parameters:
      webLink - WebLink
    • sendPostRequest

      void sendPostRequest(String url, InputStream bodyInputStream)
      Visits the site with POST method.
      Parameters:
      url - relative url to visit
      bodyInputStream - input stream sent as request body
    • clickLinkWithExactText

      void clickLinkWithExactText(String text)
      Finds the first link on the page with the exact text and follows the URL.

      Note: This is not the same as WebTester.clickLinkWithText(String) as it does an exact text match, but also no onclick events are fired. It simply follows the URL specified by the link tag.

      Parameters:
      text - the text of the link to match
    • clickLinkInTableCell

      void clickLinkInTableCell(String tableId, int row, int col, String linkText)
      Click on a link in a particular table cell with the given text.
      Parameters:
      tableId - The id of the table whose link we're clicking
      row - The table row that contains the link
      col - The table column that contains the link
      linkText - The text of the link
    • clickLinkInTableCell

      void clickLinkInTableCell(com.meterware.httpunit.WebTable table, int row, int col, String linkText)
      Click on a link in a particular table cell with the given text.
      Parameters:
      table - The table whose link we're clicking
      row - The table row that contains the link
      col - The table column that contains the link
      linkText - The text of the link
    • jiraLog

      void jiraLog(String logMessage)
      Writes the specified message to the atlassian-jira.log on the server side. Works because we have a magic servlet ready for this log messages.
      Parameters:
      logMessage - the message to log
    • gotoPage

      void gotoPage(String url)
      Navigates to the given relative URL.

      Note that the "base URL" is automatically prepended to the given URL including the context. eg: If the URL on your dev machine is "http://localhost:8091/jira/secure/Signup!default.jspa", then you would supply "secure/Signup!default.jspa" as the URL parameter to this method.

      Parameters:
      url - URL to navigate to.
    • bindPage

      <T extends WebTestPage> T bindPage(Class<T> pageClass)
    • gotoPage

      <T extends WebTestPage> T gotoPage(Class<T> pageClass)
    • gotoPageWithParams

      <T extends WebTestPage> T gotoPageWithParams(Class<T> pageClass, String params)
    • gotoResource

      void gotoResource(String resourcePath)

      Navigates to the relative resource path.

      Note that the This method will prepend current location to the resource path, e.g. if the current location is "http://localhost:8091/jira/secure/Signup!default.jspa", and given resource is "Signout.jspa, the resulting URL will be "http://localhost:8091/jira/secure/Signout.jspa".

      Parameters:
      resourcePath - path to navigate to.
    • gotoDashboard

      void gotoDashboard()
      Goto the current user's dashboard. This is a quick way to call dashboard().navigateTo().
    • gotoAdmin

      void gotoAdmin()
      Navigates to the admin section
    • webSudoAuthenticate

      void webSudoAuthenticate(String password)
      Checks if we have been redirected to the websudo login form and logs in.
      Parameters:
      password -
    • webSudoAuthenticateUsingLastPassword

      void webSudoAuthenticateUsingLastPassword()
      Checks if we have been redirected to the websudo login form and logs in using the last password
    • disableWebSudo

      void disableWebSudo()
      Historically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothing
    • gotoAdminSection

      void gotoAdminSection(Navigation.AdminSection section)
      Navigates to a particular AdminSection.
      Parameters:
      section - the section to navigate to
    • gotoCustomFields

      void gotoCustomFields()
      Navigates to the 'Custom Fields' page in the administration section
    • gotoWorkflows

      void gotoWorkflows()
      Navigates to the workflows table in the admin section
    • runReport

      void runReport(Long projectId, String reportKey)
      Run the given report for the given project
      Parameters:
      projectId - The id of the project
      reportKey - The key of the report.
    • runReport

      void runReport(Long projectId, String reportKey, Long filterId, String mapper)
      Run the given report for the given project using the given mapper
      Parameters:
      projectId - The id of the project
      reportKey - The key of the report
      filterId - The filter id used for the report
      mapper - The mapper used for the report (e.g. "labels")
    • browseProject

      void browseProject(String projectKey)
      Navigates to the project's Browse page
      Parameters:
      projectKey - the key of the project e.g. "HSP"
    • browseProjectTabPanel

      void browseProjectTabPanel(String projectKey, String tab)
      Navigates to the project tab panel for the specified project.
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseComponentTabPanel

      void browseComponentTabPanel(String projectKey, String componentName, String tab)
      Navigates to the component tab panel for the specified component.
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      componentName - the name of the component e.g. "New Component 1"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseVersionTabPanel

      void browseVersionTabPanel(String projectKey, String versionName, String tab)
      Navigates to the component tab panel for the specified component.
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      versionName - the name of the version e.g. "New Version 1"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseComponentTabPanel

      void browseComponentTabPanel(String projectKey, String componentName)
      Navigates to Browse Component page of the specified component
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      componentName - the name of the component e.g. "New Component 1"
    • browseVersionTabPanel

      void browseVersionTabPanel(String projectKey, String versionName)
      Navigates to Browse Version page of the specified component
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      versionName - the name of the version e.g. "New Version 1"
    • manageFilters

      FilterNavigation manageFilters()
      Go to the 'Manage filters' screen. Access API to navigate through issue filters.
      Returns:
      filter navigation
    • issue

      Access API to navigate through issues.
      Returns:
      issue navigation
      See Also:
    • comment

      Access API to navigate through comments.
      Returns:
      comment navigation
      See Also:
    • gotoFullContentView

      void gotoFullContentView(String jql)
    • gotoXmlView

      void gotoXmlView(String jql)
    • issueNavigator

      IssueNavigatorNavigation issueNavigator()
      Access API to navigate through issue navigator.
      Returns:
      issue navigator navigation
      See Also:
    • filterPickerPopup

      FilterNavigation filterPickerPopup()
    • userProfile

      UserProfile userProfile()
    • dashboard

      Dashboard dashboard()
      Navigates to the dashboard, returning it.
      Returns:
      the Dashboard.
    • workflows

      Workflows workflows()
    • clickOnNext

      void clickOnNext()
      Clicks on the 'Next' button (useful for bulk edits and such)