ropensci / RSelenium

An R client for Selenium Remote WebDriver
https://docs.ropensci.org/RSelenium
343 stars 81 forks source link

RSelenium parallel tests using Gridlastic #199

Open MislavSag opened 5 years ago

MislavSag commented 5 years ago

I have discovered cool Selenium tool today: Gridlastic: https://www.gridlastic.com/

I registered for free and have tried their service. Following you instructions for SauceLabs, I successfully start driver in Gridlasticcloud:

extraCapabilities <- list(
  # browserName = "chrome",
  version = "latest",
  video = "True",
  platform = "VISTA",
  platformName = "windows"
)
ip <- "m33H33TFUCsAnj21BpRyQZVwnrWTGmnS:fgp999FTBYkP8dHzsoX8eJvr0iawuneA@22Z5PG8K.gridlastic.com"
driver <- remoteDriver$new(
  remoteServerAddr = ip,
  port = 80L,
  browserName = 'firefox',
  extraCapabilities = extraCapabilities
)
driver$open()

Everything worked fine. But I want to use their service because of parallel execution. They offer 5 concurrent nodes (sessions) for free. They have example how to use 2 parallel tests for python: https://www.gridlastic.com/python-code-example.html.

My question is, how to apply that in R? Usually, I use foreach package, but not sure how to apply it here since it backends not on local machine. Is this even related to RSelenium, or should I ask somewhere else?