Skip to content

Conversation

@omacranger
Copy link
Member

@omacranger omacranger commented Dec 5, 2025

Description

Adds an option to resize the viewport when taking a screenshot by using the screenshotOptions.autoSizeViewport option in sauceVisualCheck. This option resizes the viewport to match the document or body scroll height before capturing to prevent scroll+stitch artifacts present in the default full page capture.

Example:

await sauceVisual.visualCheck("Inventory Page", {
    screenshotOptions: {
        autoSizeViewport: true,
    }
});

Types of Changes

What types of changes does your code introduce? Keep the ones that apply:

  • New feature (non-breaking change which adds functionality)
  • Configuration change

@omacranger omacranger merged commit 618fd95 into main Dec 10, 2025
2 checks passed
@omacranger omacranger deleted the feat/playwright-auto-viewport-only branch December 10, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants