【发布时间】:2013-12-23 18:19:41
【问题描述】:
在 C# 中使用 Internet Explorer Webdriver 时,服务器启动时会输出此消息:
启动 InternetExplorerDriver(64 位)
2.39.0.0
监听 37227 端口
我发现有命令行开关 --silent 在服务器启动时抑制诊断输出 (https://code.google.com/p/selenium/wiki/InternetExplorerDriver)。
我没有找到如何使用此命令行启动 Internet Explorer 驱动程序。
我的 C# 代码
InternetExplorerOptions optionsIE = new InternetExplorerOptions();
optionsIE.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
IWebDriver WebDriver = new InternetExplorerDriver(optionsIE);
我不想看到这些消息,我该如何隐藏它们?
感谢您的帮助。
【问题讨论】:
-
你为什么要压制这些?这些消息只是为了您的利益
-
因为我分析(解析)控制台输出。而这种类型的显示使解析复杂化
标签: c# internet-explorer selenium selenium-webdriver