Documenting setting browser options, especially downloads
It would be extremely helpful to have some discoverable documentation of setting common browser options. The Chrome DevTools protocol is really opaque, especially for the data scientist/web scraper trying to accomplish a few tasks. One that I remember hunting down forever was figuring how to download a file from a page in a web scraping session, should the file be non displayable in the browser or triggered as an off-page event. In this case, the browser needs to be set to not pop up a dialogue to confirm the download, and the download location may or not be the user's 'Downloads' folder. Putting this and a few similar things in a vignette for common automation tasks will probably be of great help to users!
chromote_session$Browser$setDownloadBehavior(
behavior = "allow",
downloadPath = tmp_download_dir
)
That's a great idea @noamross and we recently added a section in the site for examples, see https://rstudio.github.io/chromote/articles and e.g. https://rstudio.github.io/chromote/articles/example-loading-page.html. Would you be interested in contributing a PR for how to set this download option?
Yes, happy to.