Learn R Programming

⚠️There's a newer version (1.7.9) of this package.Take me there.

R Bindings for Selenium 2.0 Remote WebDriver

Travis build 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.

Install

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:

devtools::install_github("RSelenium", "johndharrison")

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


vignette('RSelenium-basics')

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.

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)

BrowserStack

require(RSelenium)
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)

License

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.

Copy Link

Version

Install

install.packages('RSelenium')

Monthly Downloads

4,924

Version

1.3.1

License

AGPL-3

Maintainer

John Harrison

Last Published

September 2nd, 2022

Functions in RSelenium (1.3.1)

getChromeProfile

Get Chrome profile.
selKeys

Selenium key mappings
webElement-class

CLASS webElement
startServer

Start the standalone server.
checkForServer

Check for Server binary
remoteDriver-class

CLASS remoteDriver
errorHandler-class

CLASS errorHandler
getFirefoxProfile

Get Firefox profile.
RSelenium-package

RSelnium: An R client for Selenium Remote Webdriver