Problem in Scraping Web page with Rselenium

web-scraping

#1

Hello,
I am having problem in doing a little exercise in extracting the data from the webpage using the R selenium package.
Essentially I am trying to replicate the exercise done here

The reprex for my code is below.
Any help is welcome.
This is urgent so it would be great if help can be received soon.
Thanks

shell('docker pull selenium/standalone-firefox')
shell('docker run -d -p 4445:4444 selenium/standalone-firefox')
#> Warning in shell("docker run -d -p 4445:4444 selenium/standalone-firefox"):
#> 'docker run -d -p 4445:4444 selenium/standalone-firefox' execution failed
#> with error code 125
library(RSelenium)
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = "firefox")
shell('docker run -d -p 4445:4444 selenium/standalone-firefox')
#> Warning in shell("docker run -d -p 4445:4444 selenium/standalone-firefox"):
#> 'docker run -d -p 4445:4444 selenium/standalone-firefox' execution failed
#> with error code 125
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = "firefox")
remDr$open()
#> [1] "Connecting to remote server"
#> Error in checkError(res): Undefined error in httr call. httr output: Failed to connect to localhost port 4445: Connection refused
remDr$navigate("http://www.google.com/ncr")
#> Error in checkError(res): Undefined error in httr call. httr output: length(url) == 1 is not TRUE
remDr$getTitle()
#> Error in checkError(res): Undefined error in httr call. httr output: length(url) == 1 is not TRUE

system('docker run -d -p 4445:4444 selenium/standalone-chrome')

Created on 2018-07-04 by the reprex package (v0.2.0.9000).