Closed nair-sumesh closed 2 years ago
if you're late-injecting wdi5
, with the new async notation, you need to await
the injection:
await wdioUI5Service.injectUI5()
if you're late-injecting
wdi5
, with the new async notation, you need toawait
the injection:
await wdioUI5Service.injectUI5()
Thanks @vobu for the suggestion. The occurrence of the error have now reduced to one. The error is still raised as soon as the test starts.
right on, just for reference: we're having a test for this as well at https://github.com/js-soft/wdi5/blob/develop/wdio-ui5-service/test/ui5-late.test.js i'm taking the liberty to close this
@nair-sumesh I met the same issue, and finally I found I missed the skipInjectUI5OnStart: true
config. Example: https://github.com/js-soft/wdi5/blob/develop/wdio-ui5-service/test/wdio-ui5-late.conf.js#L99
@cwang1221 @vobu In my conf file, I have set
skipInjectUI5OnStart: true
url: 'index.html'
and
baseUrl,
Later in my spec, I call
await browser.url(sBaseUrl); // sBaseUrl contains the entire URL path to the SAP system
const _ui5Service = require('wdio-ui5-service').default
const wdioUI5Service = new _ui5Service()
await wdioUI5Service.injectUI5()
Observations
@vobu Your help is appreciated.
@nair-sumesh do you have
wdi5: { url: "index.html" ... }
in your config?
@nair-sumesh do you have
wdi5: { url: "index.html" ... }
in your config?
Yes.
wdi5: {
screenshotPath: path.join('wdio-ui5-service', 'test', 'report', 'screenshots'),
logLevel: 'verbose', // error | verbose | silent
platform: 'browser', // electron, browser, android, ios
url: 'index.html',
deviceType: 'web',
waitForUI5Timeout: 15000,
skipInjectUI5OnStart: true
},
The flow with skipInjectUI5OnStart: true
works like:
wdioUI5Service.injectUI5()
url
property from config to startSo my guess would be to set the url
property to empty string ""
in case you don't need it.
Thanks @dominikfeininger . This worked.
Describe the bug Receiving below error several times at the beginning of the test code execution. My test cases passed successfully though. Could this message be resolved or suppressed.
Code
After this statement the error is raised several times in a row, before the actual actions/assertions are executed.
Logs/Console Output
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: 0.8.1wdio
-version : 7.16.12node
-version : 14.17.4OS
: WIN10Browser + Version
: ChromeDriver 96.0.4664.45