Run tests from behind a proxy
If the machine you are using to run tests is behind a proxy, chances are that you won't be able to connect to TestingBot's grid.
In this case, you can instruct Selenium to go through your proxy. See the example below.
//For HTTP
System.getProperties().put("http.proxyHost", "...");
System.getProperties().put("http.proxyPort", "...");
System.getProperties().put("http.proxyUser", "...");
System.getProperties().put("http.proxyPassword", "...");
//For HTTPS
System.getProperties().put("https.proxyHost", "...");
System.getProperties().put("https.proxyPort", "...");
System.getProperties().put("https.proxyUser", "...");
System.getProperties().put("https.proxyPassword", "...");
HttpCommandExecutor commandExecutor = new HttpCommandExecutor(new Uri("https://hub.testingbot.com/wd/hub/"), TimeSpan.FromSeconds(60));
commandExecutor.Proxy = new WebProxy("http://host:port", false);
// add caps, for e.g.
// ChromeOptions options = new ChromeOptions();
// options.AddAdditionalCapability("browser", "Chrome",true);
IWebDriver driver = new RemoteWebDriver(commandExecutor, options.ToCapabilities());