Testing
Playwright setViewportSize
Set the page viewport in CSS pixels. This is not a full device simulation.
Formal Syntax & Structure
react syntaxreact
await page.setViewportSize({width:320,height:800})Working Example
Example Snippetreact
await page.setViewportSize({width:320,height:800})