Skip to content

Commit

Permalink
current code already requires > 3.141
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 14, 2021
1 parent 34d04f2 commit f501c19
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
15 changes: 1 addition & 14 deletions lib/webdrivers/chromedriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,4 @@ def sufficient_binary?
end
end

if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::Chrome::Service.driver_path = proc { ::Webdrivers::Chromedriver.update }
else
# v3.141.0 and lower
module Selenium
module WebDriver
module Chrome
def self.driver_path
@driver_path ||= Webdrivers::Chromedriver.update
end
end
end
end
end
::Selenium::WebDriver::Chrome::Service.driver_path = proc { ::Webdrivers::Chromedriver.update }
15 changes: 1 addition & 14 deletions lib/webdrivers/geckodriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,4 @@ def platform_ext
end
end

if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::Firefox::Service.driver_path = proc { ::Webdrivers::Geckodriver.update }
else
# v3.141.0 and lower
module Selenium
module WebDriver
module Firefox
def self.driver_path
@driver_path ||= Webdrivers::Geckodriver.update
end
end
end
end
end
::Selenium::WebDriver::Firefox::Service.driver_path = proc { ::Webdrivers::Geckodriver.update }
15 changes: 1 addition & 14 deletions lib/webdrivers/iedriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,4 @@ def download_manifest
end
end

if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::IE::Service.driver_path = proc { ::Webdrivers::IEdriver.update }
else
# v3.141.0 and lower
module Selenium
module WebDriver
module IE
def self.driver_path
@driver_path ||= Webdrivers::IEdriver.update
end
end
end
end
end
::Selenium::WebDriver::IE::Service.driver_path = proc { ::Webdrivers::IEdriver.update }
2 changes: 1 addition & 1 deletion webdrivers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'nokogiri', '~> 1.6'
s.add_runtime_dependency 'rubyzip', '>= 1.3.0'
s.add_runtime_dependency 'selenium-webdriver', '>= 3.0', '< 5.0'
s.add_runtime_dependency 'selenium-webdriver', '> 3.141', '< 5.0'
end

0 comments on commit f501c19

Please sign in to comment.