Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using System;
namespace EdgeDriverTests
public class Program
* This assumes you have added MicrosoftWebDriver.exe to your System Path.
* For help on adding an exe to your System Path, please see:
static void Main(string[] args)
/* You can find the latest version of Microsoft WebDriver here:
var driver = new EdgeDriver();
// Navigate to Bing
driver.Url = "";
// Find the search box and query for webdriver
var element = driver.FindElementById("sb_form_q");
Copy link

SimpleSamples commented Mar 4, 2020

I could not get this to work either. I am using the new Chromium Edge and that is a likely problem. I found WebDriver (Chromium) but that had problems too. I did a little guessing and the following works for me. I hope this is relevant.

	var edgeOptions = new EdgeOptions();
	var msedgedriverDir = @"D:\Software";
	var msedgedriverExe = @"msedgedriver.exe";
	var service = EdgeDriverService.CreateDefaultService(msedgedriverDir, msedgedriverExe);
	var driver = new EdgeDriver(service, edgeOptions);

Copy link

Telavian commented Apr 9, 2020

How to open as headless with no window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment