You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write a wdi5 test for a simple SAPUI5 webpage, but I need to change the URL parameters before running the tests. For example: the baseURL is localhost:8080/index.html, so before I run the test I want to navigate to localhost:8080/index.html?param=true.
Here's the code sample of what I tried to do:
describe("samples",()=>{before(async()=>{awaitbrowser.goTo('?test=param')// all these options failed// await wdi5.goTo('?test=param')// await wdi5.goTo({ sHash: '?test=param' })})it("should log",()=>{constlogger=wdi5.getLogger()logger.log("hello world!")})it("should retrieve a UI5 control",async()=>{constappLocator={selector: {controlType: "sap.m.App",viewName: "test_sandbox.view.App"}}constapp=awaitbrowser.asControl(appLocator)// seems to crash around here expect(app).toBeDefined()})...
When I run this test, I see the URL changing but I get the following error and the test fails:
[0-0] 2024-03-21T12:55:30.125Z ERROR webdriver: Request failed with status 500 due to javascript error: javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')
[0-0] JavaScript stack:
[0-0] TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
[0-0] at eval (eval at executeAsyncScript (:447:26), <anonymous>:4:65)
[0-0] at eval (eval at executeAsyncScript (:447:26), <anonymous>:33:8)
[0-0] at eval (eval at executeAsyncScript (:447:26), <anonymous>:33:33)
[0-0] at executeAsyncScript (<anonymous>:447:47)
[0-0] at apply.selector.id (<anonymous>:462:29)
[0-0] at callFunction (<anonymous>:341:22)
[0-0] at <anonymous>:355:23
[0-0] at <anonymous>:356:3
[0-0] (Session info: chrome=122.0.6261.129)
[0-0] javascript error in "samples.should open and close Hello World dialog"
javascript error: javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')
JavaScript stack:
TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
at eval (eval at executeAsyncScript (:447:26), <anonymous>:4:65)
at eval (eval at executeAsyncScript (:447:26), <anonymous>:33:8)
at eval (eval at executeAsyncScript (:447:26), <anonymous>:33:33)
at executeAsyncScript (<anonymous>:447:47)
at apply.selector.id (<anonymous>:462:29)
at callFunction (<anonymous>:341:22)
at <anonymous>:355:23
at <anonymous>:356:3
(Session info: chrome=122.0.6261.129)
at async clientSide_getControl (/Users/i538205/Projects/test_sandbox/node_modules/wdio-ui5-service/client-side-js/getControl.cjs:3:12)
at async WDI5Control._getControl (file:///Users/i538205/Projects/test_sandbox/node_modules/wdio-ui5-service/src/lib/wdi5-control.ts:692:26)
at async WDI5Control.init (file:///Users/i538205/Projects/test_sandbox/node_modules/wdio-ui5-service/src/lib/wdi5-control.ts:95:31)
at async Browser.<anonymous> (file:///Users/i538205/Projects/test_sandbox/node_modules/wdio-ui5-service/src/lib/wdi5-bridge.ts:263:33)
[0-0] FAILED in chrome - file:///webapp/test/e2e/sample.test.ts
This project was created using the easy-ui5 generator and the npm init wdi5@latest -- --ts command.
I am using:
npm v9.8.1
node v18.18.2
wdi5 v2.0.6
wdio v8.34.1
Can someone help me with this? How can I navigate with the URL params and achieve my tests?
Thank you
The text was updated successfully, but these errors were encountered:
We expected to change the URL params while running the test suites. For example: test case where if language_code param in the url changes, the page language also changes.
I am trying to write a wdi5 test for a simple SAPUI5 webpage, but I need to change the URL parameters before running the tests. For example: the baseURL is
localhost:8080/index.html
, so before I run the test I want to navigate tolocalhost:8080/index.html?param=true
.Here's the code sample of what I tried to do:
When I run this test, I see the URL changing but I get the following error and the test fails:
This project was created using the easy-ui5 generator and the
npm init wdi5@latest -- --ts
command.I am using:
Can someone help me with this? How can I navigate with the URL params and achieve my tests?
Thank you
The text was updated successfully, but these errors were encountered: