2

I would like to run the following setup:

  • on host_1, execute some Selenium tests
  • on host_2, run Firefox

(On host_1 there would be a Jenkins instance running the tests and host_2 would be a Docker container running on host_1, and Firefox would run headless, using xvfb - but this shouldn't be relevant for the question)

To run on the same host, I would just do:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");

WebDriver driver = new FirefoxDriver();
driver.get("https://google.com/");
driver.quit();

But I would like the Selenium tests to use the Firefox instance on the other host. Is that possible?

Cos64
  • 1,617
  • 2
  • 19
  • 30

2 Answers2

2

Use Selenium Grid. Check this link for detailed documentation.

Shubhasmit Gupta
  • 421
  • 1
  • 4
  • 13
1

Selenium Standalone Server

The Selenium Server is needed in order to run Remote Selenium WebDriver.

Master Azazel
  • 612
  • 1
  • 12
  • 32