Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shinytest2 screenshot defaults to avoid relayout issues #367

Open
gadenbuie opened this issue Oct 27, 2023 · 0 comments
Open

Update shinytest2 screenshot defaults to avoid relayout issues #367

gadenbuie opened this issue Oct 27, 2023 · 0 comments

Comments

@gadenbuie
Copy link
Member

gadenbuie commented Oct 27, 2023

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).

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

No branches or pull requests

1 participant