Package org.openqa.selenium.chrome
Class ChromeOptions
- java.lang.Object
-
- org.openqa.selenium.MutableCapabilities
-
- org.openqa.selenium.remote.AbstractDriverOptions<org.openqa.selenium.chromium.ChromiumOptions>
-
- org.openqa.selenium.chromium.ChromiumOptions<ChromeOptions>
-
- org.openqa.selenium.chrome.ChromeOptions
-
- All Implemented Interfaces:
org.openqa.selenium.Capabilities
public class ChromeOptions extends org.openqa.selenium.chromium.ChromiumOptions<ChromeOptions>
Class to manage options specific toChromeDriver
.Example usage:
ChromeOptions options = new ChromeOptions() options.addExtensions(new File("/path/to/extension.crx")) options.setBinary(new File("/path/to/chrome")); // For use with ChromeDriver: ChromeDriver driver = new ChromeDriver(options); // For use with RemoteWebDriver: RemoteWebDriver driver = new RemoteWebDriver( new URL("http://localhost:4444/"), new ChromeOptions());
- Since:
- Since chromedriver v17.0.963.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CAPABILITY
Key used to store a set of ChromeOptions in aCapabilities
object.
-
Constructor Summary
Constructors Constructor Description ChromeOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChromeDriverLogLevel
getLogLevel()
ChromeOptions
setLogLevel(ChromeDriverLogLevel logLevel)
-
Methods inherited from class org.openqa.selenium.chromium.ChromiumOptions
addArguments, addArguments, addEncodedExtensions, addEncodedExtensions, addExtensions, addExtensions, amendHashCode, asMap, merge, setBinary, setBinary, setExperimentalOption, setHeadless
-
Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions
setAcceptInsecureCerts, setPageLoadStrategy, setProxy, setStrictFileInteractability, setUnhandledPromptBehaviour
-
Methods inherited from class org.openqa.selenium.MutableCapabilities
equals, getCapability, getCapabilityNames, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toString
-
-
-
-
Field Detail
-
CAPABILITY
public static final java.lang.String CAPABILITY
Key used to store a set of ChromeOptions in aCapabilities
object.- See Also:
- Constant Field Values
-
-
Method Detail
-
setLogLevel
public ChromeOptions setLogLevel(ChromeDriverLogLevel logLevel)
-
getLogLevel
public ChromeDriverLogLevel getLogLevel()
-
-