I run Selenium with docker like this:
docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.1
and this line remDr$findElement(using = "class", "percent")
in the following R Script works fine.
library("tidyverse")
library("RSelenium")
# A Selenium server has to be running
# Works with: docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.1
# Fails with: docker run -d -p 4445:4444 selenium/standalone-firefox:latest
remDr <- remoteDriver(port = 4445L)
remDr$open()
remDr$navigate("https://www.alternabank.ca/everyday-banking/high-interest-esavings")
webElem <- remDr$findElement(using = "class", "percent")
tmp <- webElem$getElementText()
remDr$close()
I kill that container and do: docker run -d -p 4445:4444 selenium/standalone-firefox:latest
And then run the same code again. This results in an error:
> webElem <- remDr$findElement(using = "class", "percent")
Error in .self$value[[1]] : subscript out of bounds
Why is this? How can I get my old code to work with the latest version of firefox. I need the newer version for some other things to work.
I also see that the name of the linux process changes from "firefox" to "Gecko".