【问题标题】:RVM move path Selenium - Chromedriver [duplicate]RVM 移动路径 Selenium - Chromedriver [重复]
【发布时间】:2018-10-21 09:32:43
【问题描述】:
pry(main)> browser =Watir::Browser.new(:chrome)

错误

Selenium::WebDriver::Error::WebDriverError:  Unable to find chromedriver. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.
from /home/roberto/.rvm/gems/ruby-2.4.1/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:57:in `binary_path'

我已经安装并添加了 chrome 驱动程序的路径但是,我一直收到此错误,有人可以突出显示我缺少的内容。

【问题讨论】:

  • 看答案,我现在更新了二进制路径。

标签: ruby selenium-webdriver rvm watir


【解决方案1】:

您需要下载 chrome 驱动并将其放入您的 bin 文件夹中,请转到指定的路径并下载 chrome 驱动,然后将其粘贴到您的 bin 文件夹中。 C:\Ruby\bin 是我的路径,同样检查你的路径并将chromedriver.exe文件放入bin文件夹

设置二进制路径

Selenium::WebDriver::Firefox::Binary.path = 'C:\Ruby24-x64\bin C:\Users\farid\AppData\Local\Google\Chrome\application\chrome.exe'

【讨论】:

  • 这是我的路径,C:\RailsInstaller\Ruby2.3.​​3\bin 以及 chrome C:\Users\farid\AppData\Local\Google\Chrome\application 的路径
  • @Farida 是的,然后将您的 chrome 驱动程序粘贴到那里,它会工作的。
  • chromedriver 已经在路径中,我可以直接访问它并在其端口上正确打开,但是,我不能让 watir 打开它
  • @Farida 我不是要你点击,我是要你复制这个路径并将其粘贴到地址栏中,然后按回车键,看看 chrome 是否打开!
  • @Farida 好的,不客气。
猜你喜欢
  • 1970-01-01
  • 2016-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-05
  • 2018-12-21
  • 2019-06-01
  • 1970-01-01
相关资源
最近更新 更多