I'd like to zoom out of RSelenium remote, but this is surprisingly difficult to find a solution. I am aware of
- How to zoom out page using RSelenium library in R?, but I woud like to not adjust the page size or the resolution---simply zoom out.
- I have pondered sending
control
+substract
simultaneously, but this is also not quite working. I have taken a look at How to press two keys simultaneously (i.e., control-s) in a webpage using RSelenium?, which as the OP noted,control
+a
worked but notcontrol
+s
, and subsequentlycontrol
+substract
didn't work either. - I also tried the Unicode method specified in How to send simultaneous keys in RSelenium ALT+S to web driver?, which did not work either.
library(RSelenium)
driver <- rsDriver()
remDr <- driver[["client"]]
remDr$navigate("https://www.google.com/")
webElem <- remDr$findElement("css", "html")
webElem$sendKeysToElement(list(key = "control", "-")) ## Does not work
webElem$sendKeysToElement(list(key = "control", key = "subtract")) ## Does not work
The browser is Chrome.