UNPKG

webdriverio-automation

Version:

WebdriverIO-Automation android ios project

20 lines (17 loc) 413 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = switchToWindow; async function switchToWindow({ handle }) { if (!this.windows.has(handle)) { throw new Error(`window with handle ${handle} not found`); } delete this.currentFrame; this.currentWindowHandle = handle; const page = this.getPageHandle(); await page.bringToFront(); return handle; }