Skip to main content

setWindowSize

Overview

Use the setWindowSize command to change the outer size of the browser window to the specified width and height.

Usage

await browser.setWindowSize(width, height);

Command Parameters

NameTypeDescription
widthNumberThe width of the browser window to set.
heightNumberThe height of the browser window to set.

References

We'd like to give credit to the original WebdriverIO docs article, from which we drew some information while writing our version.