Skip to content

Commit 5406e8e

Browse files
authored
fix(browser): don't scale the iframe if UI is disabled (#9018)
1 parent f3ec6fc commit 5406e8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/browser-playwright/src/playwright.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ export class PlaywrightBrowserProvider implements BrowserProvider {
365365
if (this.project.config.browser.ui) {
366366
options.viewport = null
367367
}
368+
else {
369+
// if UI is disabled, keep the iframe scale to 1
370+
options.viewport ??= this.project.config.browser.viewport
371+
}
368372
const context = await browser.newContext(options)
369373
await this._throwIfClosing(context)
370374
if (actionTimeout != null) {

0 commit comments

Comments
 (0)