Last active
December 4, 2020 09:00
-
-
Save bedantaguru/62086f608fd0f1b20029932345a63972 to your computer and use it in GitHub Desktop.
Getting RSelenium work with Selenium 3 and Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm(list=ls()) | |
options(stringsAsFactors = F) | |
library(RSelenium) | |
# One can make terminal invisible but initially it helps in detecting any potential problem | |
# Use proper path for Selenium and geckodriver.exe. | |
# remember to rename the donwloaded Selenium | |
sel <- startServer(dir = "C:/Dev/Selenium/", | |
javaargs = c("-Dwebdriver.gecko.driver=\"C:/Dev/Selenium/geko/geckodriver.exe\""), | |
invisible = F) | |
remDr <- remoteDriver(remoteServerAddr = "localhost", | |
port = 4444, | |
browserName = "firefox", | |
extraCapabilities = list(marionette = TRUE)) | |
remDr$open() | |
# test | |
remDr$navigate("https://www.google.com/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment