Heroku: unable to connect to chromedriver 127.0.0.1:9515 when using Watir/Selenium

后端 未结 4 1673
难免孤独
难免孤独 2021-02-07 10:24

This runs locally (without specifying driver_path), but not on Heroku.

Code:

Selenium::WebDriver::Chrome.driver_path = ENV[         


        
4条回答
  •  孤城傲影
    2021-02-07 11:00

    I've been struggling with this one for more than a few hours ....

    It has been very frustrating to try to debug on Heroku CI. This ticket has helped me a lot to find a solution.

    I had this piece of code in the spec_helper.rb that was causing trouble (for if it helps someone):

    config.before(:each, type: :system, js: true) do
      driven_by :selenium_chrome_headless
    end
    

    It was bypassing all the capybara setup...

提交回复
热议问题