Class ChromeOptions

  • All Implemented Interfaces:, org.openqa.selenium.Capabilities

    public class ChromeOptions
    extends org.openqa.selenium.chromium.ChromiumOptions<ChromeOptions>
    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/wd/hub"),
         new ChromeOptions());
    Since chromedriver v17.0.963.0
    See Also:
    Serialized Form
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String CAPABILITY
      Key used to store a set of ChromeOptions in a Capabilities object.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object arg0)  
      java.lang.Object getCapability​(java.lang.String arg0)  
      java.util.Set<java.lang.String> getCapabilityNames()  
      org.openqa.selenium.Platform getPlatform()  
      int hashCode()  
      java.util.Map<java.lang.String,​java.lang.Object> toJson()  
      java.lang.String toString()  
      • 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

        setCapability, setCapability, setCapability, setCapability
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.openqa.selenium.Capabilities

        getBrowserName, getVersion, is
    • Field Detail


        public static final java.lang.String CAPABILITY
        Key used to store a set of ChromeOptions in a Capabilities object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ChromeOptions

        public ChromeOptions()
    • Method Detail

      • getPlatform

        public org.openqa.selenium.Platform getPlatform()
        Specified by:
        getPlatform in interface org.openqa.selenium.Capabilities
      • getCapability

        public java.lang.Object getCapability​(java.lang.String arg0)
        Specified by:
        getCapability in interface org.openqa.selenium.Capabilities
      • getCapabilityNames

        public java.util.Set<java.lang.String> getCapabilityNames()
        Specified by:
        getCapabilityNames in interface org.openqa.selenium.Capabilities
      • toJson

        public java.util.Map<java.lang.String,​java.lang.Object> toJson()
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object arg0)
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object