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.
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 Max360|800- a typical Android768|1024- iPad portrait1024|768- iPad landscape1366|768- a laptop1920|1080- a FullHD desktop
Typical scenario: setViewport 375|812 → got_to_page →
assertMetaViewportPresent → assertNoHorizontalScroll.