devtools
Version:
A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
12 lines (11 loc) • 463 B
JavaScript
/**
* The Get Window Handle command returns the window handle for the current top-level browsing context.
* It can be used as an argument to Switch To Window.
*
* @alias browser.getWindowHandle
* @see https://w3c.github.io/webdriver/#dfn-get-window-handle
* @return {string} Returns a string which is the window handle for the current top-level browsing context.
*/
export default async function getWindowHandle() {
return this.currentWindowHandle;
}