Skip to content

[🐛 Bug]: "Return null" leads to unexpected error #11751

@HannaTarasevich

Description

@HannaTarasevich

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

20.10.0

Mode

Standalone Mode

Which capabilities are you using?

capabilities: [{
        browserName: 'chrome',
        browserVersion: 'stable'
    }],

What happened?

I'm using Cucumber + WDIO. If the step contains "return null" it fails

What is your expected behavior?

"Return null" does not impact the execution

How to reproduce the bug.

  1. Please clone this repo: https://github.com/HannaTarasevich/wdio-timeout-issue
  2. npm install
  3. npm run wdio

Actual result: Given I am on the login page fails

Relevant log output

[chrome 119.0.6045.105 windows #0-0] TypeError: Cannot use 'in' operator to search for 'finally' in null
[chrome 119.0.6045.105 windows #0-0] TypeError: Cannot use 'in' operator to search for 'finally' in null
[chrome 119.0.6045.105 windows #0-0]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[chrome 119.0.6045.105 windows #0-0]     at async wrapPromiseWithTimeout (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\time.js:57:12)
[chrome 119.0.6045.105 windows #0-0]     at async Object.run (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\user_code_runner.js:64:22)
[chrome 119.0.6045.105 windows #0-0]     at async Object.run (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\step_runner.js:51:26)
[chrome 119.0.6045.105 windows #0-0]     at async TestCaseRunner.invokeStep (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:95:16)
[chrome 119.0.6045.105 windows #0-0]     at async TestCaseRunner.runStep (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:244:26)
[chrome 119.0.6045.105 windows #0-0]     at async C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:175:44
[chrome 119.0.6045.105 windows #0-0]     at async TestCaseRunner.aroundTestStep (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:120:32)       
[chrome 119.0.6045.105 windows #0-0]     at async TestCaseRunner.runAttempt (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:158:13)
[chrome 119.0.6045.105 windows #0-0]     at async TestCaseRunner.run (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\test_case_runner.js:136:35)
[chrome 119.0.6045.105 windows #0-0]     at async Runtime.runTestCase (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\index.js:40:24)
[chrome 119.0.6045.105 windows #0-0]     at async Runtime.start (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\runtime\index.js:61:13)
[chrome 119.0.6045.105 windows #0-0]     at async runCucumber (C:\wdio-timeoutissue\node_modules\@cucumber\cucumber\lib\api\run_cucumber.js:106:21)

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions