Closed sebage closed 2 years ago
thanks for providing the code that we can use as a minimal reproducible example 👍 we‘ll look into this and report back and meanwhile just fyi: there was a major improvement in detailed error messages coming in with https://github.com/ui5-community/wdi5/commit/f7b318263fe9eebc87ede950feeece51b865dec2 hopefully we didn‘t break exceptions with that 😐👀
Hi @sebage,
bug confirmed! Thanks for reporting that issue.
The error with the message control could not be found
shouldn't be thrown like that. There should be an additional entry in the log like Can not call "getWebElement()", because control could not be found
.
btw: to check that an element is not visible on the screen/does not exist you could als try to use a native wdi5 function called isInitialized()
. This will be false when no DOM element was found. Your check could look something like that:
const oControl = await browser.asControl(controlSelector)
expect(await oControl.isInitialized()).toBeFalsy()
Hi,
as it is not possible with WDI5's browser.asControl() to check if a element does not exist on the screen, we up to now catched the thrown exception (see issue https://github.com/ui5-community/wdi5/issues/139).
Since version 0.9.10 this does not work anymore, as the catch block is not reached anymore:
The yellow part in the attached screenshot was not print out in earlier WDI5 versions (with log level error):
wdi5/wdio-ui5-service
-version: 0.9.10UI5
version: 1.104.2wdio
-version (output ofwdio --version
): 7.19.7node
-version (output ofnode --version
): v16.16.0