Skip to content

[🐛 Bug]: driver.closeWindow() returns TypeError: Cannot read properties of undefined (reading 'length') #14678

@Glenn-APG

Description

@Glenn-APG

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.15.0

Node.js Version

20.12.2

Mode

WDIO Testrunner

Which capabilities are you using?

What happened?

We noticed when upgrading from Webdriverio version 8.29.1 to version 9.15.0, that "await driver.closeWindow()" suddenly throws following error "TypeError: Cannot read properties of undefined (reading 'length')" which fails our test.

Besides the error the window closes successfully. The "length" error could be ignored.

What is your expected behavior?

No response

How to reproduce the bug.

Open a mobile browser
execute "await driver.closeWindow();"

Relevant log output

TypeError: Cannot read properties of undefined (reading 'length')

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions