Skip to content

Can't set cy.viewport larger than 3000 pixels #5181

Closed
@joanrieu

Description

@joanrieu

Current behavior:

Cypress cannot take a 4K screenshot because the viewport dimensions are capped at 3000px (width or height).

Desired behavior:

Cypress should be able to create a 4K viewport and take screenshots of it since 4K screen are common nowadays.

Steps to reproduce:

Try setting the viewport to 4K. Get an error message related to the viewport size being too large.

I tried to manually remove the bound check from Cypress code but the screenshot did not have 4K resolution even though no other error appeared.

Versions

Latest Cypress version (installed last week)
Window 10
Chrome (up to date)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions