Skip to content

[🐛 Bug]: Recurring Timeout issues #14276

@Chudy1

Description

@Chudy1

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

v22.13.1

Mode

WDIO Testrunner

Which capabilities are you using?

capabilities: [
    {
      browserName: "chrome",
    },
  ],

What happened?

Description:

When executing the script, as attached in the github project linked below, I get a timeout error. I increased all the timeouts available in the project but still got the same error.

  1. Navigate to [https://play.mtn.ng/login].
  2. Click on the Cookies button.
  3. Click on the Cancel button [X] Pop up.
  4. Click on the Sign In button.

Then a timeout error occurs even though the timeouts has been increased.

What is your expected behavior?

I expected the code to continue running. There is no issue with the code or logic or application under test

How to reproduce the bug.

To reproduce the bug, create the following codes:

Firstly create a wdio project using the wedriverio wizzard or simply clone the repo using the repository link:

  1. The page objects file:

`const { $ } = require("@wdio/globals");

class LoginPage {

get inputUsername() {
return $("#username");
}

get inputPassword() {
return $("#password");
}

get btnSubmit() {
return $('button[type="submit"]');
}

async login(username, password) {
await this.inputUsername.setValue(username);
await this.inputPassword.setValue(password);
await this.btnSubmit.click();
}

}

module.exports = new LoginPage();`

  1. Create the test file:

`const { expect, browser } = require("@wdio/globals");
const userloginPage = require("../pageobjects/userLogin.page");

describe("User Login Validation", () => {
const stagingPhoneNumber = process.env.stagingNumber;

it("User Login Test", async () => {
await browser.url(https://play.mtn.ng/login)
await userloginPage.clickCookiesBtn();
await userloginPage.clickCancelSign();
await browser.pause(5000);
await userloginPage.clickSigninBtn();
await userloginPage.enterMobileNumber(stagingPhoneNumber);
await userloginPage.clickOtpIcon();
await browser.pause(2000);
await userloginPage.enterOtpNumber();
await browser.pause(3000);
await userloginPage.checkLoginMessage();
});
});`

  1. Then run the command: npm run wdio

Relevant log output

{"type":"xpath","value":"//div[@class ='banner-close1 btn-ib-close']"},"context":"85FF3ABC83FF1B5C1F36C9F2D55F6A62"}
[0-0] 2025-03-12T12:18:20.739Z INFO webdriver: BIDI RESULT {"id":53,"result":{"nodes":[]},"type":"success"}
[0-0] 2025-03-12T12:18:21.223Z INFO webdriver: BIDI COMMAND browsingContext.locateNodes {"locator":{"type":"xpath","value":"//div[@class ='banner-close1 btn-ib-close']"},"context":"85FF3ABC83FF1B5C1F36C9F2D55F6A62"}
[0-0] 2025-03-12T12:18:21.228Z INFO webdriver: BIDI RESULT {"id":54,"result":{"nodes":[]},"type":"success"}
[0-0] 2025-03-12T12:18:21.285Z INFO webdriver: COMMAND takeScreenshot()
[0-0] 2025-03-12T12:18:21.286Z INFO webdriver: [GET] http://localhost:58047/session/6b8bbcbf89de5bd7b9fcadf05e446cd5/screenshot
[0-0] 2025-03-12T12:18:21.539Z INFO webdriver: RESULT iVBORw0KGgoAAAANSUhEUgAABVYAAAJFCAIAAAC5vjv+AAAAAXNSR0IArs4c6...
[0-0] Error in "User Login Validation.User Login Test"
Error: Timeout
    at Timeout._onTimeout (C:\WebdriverIO\WebdriverIO_project_Play\node_modules\@wdio\utils\build\index.js:1020:20)
    at listOnTimeout (node:internal/timers:614:17)
    at process.processTimers (node:internal/timers:549:7)
[0-0] 2025-03-12T12:18:21.559Z INFO webdriver: COMMAND deleteSession()
[0-0] 2025-03-12T12:18:21.559Z INFO webdriver: [DELETE] http://localhost:58047/session/6b8bbcbf89de5bd7b9fcadf05e446cd5
[0-0] 2025-03-12T12:18:21.734Z INFO webdriver: BIDI COMMAND script.addPreloadScript { functionDeclaration: <PreloadScript[1319 bytes]>, contexts: undefined }
[0-0] 2025-03-12T12:18:21.734Z INFO webdriver: COMMAND getWindowHandle()
[0-0] 2025-03-12T12:18:21.735Z INFO webdriver: BIDI COMMAND session.subscribe {"events":["log.entryAdded","browsingContext.navigationStarted"]}
[0-0] 2025-03-12T12:18:21.735Z INFO webdriver: [GET] http://localhost:58047/session/6b8bbcbf89de5bd7b9fcadf05e446cd5/window
[0-0] 2025-03-12T12:18:21.936Z INFO webdriver: RESULT null
[0-0] 2025-03-12T12:18:21.937Z INFO webdriver: Close Bidi connection to ws://127.0.0.1:58047/session/6b8bbcbf89de5bd7b9fcadf05e446cd5
[0-0] 2025-03-12T12:18:21.939Z INFO webdriver: Kill driver process with PID 15020
[0-0] 2025-03-12T12:18:21.962Z WARN webdriver: WebDriverError: Request failed with error code ECONNRESET when running "window" with method "GET"
[0-0] 2025-03-

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