小编Med*_*wed的帖子

Java Selenium Chrome驱动程序 - 禁用日志记录

我正在使用Selenium Chrome驱动程序并希望禁用日志记录,我尝试了所有现有解决方案,包括:

ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.addArguments("--log-level=3");
Run Code Online (Sandbox Code Playgroud)

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
        capabilities.setCapability("chrome.verbose", false);
Run Code Online (Sandbox Code Playgroud)

但没有一个对我有用,仍然显示此信息和警告日志:

在端口17965上启动ChromeDriver 2.25.426924(649f9b868f6783ec9de71c123212b908bf3b232e)仅允许本地连接.2017年7月25日下午7:01:16 org.openqa.selenium.remote.ProtocolHandshake createSession INFO:尝试双方言会议,假设Postel法则在远程结束时于2017年7月25日下午7:01:16 org.openqa .selenium.remote.ProtocolHandshake createSession INFO:检测到的方言:OSS

java selenium google-chrome selenium-chromedriver

8
推荐指数
1
解决办法
6416
查看次数