Reputation: 21
How to use this method? What parameter should I pass to "capabilityName" and "value"?
public void setCapability(java.lang.String capabilityName,java.lang.String value);
Upvotes: 2
Views: 4747
Reputation: 75
Here is an example that maximizes the browser window (for chrome). Enable/Disable the second while running it and see the difference.
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
WebDriver driver = new ChromeDriver(options);
driver.get("http://www.google.com");
Upvotes: 2
Reputation: 3648
For Chrome specifically, you can find the capabilities here: https://sites.google.com/a/chromium.org/chromedriver/capabilities-aka-chromeoptions
There is a more general overview of capabilities on the selenium wiki: http://code.google.com/p/selenium/wiki/DesiredCapabilities
Upvotes: 4