Andrea Nagar
Andrea Nagar

Reputation: 1263

Launching Microsoft Edge with URL from code

I need to launch the Microsoft Edge browser with a specific URL from a c# application. How can I do that? What's the best way to retrieve the path where Microsoft Edge is installed and call it passing the appropriate arguments? I would like to launch it directly without installing any webdriver.

I saw this How to open URL in Microsoft Edge from the command line? but couldn't make it work from code.

Thanks.

Upvotes: 4

Views: 12759

Answers (2)

Andrea Nagar
Andrea Nagar

Reputation: 1263

I figured that out.

You can call the browser by using microsoft-edge:http://www.yoursite.com from the command line.

Upvotes: 3

GeoffCoope
GeoffCoope

Reputation: 962

Process.Start("microsoft-edge:http://www.yourpage.co.uk");

Upvotes: 6

Related Questions