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/"),
         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 a Capabilities 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
      • 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, getPlatform, getPlatformName, getVersion, is