I would like to run the following setup:
host_1
, execute some Selenium testshost_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?
The Selenium Server is needed in order to run Remote Selenium WebDriver.