Code Monkey home page Code Monkey logo

rselenium's Introduction

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.

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("ropensci/RSelenium")

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. 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)

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)

RELATED WORK

  • 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.

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.


rselenium's People

Contributors

cpsievert avatar daattali avatar fsavje avatar johndharrison avatar mnel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.