Member-only story
The playwright window maximizes and views responsively.
playwright window maximize and view responsive
What is maximized in automation?
If you run the automation, the page will show only a particular shape/size in Playwright. But we need to see the details of the big or maximized view and need to use this setup.
This is the default screen size when you click the test. But if we want to check the responsiveness, it should maximize the window.
use this alteration
import { chromium, test } from '@playwright/test';
test("new mode", async () => {
const browser = await chromium.launch({args: ['--start-maximized'],});
// just {args: ['--start-maximized']}
const context = await browser.newContext({viewport: null});
// add {viewport : null}
const page = await context.newPage();
// do stuff
await page.goto('https://demoqa.com/');
await browser.close();
});Now let's check the test screen.








