Running tests on the local computer through chromedriver works great, but I run tests
through a grid(on the local machine) the failure rate goes way up .Running a Chrome browser inside a Docker container with Selenium used to be a challenging
here is my code please let me know if I'm doing it wrongly.
ChromeOptions options = new ChromeOptions();
System.setProperty("webdriver.chrome.driver","c:\\usr\\bin\\chromedriver\\chromedriver");
options.addArguments("no-sandbox");
options.addArguments("--disable-popup-blocking");
options.addArguments("-- disable-translate");
options.addArguments("--start-maximized");
options.addArguments("--headless");
options.addArguments("window-size=1200x600");
driver = new RemoteWebDriver(URI.create("http://127.0.0.1:4444/wd/hub").toURL(), options);
//driver.get("http://127.0.0.1:4444/wd/hub").toURL(), new ChromeOptions();
driver = new ChromeDriver(options);