Skip to content

Update shinytest2 screenshot defaults to avoid relayout issues #367

@gadenbuie

Description

@gadenbuie

Following up on rstudio/chromote#129, there are two things that shinytest2 can do:

  1. When selector = "viewport", shinytest2 can set captureBeyondViewport = FALSE for chromote's screenshot method.

  2. When selector = "scrollable_area", shinytest2 could query Chrome to determine how big the scrollable area is, then resize the viewport to match that size before screenshotting with captureBeyondViewport = FALSE, followed by restoring the viewport size.

    This option is more or less the pattern used by puppeteer, mentioned in ChromoteSession$screenshot() triggers a page resize before screenshot. chromote#96 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions