public class

WindowSession

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

Class Overview

Utility for opening new window sessions.

Summary

Nested Classes
class WindowSession.BrowserWindow  
Public Methods
WindowSession.BrowserWindow defaultWindow()
WindowSession.BrowserWindow getWindow(String windowName)
Get window by given name, the window must already be open
TimedCondition isWindowOpen(String windowName)
Timed condition to check and wait for a given window to be open.
TimedCondition isWindowOpen(String windowName, TimeoutType timeoutType)

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

WindowSession.BrowserWindow openNewWindow(String newWindow)
Opens a new window with the given name
WindowSession switchToDefault()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public WindowSession.BrowserWindow defaultWindow ()

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

public 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 PAGE_LOAD.

Parameters
windowName name of the window
Returns
  • timed condition checking whether the window is open

public TimedCondition isWindowOpen (String windowName, 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 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

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

public WindowSession switchToDefault ()