Get-WindowSize

Gets the size of the current window.

Powershell

Gets the size of the current window.

Syntax

Get-WindowSize [[-sessionId] ] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.

Examples

Get-WindowSize

C#

Declaration

System.Drawing.Size OpenQA.Selenium.IWindow.Size;

Returns:

type description
ReadOnlyCollection The size of the outer browser window, including title bars and window borders.

Examples

driver.Manage().Window.Size