I have my Rails-App
set up with Capybara
. Tests are working fine but I'm getting this error:
2019-05-03 14:51:58 WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.
Gemfile
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
test_helper.rb (with or without the disabled lines makes no difference)
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'capybara/rspec'
require 'rspec/rails'
require 'capybara/rails'
RSpec.configure do |config|
# Capybara.register_driver :chrome do |app|
# Capybara::Selenium::Driver.new app, browser: :chrome,
# options: Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu])
# end
# Capybara.javascript_driver = :chrome
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
Kernel.srand config.seed
end
Any ideas?
Capybara-webkit driver (a gem) is used for true headless browser testing with JavaScript support. It uses QtWebKit and it is significantly faster than Selenium as it does not load the entire browser.
this worked for me. Since the gem is deprecated, I just uninstalled the gem
gem uninstall chromedriver-helper
then remove it from your gem file and run:
bundle update
after that, add the webdriver gem in-place, and bundle install
gem 'webdrivers', '~> 4.0'
bundle install
the warnings should be gone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With