#14059·webdriverio

[ Bug]: negated assertions fail in component tests

Author: christian-bromannCreated Jan 10, 2025Updated Sep 17, 2026
LabelsBug 🐛help wanted

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

typescript
n/a

What happened?

When having assertions like:

typescript
await expect($('nonExisting')).not.toBeExisting()

it fails with:

typescript
[chrome 131.0.6778.265 mac #0-0] Expect $(`div`) not to be existing

Expected [not]: "not existing"
Received      : "existing"
[chrome 131.0.6778.265 mac #0-0] Error: Expect $(`div`) not to be existing
[chrome 131.0.6778.265 mac #0-0]
[chrome 131.0.6778.265 mac #0-0] Expected [not]: "not existing"
[chrome 131.0.6778.265 mac #0-0] Received      : "existing"

even though $('nonExisting').isExisting() correctly returns false.

What is your expected behavior?

The assertion should pass properly.

How to reproduce the bug.

n/a

Relevant log output

typescript
n/a

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