Run Selenium parallel test on Azure batch Run Selenium parallel test on Azure batch selenium selenium

Run Selenium parallel test on Azure batch


RSelenium connects to the Selenium server it sets up on port 4567 by default. As soon as one of the parallel nodes connects to the server via this port, no other node can connect through this port.

A solution is to add the following argument to the rsDriver in the foreach loop:

rD <<- RSelenium::rsDriver(        port = 4567L + as.integer(i),        browser = "firefox",        extraCapabilities = list(          "moz:firefoxOptions" = list(            args = list('--headless')          )        )

You may have to check for clashes of the ports with other applications.