LoadError:无法加载此类文件-selenium/webdriver/phantomjs [英] LoadError: cannot load such file -- selenium/webdriver/phantomjs

查看:178
本文介绍了LoadError:无法加载此类文件-selenium/webdriver/phantomjs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Cucumber Hooks文件中有此代码,以运行一直有效的幽灵驱动程序,直到昨天我开始看到错误消息:

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::WebDriver::PhantomJS.path = 'C:\phantomjs-2.1.1-windows\bin\phantomjs.exe'
  @browser = Watir::Browser.start "https://www.google.com",  :phantomjs
  @browser.window.maximize    
end

错误消息:

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

推荐答案

是的,从Selenium 3.8开始,我们已经删除了对PhantomJS的支持. PhantomJS项目不再得到维护.如果您确实需要无头的话,请研究Chrome或Firefox无头选项.

Yes, we've removed support for PhantomJS as of Selenium 3.8. The PhantomJS project is no longer being maintained. If you actually do need headless, please investigate either the Chrome or Firefox headless options.

这篇关于LoadError:无法加载此类文件-selenium/webdriver/phantomjs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆