From 637e82796b492bcbc82d26753a019972b31a26fd Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Fri, 17 May 2024 14:02:46 +0800 Subject: [PATCH] fix(webdriver): emit single HTTPRequest for Auth requests (#12455) --- packages/puppeteer-core/src/bidi/core/BrowsingContext.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/puppeteer-core/src/bidi/core/BrowsingContext.ts b/packages/puppeteer-core/src/bidi/core/BrowsingContext.ts index 61ba049e4ed..8f0889cf4ca 100644 --- a/packages/puppeteer-core/src/bidi/core/BrowsingContext.ts +++ b/packages/puppeteer-core/src/bidi/core/BrowsingContext.ts @@ -252,8 +252,9 @@ export class BrowsingContext extends EventEmitter<{ if (event.context !== this.id) { return; } - if (event.redirectCount !== 0) { + if (this.#requests.has(event.request.request)) { // Means the request is a redirect. This is handled in Request. + // Or an Auth event was issued return; }