Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 用水杨酸/硒/RSpec抑制奇异输出_Ruby_Selenium_Rspec_Capybara - Fatal编程技术网

Ruby 用水杨酸/硒/RSpec抑制奇异输出

Ruby 用水杨酸/硒/RSpec抑制奇异输出,ruby,selenium,rspec,capybara,Ruby,Selenium,Rspec,Capybara,我正在使用RSpec、Capybara和Selenium用Ruby编写验收测试。我在输出中观察到一些我无法识别的消息,并且我无法通过谷歌搜索找到这些消息 以下是我的一个测试的输出: Authentication with an invalid email address gives an error message with an invalid password [9344:5812:1011/235445:ERROR:navigation_entry_screenshot_m

我正在使用RSpec、Capybara和Selenium用Ruby编写验收测试。我在输出中观察到一些我无法识别的消息,并且我无法通过谷歌搜索找到这些消息

以下是我的一个测试的输出:

Authentication
  with an invalid email address
    gives an error message
  with an invalid password
[9344:5812:1011/235445:ERROR:navigation_entry_screenshot_manager.cc(141)] Invalid entry with unique id: 22
    gives an error message
  with a valid email and password
[9344:5812:1011/235450:ERROR:navigation_entry_screenshot_manager.cc(141)] Invalid entry with unique id: 33
    takes us to the correct page

3 examples, 0 failures

我不知道navigation\u entry\u screenshot\u manager.cc是什么,只要它不会导致测试失败,我也不在乎。我只是想知道是否有办法阻止它出现在RSpec输出中。

我不知道它是否对您有效,但以下是我如何在我的规范中抑制chrome警告消息:

Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.new(app, browser: :chrome, switches: ['--test-type'])
end

假设您使用的是带有硒元素的chrome,听起来像是这个bug-