LoadError: cannot load such file — selenium/webdriver/phantomjs

后端 未结 2 1270
無奈伤痛
無奈伤痛 2021-01-13 16:49

I have this code in my Cucumber Hooks file to run the ghost driver it was working until yesterday I start seeing the error message:

Before do
  Selenium::Web         


        
2条回答
  •  孤独总比滥情好
    2021-01-13 17:03

    For those who encounter this error, you can work around it by locking your selenium-webdriver version in your Gemfile like so:

    gem 'selenium-webdriver', '~> 3.6.0'
    

    and then bundle update to downgrade.

    (You may not even have selenium-webdriver specified in your Gemfile currently if it's just being loaded as a dependency of watir or some other library.)

    The long term fix, of course, is to move off of PhantomJS to Chrome or Firefox headless.

提交回复
热议问题