Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Screenshot tools in R #11

Open
maelle opened this issue Mar 8, 2018 · 6 comments
Open

Screenshot tools in R #11

maelle opened this issue Mar 8, 2018 · 6 comments

Comments

@maelle
Copy link
Member

maelle commented Mar 8, 2018

I've recently discovered that RSelenium and seleniumPipes offer screenshot capabilities, including the use of CSS selectors. Their syntax might be easier to use than webshot when one needs to perform an action on the webpage before taking the screenshot. 📸

I think it could be useful to

  • assess and compare the screenshot functionalities of these three packages 📄

  • design a new function or package using them that'd make screenshots even easier. 🔧

A good tool for screenshots would:

  • be well documented

  • have all arguments webshot has (CSS selection, cliprect, expand, etc.)

  • but would support not using JavaScript but instead the more "intuitive" commands one use in e.g. seleniumPipes

  • would support different browsers

  • cover both websites and Shiny apps like these three packages do

  • would use magick for image processing and would return a magick object instead of writing the screenshot to disk (or would at least offer this possibility).

A bonus would be to also cover screencasts, cf rDVR. 🎥

@jimhester
Copy link

I don't have a ton of experience in this space, but the impression I have is Selenium is being phased out in favor of webdriver, which works across multiple browsers.

There is a long standing open issue wch/webshot#2 about improving the interaction, maybe this project could work on a PR to provide a similar interface from seleniumPipes in webshot.

@maelle
Copy link
Member Author

maelle commented Apr 25, 2018

Ah cool, and I like that issue text 😀

@maelle
Copy link
Member Author

maelle commented May 14, 2018

@wch before I summarize or close this, in theory would you be interested in a PR for the issue mentioned above? And could it be done independently of wch/webshot#62 (comment) ? Probably not?

@wch
Copy link

wch commented May 15, 2018

@maelle I would consider a PR, but I personally don't think that it's a good place to put time and effort.

Webshot uses CasperJS, and any interaction code would likely be built on CasperJS. CasperJS is a library specifically for PhantomJS, which in turn is no longer being developed.

As @jimhester mentioned, the webdriver package is a better way to do interaction. (The reason that webshot doesn't use webdriver is that webdriver has several dependencies, and there are some applications where webshot is used it's important to have few dependencies.)

@maelle
Copy link
Member Author

maelle commented May 15, 2018

Thanks!

@maelle
Copy link
Member Author

maelle commented May 18, 2018

Summary: build a package based on webdriver to produce screenshots of websites and Shiny apps for documentation/presentation purposes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants