From 6300a1b5aa34e4a3e6e20bdaf9e2d5ee7530ac6a Mon Sep 17 00:00:00 2001 From: Volker Buzek Date: Wed, 16 Feb 2022 18:11:09 +0100 Subject: [PATCH] fix: make usable in fluent async api --- client-side-js/_getAggregation.js | 2 +- client-side-js/getControl.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client-side-js/_getAggregation.js b/client-side-js/_getAggregation.js index 0aad8f80..1cdb079f 100644 --- a/client-side-js/_getAggregation.js +++ b/client-side-js/_getAggregation.js @@ -1,5 +1,5 @@ async function clientSide_getAggregation(webElement, aggregationName) { - webElement = await Promise.resolve(webElement) + webElement = await Promise.resolve(webElement) // to plug into fluent async api return await browser.executeAsync( (webElement, aggregationName, done) => { window.bridge.waitForUI5(window.wdi5.waitForUI5Options).then(() => { diff --git a/client-side-js/getControl.js b/client-side-js/getControl.js index 0162ee92..e973fad3 100644 --- a/client-side-js/getControl.js +++ b/client-side-js/getControl.js @@ -1,4 +1,5 @@ async function clientSide_getControl(controlSelector) { + controlSelector = await Promise.resolve(controlSelector) // to plug into fluent async api return await browser.executeAsync((controlSelector, done) => { const waitForUI5Options = Object.assign({}, window.wdi5.waitForUI5Options) if (controlSelector.timeout) {