Package org.openqa.selenium.chrome
Class ChromeOptions
java.lang.Object
org.openqa.selenium.MutableCapabilities
org.openqa.selenium.remote.AbstractDriverOptions<ChromiumOptions<?>>
org.openqa.selenium.chromium.ChromiumOptions<ChromeOptions>
org.openqa.selenium.chrome.ChromeOptions
- All Implemented Interfaces:
Serializable
,Capabilities
Class to manage options specific to
ChromeDriver
.
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
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key used to store a set of ChromeOptions in aCapabilities
object.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmerge
(Capabilities extraCapabilities) Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance.Methods inherited from class org.openqa.selenium.chromium.ChromiumOptions
addArguments, addArguments, addEncodedExtensions, addEncodedExtensions, addExtensions, addExtensions, enableBiDi, getExtraCapability, getExtraCapabilityNames, mergeInOptionsFromCaps, mergeInPlace, setAndroidActivity, setAndroidDeviceSerialNumber, setAndroidPackage, setAndroidProcess, setBinary, setBinary, setExperimentalOption, setUseRunningAndroidApp
Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions
asMap, getCapability, getCapabilityNames, setAcceptInsecureCerts, setBrowserVersion, setEnableDownloads, setImplicitWaitTimeout, setPageLoadStrategy, setPageLoadTimeout, setPlatformName, setProxy, setScriptTimeout, setStrictFileInteractability, setUnhandledPromptBehaviour
Methods inherited from class org.openqa.selenium.MutableCapabilities
equals, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openqa.selenium.Capabilities
getBrowserName, getBrowserVersion, getPlatformName, is
-
Field Details
-
CAPABILITY
Key used to store a set of ChromeOptions in aCapabilities
object.- See Also:
-
LOGGING_PREFS
- See Also:
-
-
Constructor Details
-
ChromeOptions
public ChromeOptions()
-
-
Method Details
-
merge
Description copied from class:MutableCapabilities
Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance. Capabilities fromother
will override those inthis
.- Specified by:
merge
in interfaceCapabilities
- Overrides:
merge
in classMutableCapabilities
-