Contexts

session.getWindowHandle()

Get handle of current window

RETURNS

Promise<string>

EXAMPLES

const handle = await session.getWindowHandle();
// handle = 'CDwindow-7321145136535301DE771CCBD9555CEA'

SEE ALSO

session.closeWindow()

Close the current window.

RETURNS

Promise<void>

EXAMPLES

await session.closeWindow();

SEE ALSO

session.switchToWindow(handle)

Change focus to another window. The window to change focus to may be specified by it's server assigned window handle.

PARAMETERS

  • handle: string - Window handle to switch to

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.getWindowHandles()

Get all window handles

RETURNS

Promise<string[]>

EXAMPLES

SEE ALSO

session.switchToFrame(target)

Change focus to another frame on the page

PARAMETERS

  • target: null | number | Element - Identifier for the frame to change focus to

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.switchToParentFrame()

Change focus to parent frame on the page

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.getWindowRect()

Get the size and position on the screen of the operating system window

RETURNS

Promise<WindowRect>

EXAMPLES

SEE ALSO

session.setWindowRect(windowRect)

Set the size and position on the screen of the operating system window

PARAMETERS

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.maximizeWindow()

Maximizes the current window

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.minimizeWindow()

Minimizes the current window

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

session.fullScreenWindow()

This command increases Current window to Full-Screen

RETURNS

Promise<void>

EXAMPLES

SEE ALSO

WindowRect

An object defining the Window Rect.

PROPERTIES

  • x: number - The screenX and screenLeft attributes must return the x-coordinate, relative to the origin of the Web-exposed screen area, of the left of the client window as number of CSS pixels

  • y: number - The screenY and screenTop attributes must return the y-coordinate, relative to the origin of the screen of the Web-exposed screen area, of the top of the client window as number of CSS pixels

  • width: number - The outerWidth attribute must return the width of the client window. If there is no client window this attribute must return zero

  • height: number - The outerWidth attribute must return the height of the client window. If there is no client window this attribute must return zero

Last updated

Was this helpful?