0

使用 ruby​​ 2.4.0p0 , Rails 5.2.3

为 Rails 应用程序运行系统测试用例时出错:

Error:
SubscriptionsTest#test_visit_susbcription:
Selenium::WebDriver::Error::WebDriverError: Unable to find chromedriver. Please download the server from
https://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH.
More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.

我的系统测试如下:

require "application_system_test_case"

    class SubscriptionsTest < ApplicationSystemTestCase
      test "visit susbcription" do
        visit subscriptions_url
      end
    end

请提出可能的出路。
运行系统测试的命令:

RAILS_ENV=test rails test -v test/system/subscriptions_test.rb
4

1 回答 1

2

这个问题可以通过在 gemfile 中添加下面的 gem 来解决。

gem 'webdrivers', '~> 4.0'
于 2020-05-21T17:53:20.487 回答