ChromeDriver.exe registration blocking

I am running ruby ​​unit tests against Chrome using watir-webdriver. Whenever the test runs and the chromedriver.exe file is run, the following result is output:

Started ChromeDriver
port=9515
version=26.0.1383.0
log=C:\Home\Server\Test\Watir\web\chromedriver.log
[5468:8796:0404/150755:ERROR:accelerated_surface_win.cc(208)] Reseting D3D device
[5468:8996:0404/150758:ERROR:textfield.h(156)] NOT IMPLEMENTED
[WARNING:..\..\..\..\flash\platform\pepper\pep_module.cpp(63)] SANDBOXED

None of this affects the proper functioning of the tests, but, as you might imagine, the appearance of "ERRORS" and "WARNING" can be quite confusing, for example, in the rules of parsing in Jenkins looking for failures. Of course, in the rules of parsing I can get an idea of ​​the regular expression, but it would be nice to disable this detailed and unnecessary log from the side of chromedriver.exe. I have seen many references to this search for an answer. No one came up with a solution. Yes, chromedriver may have the -silent option, but there seems to be no way to pass this to the executable. Code similar to the one below should work, but as far as I can see, it has zero effect. Any ideas?

profile = Selenium::WebDriver::Chrome::Profile.new
profile['--cant-make-any-switches-work-here-how-about-you'] = true
browser = Watir::Browser.new :chrome, :profile => profile, :switches => %w[--ignore-certificate-errors --disable-extensions --disable-popup-blocking --disable-translate--allow-file-access]
+5
source share
4

-

... selenium\webdriver\chrome\service.rb .

"-silent" .... , /.

    def initialize(executable_path, port)
      @uri           = URI.parse "http://#{Platform.localhost}:#{port}"
      server_command = [executable_path, " -silent", "--port=#{port}"]

      @process       = ChildProcess.build(*server_command)
      @socket_poller = SocketPoller.new Platform.localhost, port, START_TIMEOUT

      @process.io.inherit! if $DEBUG == true
    end
+2

chromeOptions key --log-level=3,

+2

, , , stdout , : service_log_path.

@browser = Watir::Browser.new :chrome, :service_log_path => 'chromedriver.out'

'-silent' '--silent', -silent', ' --silent', , , ...selenium\webdriver\chrome\service.rb. .

I could not find a place to capture stderr chromedriver and reject it to zero (not to mention the need to handle this in windows and in * nix / osx)

The driver should by default use something less verbose. In this case, INFO is too complicated, as hundreds of log entries are issued as INFO, with 90% + being identical.

At least an argument: service_log_pathmost of them work.

+1
source

You can try -Dwebdriver.chrome.logfile="/dev/null"and / or -Dwebdriver.chrome.args="--disable-logging"parameters of java that runsselenium-server-standalone-what.ever.jar

0
source

All Articles