wch / webshot

Take screenshots of web pages from R
http://wch.github.io/webshot/
227 stars 40 forks source link

webshot::appshot() not getting the complete rendered shiny app #122

Closed jebyrnes closed 8 months ago

jebyrnes commented 8 months ago

I'm writing a Shiny tutorial in RMarkdown, and am running the app as it is built, but taking screenshots using webshot. As the data for the app is somewhat large, and I'm plotting maps, the whole thing takes 2-4 seconds to load all of the images. So I added a delay to appshot(). But, I still get outputs of only the app before plotting the data.

appshot(io_app, "shiny_figs/io_app.jpeg",
        vwidth = 800,
        vheight = 800,
        delay = 25)

Actually, it's a hair stranger, I get a blank plot. Which is what happens while the app starts up and filters the data the the appropriate settings.

Shiny app from webshot::appshot() with no plot

What is wrong here, and how can it be fixed? I've tried longer delays (45 seconds) and no dice....

wch commented 8 months ago

I think this is probably because webshot is using a browser that stopped development 6 years ago, in 2018. Please use webshot2 instead. https://github.com/rstudio/webshot2

jebyrnes commented 8 months ago

That did it!