0

This is a follow up to an earlier question which provided an explanation as to why an older version of Firefox would work with RSelenium (v1.77) selenium/standalone-firefox:2.53.1 whereas a newer version breaks, selenium/standalone-firefox:latest.

My understanding is that the solution lies in getting the correct version of GeckoDriver.

Looking here and following these instructions I now have geckodriver living at /usr/local/bin/

However my script still fails at webElem <- remDr$findElement(using = "class", "percent") with the error

Error in .self$value[[1]] : subscript out of bounds.

What further steps are required to get RSelenium working with selenium/standalone-firefox:latest?

R Script from earlier question

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()
ixodid
  • 2,180
  • 1
  • 19
  • 46
  • Are you able to navigate to the webpage? – Nad Pat Apr 03 '22 at 03:35
  • remDr$getStatus() after remDr$open() is a populated list. Status after remDr$navigate is `list()`. So I think no. – ixodid Apr 03 '22 at 03:40
  • try these https://stackoverflow.com/questions/45395849/cant-execute-rsdriver-connection-refused https://stackoverflow.com/questions/42468831/how-to-set-up-rselenium-for-r – Nad Pat Apr 03 '22 at 04:22
  • I'm not sure those sites are relevant to my issue. selenium/standalone-firefox:2.53.1 works fine. Thus, I think it's a geckodriver issue. – ixodid Apr 03 '22 at 19:24

0 Answers0