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

Method window

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

* Changes the focus of all future commands to another window. Windows may be * specified by their window.name attribute or by its handle * (as returned by WebDriver#getWindowHandles). * * If the specified window cannot be found, the returned promise will be * rejected

(nameOrHandle)

Source from the content-addressed store, hash-verified

2580 * when the driver has changed focus to the specified window.
2581 */
2582 window(nameOrHandle) {
2583 return this.driver_.execute(
2584 new command.Command(command.Name.SWITCH_TO_WINDOW)
2585 // "name" supports the legacy drivers. "handle" is the W3C
2586 // compliant parameter.
2587 .setParameter('name', nameOrHandle)
2588 .setParameter('handle', nameOrHandle),
2589 )
2590 }
2591
2592 /**
2593 * Creates a new browser window and switches the focus for future

Callers

nothing calls this directly

Calls 2

setParameterMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected