Once again I have read many threads on the subject without being able to understand...
I am using Rselenium and selenium standalone images with Docker on a Ubuntu 22.04 OS.
The following code works just fine when using docker image selenium/standalone-chrome-debug
:
system('docker run -d -p 4445:4444 selenium/standalone-chrome-debug')
remDr <- remoteDriver(remoteServerAddr = "localhost",
port = 4445L,
browserName = "chrome")
remDr$open()
remDr$navigate("https://fr.distance.to/paris/bayonne-france")
el <- remDr$findElement(using = "css", ".headerRoute > #strck > span:nth-child(1)")
road_distance <- el$getElementText()[[1]]
remDr$close()
system('docker rm -f $(docker ps -aq --filter ancestor=selenium/standalone-chrome-debug)')
However, the exact same code, but with the selenium/standalone-chrome
image instead, gets stuck at first step of remDr$open()
to finally crash with output :
remDr$open()
[1] "Connecting to remote server"
$id
[1] NA
Any ideas why and how to solve this ? I don't really mind using the debug
version of the selenium/standalone-chrome
image but it seems that it got deprecated and I am keen on understanding what happens here