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

Method setRect

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

* Sets the current top-level window's size and position. You may update just * the size by omitting `x` & `y`, or just the position by omitting * `width` & `height` options. * * @param {{x: (number|undefined), * y: (number|undefined), * width: (number|undefined),

({ x, y, width, height })

Source from the content-addressed store, hash-verified

2257 * rect.
2258 */
2259 setRect({ x, y, width, height }) {
2260 return this.driver_.execute(
2261 new command.Command(command.Name.SET_WINDOW_RECT).setParameters({
2262 x,
2263 y,
2264 width,
2265 height,
2266 }),
2267 )
2268 }
2269
2270 /**
2271 * Maximizes the current window. The exact behavior of this command is

Callers 3

setSizeMethod · 0.95
window_test.jsFile · 0.80
changeSizeByFunction · 0.80

Calls 2

setParametersMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected