Class EdgeOptions

  • All Implemented Interfaces:
    java.io.Serializable, org.openqa.selenium.Capabilities

    public class EdgeOptions
    extends org.openqa.selenium.chromium.ChromiumOptions<EdgeOptions>
    Class to manage options specific to EdgeDriver.

    Example usage:

    
     EdgeOptions options = new EdgeOptions()
     options.addExtensions(new File("/path/to/extension.crx"))
     options.setBinary(new File("/path/to/edge"));
    
     // For use with EdgeDriver:
     EdgeDriver driver = new EdgeDriver(options);
    
     // For use with RemoteWebDriver:
     RemoteWebDriver driver = new RemoteWebDriver(
         new URL("http://localhost:4444/"),
         new EdgeOptions());
     
    See Also:
    Serialized Form
    • Field Summary

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

      Constructors 
      Constructor Description
      EdgeOptions()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EdgeOptions merge​(org.openqa.selenium.Capabilities extraCapabilities)  
      void useWebView​(boolean enable)
      Changes the browser name to 'webview2' to enable test automation of WebView2 apps with Microsoft Edge WebDriver
      • Methods inherited from class org.openqa.selenium.chromium.ChromiumOptions

        addArguments, addArguments, addEncodedExtensions, addEncodedExtensions, addExtensions, addExtensions, getExtraCapability, getExtraCapabilityNames, mergeInOptionsFromCaps, mergeInPlace, setAndroidActivity, setAndroidDeviceSerialNumber, setAndroidPackage, setAndroidProcess, setBinary, setBinary, setExperimentalOption, setHeadless, setUseRunningAndroidApp
      • Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions

        asMap, getCapability, getCapabilityNames, setAcceptInsecureCerts, setBrowserVersion, 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 Detail

      • CAPABILITY

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

        public static final java.lang.String WEBVIEW2_BROWSER_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • EdgeOptions

        public EdgeOptions()
    • Method Detail

      • merge

        public EdgeOptions merge​(org.openqa.selenium.Capabilities extraCapabilities)
        Specified by:
        merge in interface org.openqa.selenium.Capabilities
        Overrides:
        merge in class org.openqa.selenium.MutableCapabilities