Class EdgeOptions

java.lang.Object
org.openqa.selenium.MutableCapabilities
org.openqa.selenium.remote.AbstractDriverOptions<org.openqa.selenium.chromium.ChromiumOptions<?>>
org.openqa.selenium.chromium.ChromiumOptions<EdgeOptions>
org.openqa.selenium.edge.EdgeOptions
All Implemented Interfaces:
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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Key used to store a set of EdgeOptions in a Capabilities object.
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 Details

  • Constructor Details

    • EdgeOptions

      public EdgeOptions()
  • Method Details

    • useWebView

      public void useWebView(boolean enable)
      Changes the browser name to 'webview2' to enable test automation of WebView2 apps with Microsoft Edge WebDriver
      Parameters:
      enable - boolean flag to enable or disable the 'webview2' usage
    • 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