Skip to content

Commit

Permalink
Merge branch 'master' into 3.16_stable
Browse files Browse the repository at this point in the history
* master:
  Prepare for 3.16.1 release
  Move persistent client require to where it's used
  Fix missing constant when using :selenium_chrome
  • Loading branch information
twalpole committed Mar 30, 2019
2 parents 9f7db86 + 57ba367 commit b0390ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/capybara.rb
Expand Up @@ -544,6 +544,7 @@ module Selenium; end
end

Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.load_selenium
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
# Workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary
opts.args << '--disable-site-isolation-trials'
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/selenium/driver.rb
Expand Up @@ -16,7 +16,6 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base

def self.load_selenium
require 'selenium-webdriver'
require 'capybara/selenium/patches/persistent_client'
warn "Warning: You're using an unsupported version of selenium-webdriver, please upgrade." if Gem.loaded_specs['selenium-webdriver'].version < Gem::Version.new('3.5.0')
rescue LoadError => err
raise err if err.message !~ /selenium-webdriver/
Expand All @@ -27,6 +26,7 @@ def self.load_selenium
def browser
@browser ||= begin
options[:http_client] ||= begin
require 'capybara/selenium/patches/persistent_client'
if options[:timeout]
::Capybara::Selenium::PersistentClient.new(read_timeout: options[:timeout])
else
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Capybara
VERSION = '3.16.0'
VERSION = '3.16.1'
end

0 comments on commit b0390ce

Please sign in to comment.