From ee651c68d3d5390e07f3214da74a5a570c3a904e Mon Sep 17 00:00:00 2001 From: shadowusr Date: Sun, 3 May 2026 02:17:54 +0300 Subject: [PATCH 1/2] fix: add an option to disable auto-retrying of cancelled request --- .../webdriverio/src/commands/browser/url.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/webdriverio/src/commands/browser/url.ts b/packages/webdriverio/src/commands/browser/url.ts index 459e7eeeabd..95919f3e026 100644 --- a/packages/webdriverio/src/commands/browser/url.ts +++ b/packages/webdriverio/src/commands/browser/url.ts @@ -216,6 +216,10 @@ export async function url ( url: path, wait }).catch((err) => { + if (options._noFallbackOnCancel) { + throw err + } + /** * It seems that WebDriver Bidi runs into issue with concurrent navigation. * @see https://github.com/w3c/webdriver-bidi/issues/878 @@ -326,4 +330,18 @@ interface UrlCommandOptions { * Checkout `browser.addPreloadScript` for a more versatile way to mock the environment. */ onBeforeLoad?: () => unknown + /** + * @internal + * + * UNSTABLE / INTERNAL — not part of the public API. May be renamed or removed at any time + * without notice and without a major version bump. Do not rely on this in user code. + * + * Used internally to disable the automatic fallback that re-issues the navigation when the + * driver reports a concurrent-navigation error (Chrome: "navigation canceled by concurrent + * navigation", Firefox: "failed with error: unknown error"). Intended for callers that + * intentionally cancelled the navigation and want the original error to propagate. + * + * @default false + */ + _noFallbackOnCancel?: boolean } From acd7a1a934170966cd39a4b2071195d07600fe51 Mon Sep 17 00:00:00 2001 From: shadowusr Date: Fri, 15 May 2026 00:42:03 +0300 Subject: [PATCH 2/2] chore: bump package version to 9.5.28 --- packages/webdriverio/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webdriverio/package.json b/packages/webdriverio/package.json index bbf9526e754..6d7a20073f3 100644 --- a/packages/webdriverio/package.json +++ b/packages/webdriverio/package.json @@ -1,7 +1,7 @@ { "name": "@testplane/webdriverio", "description": "Next-gen browser and mobile automation test framework for Node.js", - "version": "9.5.27", + "version": "9.5.28", "homepage": "https://webdriver.io", "author": "Christian Bromann ", "license": "MIT",