Selenium Webdriver PhantomJS C# always opens a cmd window
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to use PhantomJS with Selenium Webdriver in C#. Following is my code: IWebDriver driver = new PhantomJSDriver (); driver . Navigate (). GoToUrl ( "http://www.google.com" ); Console . WriteLine ( driver . Url ); driver . Quit (); The code works fine but whenever it runs, it opens up a cmd window where all the log of the phantomjs is displayed. The cmd is also closed with driver.Quit() . The problem is that I do not want the cmd window to be displayed. What should I do to achieve this? Update: When I do the same code in