MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / setSize

Method setSize

javascript/selenium-webdriver/lib/webdriver.js:2422–2428  ·  view source on GitHub ↗

* Sets the width and height of the current window. (window.resizeTo) * @param x * @param y * @param width * @param height * @param windowHandle * @returns {Promise }

({ x = 0, y = 0, width = 0, height = 0 }, windowHandle = 'current')

Source from the content-addressed store, hash-verified

2420 * @returns {Promise<void>}
2421 */
2422 async setSize({ x = 0, y = 0, width = 0, height = 0 }, windowHandle = 'current') {
2423 if (windowHandle !== 'current') {
2424 this.log_.warning(`Only 'current' window is supported for W3C compatible browsers.`)
2425 }
2426
2427 await this.setRect({ x, y, width, height })
2428 }
2429}
2430
2431/**

Callers

nothing calls this directly

Calls 2

setRectMethod · 0.95
warningMethod · 0.80

Tested by

no test coverage detected