Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(recorder): don't record duplicate goto for repeated navigation signal (#42027)
microsoft-playwright-automation[bot]b8e76e5990e3
diff --git a/packages/playwright-core/src/server/recorder/recorderSignalProcessor.ts b/packages/playwright-core/src/server/recorder/recorderSignalProcessor.tsindex 6c970ef831..8624cf1863 100644--- a/packages/playwright-core/src/server/recorder/recorderSignalProcessor.ts+++ b/packages/playwright-core/src/server/recorder/recorderSignalProcessor.ts@@ -133,6 +133,12 @@ export class RecorderSignalProcessor {const lastAction = this._lastAction;const signalThreshold = isUnderTest() ? 500 : 5000;+ // A duplicate navigation signal to the URL we already recorded a goto for+ // (e.g. a second commit for the same about:blank navigation) must not+ // produce a second identical goto.+ if (lastAction?.action.name === 'navigate' && lastAction.pageGuid === frame._page.guid && lastAction.action.url === frame.url())+ return;+let generateGoto = false;if (!lastAction)generateGoto = true;