com.atlassian.jira.pageobjects
Class WindowSession

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

public class WindowSession
extends Object

Utility for opening new window sessions.

Since:
v4.4

Nested Class Summary
 class WindowSession.BrowserWindow
           
 
Method Summary
 WindowSession.BrowserWindow defaultWindow()
           
 WindowSession.BrowserWindow getWindow(String windowName)
          Get window by given name, the window must already be open
 com.atlassian.pageobjects.elements.query.TimedCondition isWindowOpen(String windowName)
          Timed condition to check and wait for a given window to be open.
 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.

 WindowSession.BrowserWindow openNewWindow(String newWindow)
          Opens a new window with the given name
 WindowSession switchToDefault()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

defaultWindow

public WindowSession.BrowserWindow defaultWindow()

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


Copyright © 2002-2014 Atlassian. All Rights Reserved.