When I save fullscreen "width" x "height" screenshot

Resizes the browser viewport to the given width and height (in pixels), then saves a full-page screenshot as an action step within the scenario flow. The capture covers the entire scrollable height of the page at the chosen width. A PNG image and a matching .html snapshot of the page source are written to the screenshot directory (default ./screenshots, configurable with WEBSHIP_SCREENSHOT_DIR or the screenshot.dir world parameter).

Use this variant mid-scenario when you want a complete responsive snapshot before continuing with interactions or assertions. The width determines how the layout reflows, and the full-page capture includes everything below the fold. The viewport remains resized for the rest of the scenario, so account for that in any layout-sensitive steps that follow.

Accepted phrasings

When I save fullscreen 1440 x 900 screenshot
When we save fullscreen 1440 x 900 screenshot
When save fullscreen 1440 x 900 screenshot
Then I save fullscreen 375 x 667 screenshot
And I save fullscreen 768 x 1024 screenshot

Examples

When I save fullscreen 1200 x 800 screenshot
When I save fullscreen 375 x 812 screenshot
When I save fullscreen 1366 x 768 screenshot
When I save fullscreen 414 x 896 screenshot

In a real scenario

Scenario: Capture the long article page at phone width before checking the header
  Given I am an anonymous user
    And I am on "/long-article"
   When I wait 2 seconds
    And I save fullscreen 414 x 896 screenshot
    And I scroll down 600
   Then the "site header" should have the "scrolled" class within 5 seconds

Related steps

Back to Screenshot Steps