You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For animint, we've been using servr and RSelenium to test whether plots are rendered in the browser the way we expect. Plot rendering requires a file server, so before I discovered the new daemon support, I did something like:
library(servr)
library(RSelenium)
cmd<-"R -e \'cat(Sys.getpid(), file=\"pid.txt\"); servr::httd(dir=system.file(\"examples/make1\", package=\"servr\"), port=4848, browser=FALSE)\'"
system(cmd, wait=FALSE)
# start selenium server, open firefox, and navigate to file server on localhost
checkForServer(dir=system.file("bin", package="RSelenium"))
startServer()
remDr<- remoteDriver(browserName="firefox")
remDr$open(silent=TRUE)
remDr$navigate("http://localhost:4848/")
# kill the file servertools::pskill(readLines("pid.txt", warn=F))
However, I run into problems if I use daemon=TRUE
res<- httd(dir= system.file("examples/make1", package="servr"),
daemon=TRUE, port=4848, browser=FALSE)
# The line below freezes firefox & the R session. However, it works if I _manually_ navigate there# I can also use other methods like `remDr$getPageSource()`remDr$navigate("http://localhost:4848/")
Any ideas why the daemon approach might cause this problem? Is there a somewhat simple explanation of the difference between the two approaches? Maybe @johndharrison could help? I don't think it's a browser issue as I've also tested this with phantomjs.
The text was updated successfully, but these errors were encountered:
For animint, we've been using servr and RSelenium to test whether plots are rendered in the browser the way we expect. Plot rendering requires a file server, so before I discovered the new daemon support, I did something like:
However, I run into problems if I use
daemon=TRUE
Any ideas why the daemon approach might cause this problem? Is there a somewhat simple explanation of the difference between the two approaches? Maybe @johndharrison could help? I don't think it's a browser issue as I've also tested this with phantomjs.
The text was updated successfully, but these errors were encountered: