Skip to content

[🐛 Bug]: chained selectors behave different in bidi vs classic webdriver #14608

@muhserks

Description

@muhserks

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

22.17

Mode

Standalone Mode

Which capabilities are you using?

What happened?

Chained selectors do not work in bidi like they do with webdriver classic.
For example, lets pretend a call like this:

await $('//div[@id="d1"]').$('./div[@id="d2"]').$('./div[@id="d3"]').waitForExist();

d1 and d2 are existing but d3 does not yet exist.
Now if d2 gets removed and added again to the dom, including d3, then d3 will never be found with bidi.
Like, it does not evaluate the whole chain again.
This works when "wdio:enforceWebDriverClassic": true is set, but not with bidi.

What is your expected behavior?

Evaluate chained elements in bidi, like it is with webdriver classic.

How to reproduce the bug.

https://github.com/muhserks/wdio

There is an example html and spec file.

Relevant log output

Please run example.

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

No one assigned

    Labels

    Bug 🐛help 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