Thursday, 22 May 2014

Orange County R Users Group (OC-RUG): RSelenium Webinar

Yesterday I gave a webinar on the RSelenium package to the OC-RUG. When I published RSelenium on CRAN Ray DiGiacomo the president of OC-RUG was kind enough to invite me to present RSelenium and that webinar was held on the 21st of May. I would like to thank OC-RUG and Ray in particular for the opportunity.

I will use this blog to present the video of the webinar and also for a bit of bookkeeping. Firstly I would like to return to two of the questions asked in the Q&A.

Q&A question 2 and 3

How would you save a screenshot to file using RSelenium?

In the seminar I suggested that the Selenium webdriver returned the png in a base 64 encoded format. I tried to save the output to file using writeBin and remarked that I probably needed to decode the output. So here is what I should have done:

How would you use a chrome profile?

In the seminar I remarked that the google chrome browser had hundreds of start up options. They are actually termed command line switches. The two I was after were --user-data-dir and --profile-directory. It would then have been sufficient to use:

Added to RSelenium

I add the above functionality to RSelenium. So now the screenshot method of the remoteDriver class has an optional file argument. If display is FALSE and a file argument is given RSelenium will now save the png to file.

Secondly there is now a getChromeProfile utility function in a similar vein to the existing getFirefoxProfile function. The function is documented in the RSelenium package. Its basic usage is as follows:

Saturday, 29 March 2014

RStudio/Shiny server on digital ocean fuelled by hot chocolate and a kit-kat chunky

RStudio/Shiny server on digital ocean fuelled by hot chocolate and a kit-kat chunky

John D Harrison

29 March 2014

Introduction

A number of people had told me about digitalocean recently so when a new project came along I decided to try it out. Digital Ocean I had gathered was a cloud hosting platform in the vein of amazon and co. I had used AWS previously so I was interested to see how this platform would compare.

Setting up

Creating an account involved giving an email address and creating a password. After this an option was given to load credit onto the account. Paypal was accepted so I used this option to credit the account.
After this I was taken to a basic screeen with a big green button labelled create. Seemed simple enough so I clicked it.

Tuesday, 18 March 2014

RSelenium basics

Introduction

The goal of RSelenium is to make it easy to connect to a Selenium Server/ Remote Selenium Server from within R. RSelenium provides R bindings for the Selenium Webdriver API. Selenium is a project focused on automating web browsers. RSelenium allows you to carry out unit testing and regression testing on your webapps and webpages across a range of browser/OS combinations. This allows us to integrate from within R testing and manipulation of popular projects such as shiny, sauceLabs.
This vignette is divided into six main sections: