Skip to content

Multi tabs, after calling closeWindow , switchWindow fails with 'WebDriverError: no such window: target window already closed #13989

@jhaltrecht-rev

Description

@jhaltrecht-rev

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

22.9

Mode

WDIO Testrunner

Which capabilities are you using?

capabilities: [
    {
      browserName: "chrome",
      "wdio:enforceWebDriverClassic": true,
}]

What happened?

This is the same bug that was reported by issue 13882. Erwin H in the Support Chat mentioned to create a new issue off of that PR. To avoid repeating details, the original issue is #13882

What is your expected behavior?

To not receive errors when switching windows and closing.

How to reproduce the bug.

See details in #13882

Relevant log output

WebDriverError: no such window: target window already closed

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