I want to be able to pass arguments to google chrome when running selenium. How can I do that? When I run selenium I use the Java command Java -jar selenium.jar
How
You can send them in your method for launching the driver. e.g.
public static WebDriver chromeBrowser() throws Throwable {
System.setProperty("webdriver.chrome.driver", "C:\\chromedriver-location\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox");
WebDriver browser = new ChromeDriver(options);
browser.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
return browser;
}