如何阻止 selenium chromedriver 登录到屏幕 [英] how to stop selenium chromedriver from logging to the screen

查看:21
本文介绍了如何阻止 selenium chromedriver 登录到屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何阻止 selenium chromedriver 将错误记录到屏幕上?

How do I stop selenium chromedriver from logging errors to the screen?

我正在运行一些黄瓜测试,我正在使用 capybara &selenium chromedriver 来驱动测试.在过去的几周里,我注意到 Chromedriver 已开始将其错误消息记录到屏幕上.我的测试仍然运行良好,但错误阻塞了输出​​.

I am running some cucumber tests and Im using capybara & the selenium chromedriver to drive the tests. In the last few weeks ive noticed that the Chromedriver has started logging its error messages to the screen. My tests still run fine but the errors are clogging up the output.

这是下面的输出:

Started ChromeDriver
port=9515
version=23.0.1240.0
log=C:GitreposBase Testschromedriver.log
[8244:5080:1115/151428:ERROR:gpu_info_collector_win.cc(91)] Can't retrieve a valid WinSAT assessment.
    Given I Select "Customer" from the "Search" gadget
    And I enter "Test Customer" for "Customer Name"
    And click "Search"
    And Select "Manage Customer" from the "Main Menu" drop down

解决方案是从输出中删除以下行,或者可能修复错误.[8244:5080:1115/151428:ERROR:gpu_info_collector_win.cc(91)] 无法检索有效的 WinSAT评估.

The solution would be to remove the following line from the output or possibly to fix the error. [8244:5080:1115/151428:ERROR:gpu_info_collector_win.cc(91)] Can't retrieve a valid WinSAT assessment.

我升级了驱动程序以修复一个不同的错误,但我最终得到了这个错误!

I upgraded the driver to fix a different error but I ended up getting this error!

推荐答案

尝试使用 STDERR 的重定向来启动 Chromedriver,例如

Try to start the Chromedriver using a redirect of STDERR, e.g.

chromedriver.exe 2>c: emperr.log

chromedriver.exe 2>c: emperr.log

这篇关于如何阻止 selenium chromedriver 登录到屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆