We have in protractor like: browser.driver.manage().window().setSize( width - 30, height );
How to achieve this in playwright?
We have in protractor like: browser.driver.manage().window().setSize( width - 30, height );
How to achieve this in playwright?
 
    
    To resize your playwrite browser window: you can use the method page.setViewportSize()
For Example:
import { test, expect, devices } from '@playwright/test';
test('test', async ({ page }) => {
  page.setViewportSize({ width: 600, height: 600 });
  // do stuff then resize to a particular device size 
  page.setViewportSize(devices['iPhone X'].viewport);
}
