How to get “console.log” from Selenium (with Chrome) in the Rails log files?
问题 In Rails project, I'm using Cucumber, with Capybara, in order to run my tests in a Chrome web browser through Selenium. My tests are running fine but I would like to get the console.log , console.error and so on in the log files of my Rails application. I have registered a :chrome capybara driver like this (based on different articles and SO answers): Capybara.register_driver :chrome do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( chromeOptions: { args: chrome