ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

3.0.0-rc.0: TypeError: browserInstance.goTo is not a function #648

Open xLexip opened 5 days ago

xLexip commented 5 days ago

To Reproduce I have a basic test with

before(async function () {
    await wdi5.goTo({ sHash: "#/business-objects" });
});

Logs/Console Output

[...]

[firefox 134.0a1 linux #0-0] browserInstance.goTo is not a function
[firefox 134.0a1 linux #0-0] TypeError: browserInstance.goTo is not a function
[firefox 134.0a1 linux #0-0]     at Function.<anonymous> (/builds/project/node_modules/wdio-ui5-service/src/wdi5.ts:117:35)
[firefox 134.0a1 linux #0-0]     at step (/builds/project/node_modules/wdio-ui5-service/cjs/wdi5.js:33:23)
[firefox 134.0a1 linux #0-0]     at Object.next (/builds/project/node_modules/wdio-ui5-service/cjs/wdi5.js:14:53)
[firefox 134.0a1 linux #0-0]     at /builds/project/node_modules/wdio-ui5-service/cjs/wdi5.js:8:71
[firefox 134.0a1 linux #0-0]     at new Promise (<anonymous>)
[firefox 134.0a1 linux #0-0]     at __awaiter (/builds/project/node_modules/wdio-ui5-service/cjs/wdi5.js:4:12)
[firefox 134.0a1 linux #0-0]     at Function.wdi5.goTo (/builds/project/node_modules/wdio-ui5-service/src/wdi5.ts:105:5)
[firefox 134.0a1 linux #0-0]     at Context.<anonymous> (/builds/project/test/app/e2e-tests/business-objects/bo-templates.test.js:16:14)
Spec Files:  0 passed, 3 failed, 3 total (100% completed) in 00:00:48  

Runtime Env (please complete the following information):

Additional context The test are run in an GitLab CI environment with --headless.

Siolto commented 5 days ago

Hi @xLexip,

thanks for reporting this issue. I could reproduce it.

It seems like since v9 the hooks have changed their internal behavior. We need to investigate this further. As a workaround you could move your wdi5.goTo(...) directly into an it(...) step.

Regards Simon