The ChromeDriver can be made to start the browser with specific command line flags using the chrome.switches capability key; this key should define a list of command line flags that should be passed to the browser on start-up. For example, to start Chrome as a maximized window:
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.switches", Arrays.asList("--start-maximized"));
WebDriver driver = new ChromeDriver(capabilities);
Similarly, to load an extension when Chrome starts:
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.switches", Arrays.asList("--load-extension=/path/to/extension/directory"));
WebDriver driver = new ChromeDriver(capabilities);
Or to load with a specific profile (note that the default profile directories can be found here):
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.switches", Arrays.asList("--user-data-dir=/path/to/profile/directory"));
WebDriver driver = new ChromeDriver(capabilities);
The full list of flags can be found here.
Hi All,
I am running my selenium RC scrips on Google chrome. I am facing problem in SSL certificates. When I open manually the same site which is https, it is not showing any message. But when running it shows. Any work around on this.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.