问题
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.
回答1:
Process.Start("microsoft-edge:http://www.yourpage.co.uk");
回答2:
I figured that out.
You can call the browser by using microsoft-edge:http://www.yoursite.com
from the command line.
来源:https://stackoverflow.com/questions/31909274/launching-microsoft-edge-with-url-from-code