UNPKG

wdio-ui5-service

Version:

WebdriverIO plugin for testing UI5 browser-based apps

22 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clientSide_checkForUI5Ready = clientSide_checkForUI5Ready; async function clientSide_checkForUI5Ready(browserInstance) { return await browserInstance.execute(async function wdi5_checkForUI5Ready() { if (!window.wdi5 || !window.bridge) { // Local checkForWdi5BrowserReady.js for better performance const wdi5MissingErr = new Error(`WDI5 is not available in the browser context! window.wdi5: ${!!window.wdi5} | window.bridge: ${!!window.bridge}`); console.error(wdi5MissingErr); // eslint-disable-line no-console throw wdi5MissingErr; } try { await window.bridge.waitForUI5(window.wdi5.waitForUI5Options); } catch (error) { return window.wdi5.errorHandling(error); } window.wdi5.Log.info("[browser wdi5] UI5 is ready"); return true; }); } //# sourceMappingURL=_checkForUI5Ready.js.map