我正在使用Ruby2.1.5的Debian8.2 "Jessie“。
在test.rb中,我有require selenium-webdriver,但是当我运行Selenium::WebDriver.for :ChromeDriver时会得到以下错误:
/var/lib/gems/2.1.0/gems/selenium-webdriver-2.48.1/lib/selenium/webdriver/common/driver.rb:72:in `for': unknown driver: :ChromeDriver (ArgumentError)我没有铬,但确实有克罗米姆。我怎样才能让硒合作?
发布于 2016-01-11 00:22:59
在*nix系统上没有铬的特定驱动程序。因此,您需要使用:chrome作为驱动程序,而不是:ChromeDriver,例如,Selenium::WebDriver.for :chrome
此外,在执行系统上使用此gem对chrome驱动器进行hassel免费设置:https://github.com/flavorjones/chromedriver-helper
https://stackoverflow.com/questions/34618595
复制相似问题