Edge specific functionality
Microsoft Edge is implemented with Chromium, with the earliest supported version of v79. Similar to Chrome, the major version number of edgedriver must match the major version of the Edge browser.
All capabilities and options found on the Chrome page work for Edge as well.
Options
Starting an Edge session with basic defined options looks like this:
EdgeOptions options = new EdgeOptions();
driver = new EdgeDriver(options);
options = EdgeOptions()
driver = webdriver.Edge(options=options)
var options = new EdgeOptions();
var driver = new EdgeDriver(options);
options = Selenium::WebDriver::Options.edge
@driver = Selenium::WebDriver.for :edge, options: options
let options = new edge.Options();
driver = await env.builder()
.setEdgeOptions(options)
.setEdgeService(new edge.ServiceBuilder(edgedriver.binPath()))
.build();
Arguments
The args
parameter is for a list of Command Line Switches
used when starting the browser.
Commonly used args include --start-maximized
and --headless=new
Add an argument to options:
EdgeOptions options = new EdgeOptions();
options.addArguments("--headless=new");
driver = new EdgeDriver(options);
options = EdgeOptions()
options.add_argument("--headless=new")
var options = new EdgeOptions();
options.AddArgument("--headless=new");
options = Selenium::WebDriver::Options.edge(args: ['--headless=new'])
@driver = Selenium::WebDriver.for :edge, options: options
Internet Explorer Compatibility Mode
Microsoft Edge can be driven in “Internet Explorer Compatibility Mode”, which uses the Internet Explorer Driver classes in conjunction with Microsoft Edge. Read the Internet Explorer page for more details.