Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


An R client for Selenium Remote WebDriver

Subscribe to updates I use RSelenium

Statistics on RSelenium

Number of watchers on Github 153
Number of open issues 33
Average time to close an issue about 2 months
Main language HTML
Average time to merge a PR 3 days
Open pull requests 4+
Closed pull requests 1+
Last commit almost 3 years ago
Repo Created over 7 years ago
Repo Last Updated about 2 years ago
Size 37.6 MB
Homepage http://ropensci.g...
Organization / Authorropensci
Latest Releasev1.7.1
Page Updated
Do you use RSelenium? Leave a review!
View open issues (33)
View RSelenium activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating RSelenium for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

R Bindings for Selenium 2.0 Remote WebDriver

CRAN version Travis build status SauceTests Coverage
Build Status Selenium Test Status codecov

Selenium test status

Selenium Test Status

This is a set of R Bindings for Selenium 2.0 Remote WebDriver, which you can download from http://selenium-release.storage.googleapis.com/index.html .This binding will not work with the 1.0 version of Selenium.


To install RSelenium from CRAN run install.packages('RSelenium'). If you require the development version you will need the devtools package. If necessary (install.packages(devtools)) and run:


To get started using RSelenium you can look at the introduction vignette located in /doc/RSelenium-basics.html once RSelenium is installed or run


or the basic vignette can be viewed on Rpubs.

There is a second vignette dealing with running RSelenium on different browsers/OS locally and remotely which can be viewed at RSelenium: Driving OS/Browsers local and remote. Finally you can read all about running a headless browser or running a normal browser on a headless server RSelenium: Headless browsing..

Summary of vignettes

  1. RSelenium: Basics
  2. RSelenium: Driving OS/Browsers local and remote
  3. RSelenium: Testing Shiny Apps
  4. Orange County R Users Group (OC-RUG): RSelenium Webinar
  5. RSelenium: Headless browsing.
  6. RSelenium: Docker Containers

Test Shiny Apps

Use RSelenium to test your Shiny Apps.

Read the introductory tutorial on Rpubs.

Use Sauce Labs and BrowserStack

Sauce Labs

user <- "rselenium0"
pass <- "*******************************"
port <- 80
ip <- paste0(user, ':', pass, "@ondemand.saucelabs.com")
browser <- "firefox"
version <- "25"
platform <- "OS X 10.9"
extraCapabilities <- list(name = "Test RSelenium", username = user, accessKey = pass)

remDr <- remoteDriver$new(remoteServerAddr = ip, port = port, browserName = browser
                          , version = version, platform = platform
                          , extraCapabilities = extraCapabilities)


user <- "johnharrison" 
pass <- "*******************"
port <- 80
ip <- paste0(user, ':', pass, "@hub.browserstack.com")
extraCapabilities <- list("browser" = "IE",
                          "browser_version" = "7.0",
                          "os" = "Windows",
                          "os_version" = "XP",
                          "browserstack.debug" = "true")
remDr <- remoteDriver$new(remoteServerAddr = ip, port = port
                          , extraCapabilities = extraCapabilities)


  • seleniumPipes seleniumPipes is a lightweight implementation of the w3c webdriver specification. It has been built utilising xml2, httr and magrittr so provides an alternative for users who are familiar with piping.

  • webdriver A client for the 'WebDriver' 'API'. It allows driving a (probably headless) web browser, and can be used to test web applications, including 'Shiny' apps. In theory it works with any 'WebDriver' implementation, but it was only tested with 'PhantomJS'.

  • rwebdriver R bindings to the Webdriver API

  • rdom Render and parse the DOM from R via phantomjs.


The RSelenium package is licensed under the AGPLv3. The help files are licensed under the creative commons attribution, non-commercial, share-alike license CC-NC-SA.

As a summary, the AGPLv3 license requires, attribution, include copyright and license in copies of the software, state changes if you modify the code, and disclose all source code. Details are in the COPYING file.

RSelenium open issues Ask a question     (View All Issues)
  • over 3 years Is the instructions in "RSelenium basics" outdated?
  • over 3 years Explicit and Fluent Wait
  • over 3 years RSelenium Message - Desired Capabilties problem
  • over 3 years RSelenium Error in envRefInferField
  • over 3 years remDr$open() returning error on Ubuntu 14 LTS
  • over 3 years R session hangs if executeScript() in loop
  • over 3 years startserver() issue
  • over 3 years Move SauceLabs tests to use RSauceLabs
  • over 3 years Port tests to TRAVIS
  • almost 4 years RSelenium Issues Warning remDir$open()
  • almost 4 years RSelenium on shiny server
  • almost 4 years RSelenium 1.4.0 error on starting server on windows
  • almost 4 years Firefox 48 - gecko driver
  • almost 4 years Error : org.openqa.selenium.firefox.NotConnectedException
  • almost 4 years Unknown server-side error connecting to server
  • about 4 years Vignettes doesn't work.
  • about 4 years How to fetch data from multiple pages of a table when the URL is static using R ?
  • about 4 years java.lang.IllegalStateException error
  • about 4 years Phantom JS hangs with more than two elements lapply
  • over 4 years startServer fails silently
  • over 4 years error: class: org.openqa.selenium.remote.SessionNotFoundException
  • over 4 years Unable to retrieve source page
  • over 4 years no way to stop selenium server
  • over 4 years do not write logs by default to installed package directory
  • over 4 years WebDriverException error when opening a custom Chrome profile
  • over 4 years httr?
  • over 4 years error unknown command: wd/hub/status"
  • over 4 years Right click save as in RSelenium
  • over 4 years simulate mouseover/mouseout events?
  • over 4 years Setting Timeouts
RSelenium open pull requests (View All Pulls)
  • check stderr and stop if Exception
  • Update basics vignette to update out-of-date URL
  • use message() instead of print()
  • copy edit
RSelenium questions on Stackoverflow (View All Questions)
  • How can I start Rselenium in Mac?
  • How to scrape text using RSelenium in R?
  • Scheduling task in R using Rselenium not working
  • blank value captures while scraping using Rselenium
  • Short xPath in R for use with RSelenium
  • Specify download folder in RSelenium does not work
  • Specify download folder in RSelenium
  • Download word document in local folder using Rselenium
  • Create a time out handler using for web scrapping with Rselenium
  • Checking multiple checkbox with RSelenium
  • rselenium | get the text of the webpage
  • Retrieve data from a web page table using RSelenium
  • RSelenium cannot access DOM
  • set value of readonly field with RSelenium
  • RSelenium with chromedriver 2.20 on Ubuntu 14.04 webdriver exception
  • Run source if loop fails (RSelenium)
  • Random sleeping time in RSelenium
  • Rselenium command for "save link as"
  • RSelenium web scraping always returns Null
  • Checking if element is present in the webpage - RSelenium
  • Download Excel Files with RSelenium
  • RSelenium in MAC
  • Loop stops after 5 iterations using Rselenium
  • Open new tab in RSelenium
  • Scrolling page in RSelenium
  • Downloading a pdf using RSelenium
  • Using JQuery code in RSelenium
  • Rselenium not working
  • RSelenium ZipException Error
  • Blank page using PhantomJS 1.9.0, RSelenium in Ubuntu 14.04
RSelenium list of languages used
RSelenium latest release notes
v1.7.1 version 1.7.1 - Ninth release to CRAN

RSelenium 1.7.1

  • Fixed issue where rsDriver was not passing additional arguments via ...
  • Fixed issue with rsDriver and Win/Firefox
  • serverURL field in remoteDriver class is now set in initialize method
v1.7.0 version 1.7.0 - Eigth release to CRAN

RSelenium 1.7.0

  • Basic vignette update with appendix on using rsDriver
  • Print method added for environment returned by rsDriver
  • Default PhantomJS version switched to 2.1.1 (2.5.0-beta has old version of ghostdriver)

RSelenium 1.6.6

  • phantom is marked as deprecated. To drive PhantomJS via selenium use the rsDriver function. To drive directly use wdman::phantomjs

RSelenium 1.6.5

  • checkForServer and startServer are now defunct. rsDriver is marked as a dual replacement. Docker is recommended to run a selenium server/browser.

RSelenium 1.6.4

  • Add a rsDriver function to return a Selenium/webdriver server and a browser client.

RSelenium 1.6.3

  • Return a selected value with the selectTag method.
v1.6.2 version 1.6.2 - Seventh release to CRAN

RSelenium 1.6.1

  • Added a selectTag method to the webElement class see #108.
  • RSelenium Basics vignette was updated/revised.

RSelenium 1.6.0

  • Moved http package from RCurl to httr see #106.
  • Removed dependence on rjson. httr incorporates jsonlite.
  • Import base64_decode from openssl.
  • Fixed issue with attributes.Selenium not firing error see #109

RSelenium 1.5.1

  • Added a path argument to the remoteDriver class.

RSelenium 1.4.9

  • Fix .DollarNames to correct issues running under recent RStudio version.
Other projects in HTML