Package com.atlassian.jira.pageobjects
Class WindowSession
java.lang.Object
com.atlassian.jira.pageobjects.WindowSession
Utility for opening new window sessions.
- Since:
- v4.4
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGet window by given name, the window must already be opencom.atlassian.pageobjects.elements.query.TimedConditionisWindowOpen(String windowName) Timed condition to check and wait for a given window to be open.com.atlassian.pageobjects.elements.query.TimedConditionisWindowOpen(String windowName, com.atlassian.pageobjects.elements.timeout.TimeoutType timeoutType) Timed condition to check and wait for a given window to be open.openNewWindow(String newWindow) Opens a new window with the given name
-
Method Details
-
openNewWindow
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
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
-
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 windowtimeoutType- timeout for the returned condition- Returns:
- timed condition checking whether the window is open
-
isWindowOpen
Timed condition to check and wait for a given window to be open. The condition will wait with a timeout ofTimeoutType.PAGE_LOAD.- Parameters:
windowName- name of the window- Returns:
- timed condition checking whether the window is open
-