Back to all steps

Set viewport size

Step fields
1 width (number)
2 height (number)
In a scenario, fields are joined with |.
Set browser viewport size (responsive testing). Format: width|height in px.
Examples: 375|812 — iPhone · 768|1024 — iPad · 1366|768 — laptop.
Usage example

Set the browser window size. Useful for testing responsive layout — how the site behaves at mobile or tablet resolutions.

Format: width|height in pixels (integers).

Ready-made presets:

  • 375|812 — iPhone 11/12/13/14 (mini)
  • 414|896 — iPhone XR/11 Pro Max
  • 360|800 — a typical Android
  • 768|1024 — iPad portrait
  • 1024|768 — iPad landscape
  • 1366|768 — a laptop
  • 1920|1080 — a FullHD desktop

Typical scenario: setViewport 375|812got_to_pageassertMetaViewportPresentassertNoHorizontalScroll.