Ana*_*d S 2 c# selenium selenium-webdriver
我试图为此指定IE驱动程序日志路径,我使用Command-Line.Code,如下所示
var optionsIe32 = new InternetExplorerOptions
{
IntroduceInstabilityByIgnoringProtectedModeSettings = true,
EnsureCleanSession = true,
BrowserCommandLineArguments = "--log-file=\"C:\\IE.log\"
};
var _webDriver = new InternetExplorerDriver(pathContainingIE32DriverServer, optionsIe32);
Run Code Online (Sandbox Code Playgroud)
但是发生错误时日志文件不会更新.
我在这做错了什么?提前致谢
你大多在那里.它在InternetExplorerService类中指定:
var service = InternetExplorerDriverService.CreateDefaultService();
service.LogFile = "C:\IE.log";
service.LoggingLevel = InternetExplorerDriverLogLevel.Trace;
Run Code Online (Sandbox Code Playgroud)
修改LoggingLevel到你真正想要的东西,你应该看到的可能性是Debug,Error,Warn,Info,Fatal和Trace.我认为Trace级别记录是最全面的.
BrowserCommandLineArguments从中移除optionsIe32,然后像往常一样将其传递InternetExplorerService到Driver构造中,以及您已经制作的选项:
var driver = new InternetExplorerDriver(service, optionsIe32);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1504 次 |
| 最近记录: |