Class WindowSession

java.lang.Object
com.atlassian.jira.pageobjects.WindowSession

public class WindowSession extends Object
Utility for opening new window sessions.
Since:
v4.4
  • Method Details

    • openNewWindow

      public WindowSession.BrowserWindow openNewWindow(String newWindow)
      Opens a new window with the given name
      Parameters:
      newWindow - the name of the new window
      Returns:
      a window that you can switch to when you want focus
    • getWindow

      public WindowSession.BrowserWindow getWindow(String windowName)
      Get window by given name, the window must already be open
      Parameters:
      windowName - name of the window
      Returns:
      browser window
      Throws:
      IllegalStateException - if window with windowName is currently not open
    • switchToDefault

      public WindowSession switchToDefault()
    • isWindowOpen

      public com.atlassian.pageobjects.elements.query.TimedCondition isWindowOpen(String windowName, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType)

      Timed condition to check and wait for a given window to be open.

      NOTE: this does NOT mean that this window has focus, it only means that it is one of the driver windows that the underlying driver is aware of. Use WindowSession.BrowserWindow.switchTo() to switch driver's focus to given window.

      Parameters:
      windowName - name of the window
      timeoutType - timeout for the returned condition
      Returns:
      timed condition checking whether the window is open
    • isWindowOpen

      public com.atlassian.pageobjects.elements.query.TimedCondition isWindowOpen(String windowName)
      Timed condition to check and wait for a given window to be open. The condition will wait with a timeout of TimeoutType.PAGE_LOAD.
      Parameters:
      windowName - name of the window
      Returns:
      timed condition checking whether the window is open