Skip to content

Window

This is a JavaScript wrapper for Window of Selenium .NET library.

Action Summary

Action Description
FullScreen Sets the current window to full screen if it is not already in that state.
GetPosition Gets the position of the browser window relative to the upper-left corner of the screen.
GetSize Gets the size of the outer browser window, including title bars and window borders.
Maximize Maximizes the current window if it is not already maximized.
Minimize Minimizes the current window if it is not already minimized.
SetPosition Sets the position of the browser window relative to the upper-left corner of the screen.
SetSize Sets the size of the outer browser window, including title bars and window borders.

Action Detail

FullScreen

Sets the current window to full screen if it is not already in that state.

Window.FullScreen()

GetPosition

Gets the position of the browser window relative to the upper-left corner of the screen.

Window.GetPosition()

GetSize

Gets the size of the outer browser window, including title bars and window borders.

Window.GetSize()

Maximize

Maximizes the current window if it is not already maximized.

Window.Maximize()

Minimize

Minimizes the current window if it is not already minimized.

Window.Minimize()

SetPosition

Sets the position of the browser window relative to the upper-left corner of the screen.

Window.SetPosition(x, y)

Parameters:

Name Type Description
x number
y number

SetSize

Sets the size of the outer browser window, including title bars and window borders.

Window.SetSize(width, height)

Parameters:

Name Type Description
width number
height number