Skip to content

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

fix(mcp): do not mark response as close when there are no tabs (#40743)

Pavel Feldman3cf361902d72
diff --git a/packages/playwright-core/src/tools/backend/response.ts b/packages/playwright-core/src/tools/backend/response.ts
index 54eb8c0cf6..1e287dc86a 100644
--- a/packages/playwright-core/src/tools/backend/response.ts
+++ b/packages/playwright-core/src/tools/backend/response.ts
@@ -251,8 +251,6 @@ export class Response {
addSection('Open tabs', renderTabsMarkdown(tabHeaders));
addSection('Page', renderTabMarkdown(tabHeaders.find(h => h.current) ?? tabHeaders[0]));
}
- if (this._context.tabs().length === 0)
- this._isClose = true;
// Handle modal states.
if (tabSnapshot?.modalStates.length)