From a74667f78d6569c31da8378874a8d30defda8ed2 Mon Sep 17 00:00:00 2001 From: Volker Buzek Date: Sun, 13 Feb 2022 14:34:12 +0100 Subject: [PATCH] feat(wdio-ui5-service): assert ui5 page --- src/lib/wdi5-bridge.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/wdi5-bridge.ts b/src/lib/wdi5-bridge.ts index e710d7fa..2e1710df 100644 --- a/src/lib/wdi5-bridge.ts +++ b/src/lib/wdi5-bridge.ts @@ -111,6 +111,13 @@ export async function injectUI5(config: wdi5Config) { return result } +export async function checkForUI5Page() { + // sap in global window namespace denotes (most likely :) ) that ui5 is present + return await browser.executeAsync((done) => { + done(!!window.sap) + }) +} + //****************************************************************************************** /**