4

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.

Community
  • 1
  • 1
Andrea Nagar
  • 1,233
  • 2
  • 13
  • 23
  • possible duplicate of [How to open URL in Microsoft Edge from the command line?](http://stackoverflow.com/questions/31164253/how-to-open-url-in-microsoft-edge-from-the-command-line) – Adrian Fâciu Aug 10 '15 at 08:00

2 Answers2

5
Process.Start("microsoft-edge:http://www.yourpage.co.uk");
GeoffCoope
  • 952
  • 9
  • 20
3

I figured that out.

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

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Andrea Nagar
  • 1,233
  • 2
  • 13
  • 23
  • How do I open the New Tab page instead of a web page? `start microsoft-edge:about:newtab` does not seem to work as it opens Edge with the default search engine and `about:newtab` as a search term only. – Gerd Sep 23 '20 at 14:34