wdi5: Tests are failing since SAPUI5 version 1.104
Describe the bug We have raised the version of SAPUI5 in our repository. As of version 1.104, the tests no longer seem to run.
To Reproduce Steps to reproduce the behavior:
- Start some WDI5 tests
- Change the Version of UI5 to 1.104 or higher (till 1.108)
- Start the WDI5 tests again
- Get javascript error: Cannot read properties of undefined (reading ‘waitForUI5Options’)
Expected behavior It is expected that the tests will go through normally as before, after the version is raised higher than 1.103.
Logs/Console Output
[chrome 107.0.5304.87 mac os x #0-0] javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')
JavaScript stack:
TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
at eval (eval at executeAsyncScript (:552:26), <anonymous>:4:65)
at eval (eval at executeAsyncScript (:552:26), <anonymous>:33:8)
at eval (eval at executeAsyncScript (:552:26), <anonymous>:33:33)
at executeAsyncScript (<anonymous>:552:47)
at apply.forceSelect (<anonymous>:567:29)
at callFunction (<anonymous>:446:22)
at <anonymous>:460:23
at <anonymous>:461:3
(Session info: headless chrome=107.0.5304.87)
[chrome 107.0.5304.87 mac os x #0-0] javascript error: javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')
[chrome 107.0.5304.87 mac os x #0-0] JavaScript stack:
[chrome 107.0.5304.87 mac os x #0-0] TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
[chrome 107.0.5304.87 mac os x #0-0] at eval (eval at executeAsyncScript (:552:26), <anonymous>:4:65)
[chrome 107.0.5304.87 mac os x #0-0] at eval (eval at executeAsyncScript (:552:26), <anonymous>:33:8)
[chrome 107.0.5304.87 mac os x #0-0] at eval (eval at executeAsyncScript (:552:26), <anonymous>:33:33)
[chrome 107.0.5304.87 mac os x #0-0] at executeAsyncScript (<anonymous>:552:47)
[chrome 107.0.5304.87 mac os x #0-0] at apply.forceSelect (<anonymous>:567:29)
[chrome 107.0.5304.87 mac os x #0-0] at callFunction (<anonymous>:446:22)
[chrome 107.0.5304.87 mac os x #0-0] at <anonymous>:460:23
[chrome 107.0.5304.87 mac os x #0-0] at <anonymous>:461:3
[chrome 107.0.5304.87 mac os x #0-0] (Session info: headless chrome=107.0.5304.87)
[chrome 107.0.5304.87 mac os x #0-0] at async clientSide_getControl (/Users/metehan.dogan/U-NIQ/project-X/node_modules/wdio-ui5-service/client-side-js/getControl.js:3:12)
[chrome 107.0.5304.87 mac os x #0-0]
Screenshots

Runtime Env:
wdi5/wdio-ui5-service-version: 0.9.13UI5version: 1.104 and higher (till 1.108)wdio-version: 7.25.1node-version: v14.18.3- OS: macOS Monterey 12.6
- Browser + Version: 107.0.5304.87
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (7 by maintainers)
Hi everyone, I’ve got the same issue, experience the
javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')@vobu I’ve created a public repo for you guys to reproduce the error.
The repo was created with the Fiori: Open Application Generator provided by VS Code using the SAPUI5 freestyle Application type with an empty page. My chrome is running at the latest version 107.0.5304.88.
The wdi5 was installed using the installation guide and the command
npm init wdi5@latestprovided by the quickstart section.WDI5 Test Repo
Hi @xhton,
thanks for providing a public repo to reproduce your issue. I found the problem and it has to do with your usage of the
goTofunction in thebeforehook:by simply adapting this to:
or completely removing it (as it is not necessary for your simple use case) the tests run 🟢. Of course we should improve the error message when the
goTofunction is not used the right way.Best regards, Simon