I configured selenium server in docker. It works ok - I can connect to it, but when I want to interact with running local shiny app Rselenium does not see it. Details below:
I did step-by-step:
I run selenium server:
docker run -d -p 4445:4444 selenium/standalone-chrome
successfully connected to selenium server:
remDr <- remoteDriver(remoteServerAddr = "localhost"
, port = 4445L
, browserName = "chrome"
, platform = "MAC")
> remDr$open()
[1] "Connecting to remote server"
- run shiny app from terminal (in separate r session):
> shiny::runApp(file.path(find.package("RSelenium"), "apps", "shinytestapp"), port = 6012)
Listening on http://127.0.0.1:6012
- and then tried to do some tests:
remDr$navigate("localhost:6012")
appTitle <- remDr$getTitle()[[1]]
expect_equal(appTitle, "Shiny Test App")
and got error:
Error: 'appTitle' not equal to "Shiny Test App".
1/1 mismatches
x[1]: "localhost"
y[1]: "Shiny Test App"
- after all I made a screenshot:
remDr$screenshot(display = TRUE)
and it looks like this:
Do you have idea why RSelenium does not see shiny app running locally?