DEV Community

Cover image for Automating Microsoft Edge with Puppeteer-Sharp
Darío Kondratiuk
Darío Kondratiuk

Posted on • Updated on • Originally published at

Automating Microsoft Edge with Puppeteer-Sharp

As you may have heard, Microsoft made available to the public its Chromium-powered Edge browser. Maybe this question won't qualify as technical interview question but:

If Puppeteer-Sharp automates Chromium, and Microsoft Edge (insider) is powered by chromium, that would mean that...


When you call Puppeteer.LaunchAsync, one of the values you can set in the LaunchOptions is the ExecutablePath.

So, what would happen if we launch Puppeteer passing our Microsoft Edge browser path?

var browser = await Puppeteer.LaunchAsync(new LaunchOptions
    Headless = true,
    ExecutablePath = "C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe"

Let's write a super simple example:

var browserOptions = new LaunchOptions
    Headless = false,
    ExecutablePath = "C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe"

var browser = await Puppeteer.LaunchAsync(browserOptions);
var page = await browser.NewPageAsync();

await page.SetContentAsync("<div>Testing</div>");


demo running

And after a few tweaks in puppeteer-sharp, and one similar change in puppeteer, we managed to get all tests running using Microsoft Edge!

tests running

So we can say that Puppeteer-Sharp v1.14 is fully compatible with Microsoft Edge Insider version


Don't stop coding!

Originally posted on

Top comments (3)

headlesstesting profile image

Great writeup.

We've added a similar tutorial on our website to use PuppeteerSharp and MicrosoftEdge via Puppeteer in the cloud:

The advantage is that you do not need to have Microsoft Edge installed on your computer, the browser is running in our cloud. And you can scale your script to use multiple browsers in parallel.

vekzdran profile image
Vedran Mandić

Congratulations! :-) The miracles of modern browsers (and good software which is well tested.)

hardkoded profile image
Darío Kondratiuk

Thanks! :)