KLUDGES
- Viewport - Currently RSelenium does not include a function to adjust viewport size. As such, if you are running a smaller browser window you will need to manually decrease (cmd-) the content size in the viewport to 50% or so. Do this when the window opens. Or use NoSquint Plus plugin with a Firefox user account.
- Versions - Requires Firefox 47.0.1+ or <= 45.x.x. Includes Selenium Server JAR 2.53.1
- Slow - Currently very slow, ~ 10 minute build time for the 1152obs x 10vars example dataframe
PREPARATION
- CHROME WEBDRIVER (None required for Firefox)
Included version 2.22
https://sites.google.com/a/chromium.org/chromedriver/downloads
- SELENIUM SERVER JAR
Included version 2.53.1 Make sure to be running a 64-bit version of Java http://www.seleniumhq.org/download/ - COMMAND FILE
Included executes from within the batch.command directory. The batch.command script is accessed from R. Note that permissions may have to be adjusted to run the script from R. Note the batch-ff command executes for Firefox.
RUNNING THE R SCRIPT
- Prep and run batch.command to launch selenium standalone server. Sys.sleep ensures the server gets running before R tries to open the remote driver.
- Create the browser object using a remote driver
- Opens a chrome browser and navigates to page
- Logs in to Fanduel
- Navigates to example game URL
- Iterates over user teams
- Iterates over pages
- Saves teams as a DF by UN
- Shuts down Selenium