Assuming you got
library(RSelenium) startServer() remDr <- remoteDriver() remDr$open() remDr$setWindowSize(width = 800, height = 300) remDr$navigate("https://www.r-project.org/about.html")
You can scroll to such as:
webElem <- remDr$findElement("css", "body") webElem$sendKeysToElement(list(key = "end"))
And you can scroll up as shown below:
webElem$sendKeysToElement(list(key = "home"))
And if you want to scroll down a bit, use
webElem$sendKeysToElement(list(key = "down_arrow"))
Key names are in selKeys .
source share