Launching Microsoft Edge with URL from code

天涯浪子 提交于 2019-12-11 02:57:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!