【发布时间】:2016-10-24 18:47:27
【问题描述】:
我有一个在 Linux 机器上使用 chromedriver 的应用程序,我将应用程序切换到了 Windows 10 机器。现在突然告诉我找不到 chromedriver 文件。
这是错误:
Selenium::WebDriver::Error::WebDriverError in Static#home
Showing C:/Users/User/Documents/test_app/app/views/static/home.html.erb where line #4 raised:
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.
我将 chromedriver 文件放在我的 Linux 机器上的同一位置,就在应用程序的主文件夹中。在这种情况下,路径是C:\Users\User\Document\test_app。 Windows 对路径的解释是否与 Linux 不同?
chromedriver 是latest release。它的标题是“chromedriver_win32.zip”。 “赢”是指Windows。 “32”是否意味着它适用于 32 位系统?我的机器是 64 位的。
【问题讨论】:
-
异常中的
PATH指的是环境变量。您的问题可能是因为当前目录不是C:\Users\User\Document\test_app。 -
@FlorentB。我肯定在那个确切的目录中运行我的 rails 服务器。我不使用 chromedriver 的页面都可以正常工作。
标签: ruby-on-rails windows selenium webdriver selenium-chromedriver