Selenium allows you to do this. See http://johndharrison.imtqy.com/RSelenium/ . DISCLAIMER I am the author of the RSelenium package. An image can be exported as base64 encoded png. As an example:
require(RSelenium)
remDr <- remoteDriver()
remDr$open()
remDr$navigate("http://espn.go.com/")
tmp <- paste0(tempdir(), "/tmpScreenShot.png")
base64png <- remDr$screenshot()
writeBin(base64Decode(base64png, "raw"), tmp)
The png will be saved in the file specified in tmp.
RSelenium
RSelenium: