Skip to content

[🐛 Bug]: browser.waitUntil() is not throwing custom error message #10495

@nils-hoyer

Description

@nils-hoyer

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.8.3

Node.js Version

v18.12.0

Mode

WDIO Testrunner

Which capabilities are you using?

automationProtocol: 'devtools', 
browserName: 'chrome',
'goog:chromeOptions': {
   args: ['--incognito', '--window-size=1920,1080'],
 },

What happened?

the function browser.waitUntil() is not throwing custom error message

What is your expected behavior?

throwing the custom error message over the internal error message.

How to reproduce the bug.

describe('browser.waitUntil() tests', async () => {
    it('should throw custom error message', async () => {
        await browser.waitUntil(() => false, { timeoutMsg: 'timeoutMsg will be ignored' });
    });
});

Relevant log output

[chrome 113.0.0.0 win32 #0-0] browser test
[chrome 113.0.0.0 win32 #0-0]     should throw custom error message
[chrome 113.0.0.0 win32 #0-0]
[chrome 113.0.0.0 win32 #0-0] 1 failing (10.1s)
[chrome 113.0.0.0 win32 #0-0]
[chrome 113.0.0.0 win32 #0-0] 1) browser test should throw custom error message
[chrome 113.0.0.0 win32 #0-0] waitUntil condition failed with the following reason: return value was never truthy

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

Labels

Bug 🐛good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions