Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(recorder): do not ignore signals except for navigation (#30994)

Dmitry Gozmanc906448fe2f1
diff --git a/packages/playwright-core/src/server/recorder/codeGenerator.ts b/packages/playwright-core/src/server/recorder/codeGenerator.ts
index ac102e1d34..d3bb5f86d9 100644
--- a/packages/playwright-core/src/server/recorder/codeGenerator.ts
+++ b/packages/playwright-core/src/server/recorder/codeGenerator.ts
@@ -130,7 +130,8 @@ export class CodeGenerator extends EventEmitter {
this._currentAction.action.signals.push(signal);
return;
}
- if (this._lastAction && !this._lastAction.committed) {
+
+ if (this._lastAction && (!this._lastAction.committed || signal.name !== 'navigation')) {
const signals = this._lastAction.action.signals;
if (signal.name === 'navigation' && signals.length && signals[signals.length - 1].name === 'download')
return;