Skip to content

[🐛 Bug]: Errors interacting with native browser dialogs (Bidi protocol) #14295

@joao-motork

Description

@joao-motork

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.12.0

Node.js Version

20.17.0

Mode

WDIO Testrunner

Which capabilities are you using?

{
    browserName: "chrome",
    "goog:chromeOptions": {
            args: [
            "--no-sandbox",
            "--start-maximized",
            "--window-size=1920,1080",
            "--disable-dev-shm-usage",
            //"--headless=new",
            "--lang=en-GB"
        ]
    },
    // "wdio:enforceWebDriverClassic": true,
}

What happened?

I am testing an application that uses native browser dialogs to confirm some user actions (like deletes, ...). With Bidi protocol, I face 2 issues that do not happen with WebdriverClassic.

  1. Sometimes, the dialog does not open or opens and closes automatically and almost immediately. This causes the error: "no such alert: WebDriverError: no such alert"
  2. When the first error does not happen, and there is an interaction with the dialog, then there is the following error on the next action after the dialog interaction: "no such frame - Context 9467FF542C3FAB062A8D6E7FF8570DD9 not found". When this error happens, the test breaks and the browser remains open until I manually close it.

What is your expected behavior?

To have a similar behavior as we have running the tests with WebdriverClassic.

How to reproduce the bug.

For the first error, here is a reproducible example:
browser_native_dialogs.zip

And the logs of the error happening:
log_1.txt

For the second example, I cannot provide a reproducible example (maybe after you first the first one, you will face this one), just the logs:

log_2.txt

Relevant log output

Provided above.

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 🐛Needs InvestigationIssues that require more information on the problem.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