我在用debian。我已经把ruby和bundle设置好了。我知道
sudo gem install watir-webdriver
sudo gem install phantomjs然后我将两者都添加到我的Gemfile中。然后我做捆绑安装。然后我运行ruby代码。
Watir::Browser.new(:phantomjs)并得到这个错误:
/var/lib/gems/2.1.0/gems/selenium-webdriver-2.52.0/lib/selenium/webdriver/phantomjs/service.rb:38:in `executable_path': Unable to find phantomjs executable. (Selenium::WebDriver::Error::WebDriverError)我该怎么做呢?谢谢!
发布于 2016-02-21 08:30:07
你没有正确安装phantomjs (或者根本没有),所以当你的程序试图打开phantomjs时,它找不到它。
尝试此http://www.netdip.com/install-phantomjs-1422766836/
发布于 2016-08-31 21:27:53
您可以将phantomjs安装为gem。
https://stackoverflow.com/questions/35529262
复制相似问题