webdrivers 3.7.2 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ef60a7f9627b14fa90b684a1f807e8b853a0eda388bd21d8a3017ca98da585d
4
- data.tar.gz: 8d221be9ff66fd793c50934990c12236349a0ad04a1b0e9a9fcfc7d65632231a
3
+ metadata.gz: f215e928688103db9bbc522a6af8058bd47f11fa48b553923d6b1a70bdb9a1ee
4
+ data.tar.gz: fa1b202ad49b119ddf1ad2eedfc6dc520d25a2de3e88aabd5cc91ed4a9342d15
5
5
  SHA512:
6
- metadata.gz: 32bb8a8f53ad38f1d6a6e7f25c62787039db4e4e165f5d52f08877a05da8230bcb1fc2387cfd8cd75aa653aed689ee06eb21ea0fd25e3b491c0605d5f2c0ca86
7
- data.tar.gz: 3dc0a5206c967a98b25aa5e0bf1b257769d362894f4f00141a988b6fdd6bd395cbc40785dee73c88e016b0cb40c3b0198696e950db4a6cdda43e38d1278349f5
6
+ metadata.gz: 9c075eb9927535e331def0814676e54c1844a383ba641507ca09327b63839c2bb2691e08039c3bd3d14f590eaebfd9f09d59c4fc46098164d9a266c54803c67e
7
+ data.tar.gz: 84f7e19c0a7aca6b09d3407b26dad01098027373530ac0916f6d8cf19894cdb57c91ba6345ed71c6c798d99fdb57af5297098120a8dfc2606acf71314bc0400c
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ### 3.7.2 (2019-03-29)
1
+ ### 3.8.0 (2019-04-17)
2
+ * Add support for `selenium-webdriver` v4. See [#69](https://github.com/titusfortner/webdrivers/pull/69).
3
+ * Remove dependency on `net_http_ssl_fix` gem. `Webdrivers.net_http_ssl_fix` now raises an exception and points to other solutions. See [#60](https://github.com/titusfortner/webdrivers/pull/60) and [#68](https://github.com/titusfortner/webdrivers/pull/68).
4
+
5
+ ### 3.7.2 (2019-04-01)
2
6
  * Fix bugs in methods that retrieve Chrome/Chromium version. See [#43](https://github.com/titusfortner/webdrivers/pull/43) and [#52](https://github.com/titusfortner/webdrivers/issues/52).
3
7
  * Add workaround for a Jruby bug when retrieving Chrome version on Windows. See [#41](https://github.com/titusfortner/webdrivers/issues/41).
4
8
  * Update README with more information.
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Run Selenium tests more easily with automatic installation and updates for all supported webdrivers.
7
7
 
8
- # Description
8
+ ## Description
9
9
 
10
10
  `webdrivers` downloads drivers and directs Selenium to use them. Currently supports:
11
11
 
@@ -14,7 +14,7 @@ Run Selenium tests more easily with automatic installation and updates for all s
14
14
  * [IEDriverServer](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver)
15
15
  * [MicrosoftWebDriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/)
16
16
 
17
- # Usage
17
+ ## Usage
18
18
 
19
19
  In your Gemfile:
20
20
 
@@ -29,7 +29,7 @@ require 'webdrivers'
29
29
  The drivers will now be automatically downloaded or updated when you launch a browser
30
30
  through Selenium.
31
31
 
32
- **Download Location**
32
+ ### Download Location
33
33
 
34
34
  The default download location is `~/.webdrivers` directory, and this is configurable:
35
35
 
@@ -37,7 +37,7 @@ The default download location is `~/.webdrivers` directory, and this is configur
37
37
  Webdrivers.install_dir = '/webdrivers/install/dir'
38
38
  ```
39
39
 
40
- **Version Pinning**
40
+ ### Version Pinning
41
41
 
42
42
  If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise, the latest (stable)
43
43
  driver will be downloaded and passed to Selenium.
@@ -62,7 +62,7 @@ You can also trigger the update in your code, but it is not required:
62
62
  Webdrivers::Chromedriver.update
63
63
  ```
64
64
 
65
- # Proxy
65
+ ### Proxy
66
66
 
67
67
  If there is a proxy between you and the Internet then you will need to configure
68
68
  the gem to use the proxy. You can do this by calling the `configure` method.
@@ -76,17 +76,27 @@ Webdrivers.configure do |config|
76
76
  end
77
77
  ````
78
78
 
79
+ ### `SSL_connect` errors
80
+
79
81
  If you are getting an error like this (especially common on Windows):
80
82
 
81
83
  `SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`
82
84
 
85
+ Add the following to your Gemfile:
86
+
87
+ ```ruby
88
+ gem "net_http_ssl_fix"
89
+ ```
90
+
83
91
  Add the following to your code:
84
92
 
85
93
  ````ruby
86
- Webdrivers.net_http_ssl_fix
94
+ require 'net_http_ssl_fix'
87
95
  ````
88
96
 
89
- # Logging
97
+ Other solutions are documented on the RubyGems [website](https://guides.rubygems.org/ssl-certificate-update/).
98
+
99
+ ### Logging
90
100
 
91
101
  The logging level can be configured for debugging purpose:
92
102
 
@@ -94,9 +104,9 @@ The logging level can be configured for debugging purpose:
94
104
  Webdrivers.logger.level = :DEBUG
95
105
  ```
96
106
 
97
- # Browser Specific Notes
107
+ ### Browser Specific Notes
98
108
 
99
- **When using Chrome/Chromium**
109
+ #### When using Chrome/Chromium
100
110
 
101
111
  The version of `chromedriver` will depend on the version of Chrome you are using it with:
102
112
 
@@ -112,7 +122,7 @@ Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'
112
122
 
113
123
  This is also required if Google Chrome is not installed in its [default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).
114
124
 
115
- **When using Microsoft Edge**
125
+ #### When using Microsoft Edge
116
126
 
117
127
  After updating Microsoft Edge on Windows 10, you will need to delete the existing binary (`%USERPROFILE%/.webdrivers/MicrosoftWebDriver.exe`) to
118
128
  to be able to download the latest version through this gem.
@@ -124,21 +134,19 @@ expected version and skips the download process.
124
134
 
125
135
  If you continue with the outdated binary, Selenium will throw an error: `unable to connect to MicrosoftWebDriver localhost:17556`.
126
136
 
127
- # Wiki
137
+ ## Wiki
128
138
 
129
139
  Please see the [wiki](https://github.com/titusfortner/webdrivers/wiki) for solutions to commonly reported issues.
130
140
 
131
- # License
141
+ ## License
132
142
 
133
143
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),
134
144
  see LICENSE.txt for full details and copyright.
135
145
 
136
-
137
- # Contributing
146
+ ## Contributing
138
147
 
139
148
  Bug reports and pull requests are welcome [on GitHub](https://github.com/titusfortner/webdrivers). Run `bundle exec rake` and squash the commits in your PRs.
140
149
 
141
-
142
150
  ## Copyright
143
151
 
144
152
  Copyright (c) 2017 Titus Fortner
data/lib/webdrivers.rb CHANGED
@@ -19,7 +19,8 @@ module Webdrivers
19
19
  end
20
20
 
21
21
  def net_http_ssl_fix
22
- require 'net_http_ssl_fix'
22
+ raise 'Webdrivers.net_http_ssl_fix is no longer available.' \
23
+ ' Please see https://github.com/titusfortner/webdrivers#ssl_connect-errors.'
23
24
  end
24
25
  end
25
26
  end
@@ -137,8 +137,8 @@ module Webdrivers
137
137
  get(base_url)
138
138
  Webdrivers.logger.debug "Found Site: #{base_url}"
139
139
  true
140
- rescue StandardError => ex
141
- Webdrivers.logger.debug ex.inspect
140
+ rescue StandardError => e
141
+ Webdrivers.logger.debug e
142
142
  false
143
143
  end
144
144
 
@@ -1,28 +1,37 @@
1
1
  require 'selenium-webdriver'
2
2
 
3
- module Selenium
4
- module WebDriver
5
- module Chrome
6
- def self.driver_path
7
- @driver_path ||= Webdrivers::Chromedriver.update
3
+ # v3.151.59 and higher
4
+ if ::Selenium::WebDriver::Service.respond_to? :driver_path=
5
+ ::Selenium::WebDriver::Chrome::Service.driver_path = proc { ::Webdrivers::Chromedriver.update }
6
+ ::Selenium::WebDriver::Firefox::Service.driver_path = proc { ::Webdrivers::Geckodriver.update }
7
+ ::Selenium::WebDriver::Edge::Service.driver_path = proc { ::Webdrivers::MSWebdriver.update }
8
+ ::Selenium::WebDriver::IE::Service.driver_path = proc { ::Webdrivers::IEdriver.update }
9
+ else
10
+ # v3.141.0 and lower
11
+ module Selenium
12
+ module WebDriver
13
+ module Chrome
14
+ def self.driver_path
15
+ @driver_path ||= Webdrivers::Chromedriver.update
16
+ end
8
17
  end
9
- end
10
18
 
11
- module Firefox
12
- def self.driver_path
13
- @driver_path ||= Webdrivers::Geckodriver.update
19
+ module Firefox
20
+ def self.driver_path
21
+ @driver_path ||= Webdrivers::Geckodriver.update
22
+ end
14
23
  end
15
- end
16
24
 
17
- module Edge
18
- def self.driver_path
19
- @driver_path ||= Webdrivers::MSWebdriver.update
25
+ module Edge
26
+ def self.driver_path
27
+ @driver_path ||= Webdrivers::MSWebdriver.update
28
+ end
20
29
  end
21
- end
22
30
 
23
- module IE
24
- def self.driver_path
25
- @driver_path ||= Webdrivers::IEdriver.update
31
+ module IE
32
+ def self.driver_path
33
+ @driver_path ||= Webdrivers::IEdriver.update
34
+ end
26
35
  end
27
36
  end
28
37
  end
@@ -42,4 +42,10 @@ describe Webdrivers do
42
42
  it 'does not use the Proxy when proxy is not configured' do
43
43
  expect(http_object.instance_variable_get('@is_proxy_class')).to be false
44
44
  end
45
+
46
+ it 'raises an exception when net_http_ssl_fix is called.' do
47
+ err = 'Webdrivers.net_http_ssl_fix is no longer available.' \
48
+ ' Please see https://github.com/titusfortner/webdrivers#ssl_connect-errors.'
49
+ expect { described_class.net_http_ssl_fix }.to raise_error(StandardError, err)
50
+ end
45
51
  end
data/webdrivers.gemspec CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH.push File.expand_path('../lib', __dir__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'webdrivers'
5
- s.version = '3.7.2'
5
+ s.version = '3.8.0'
6
6
  s.authors = ['Titus Fortner', 'Lakshya Kapoor']
7
7
  s.email = %w[titusfortner@gmail.com kapoorlakshya@gmail.com]
8
8
  s.homepage = 'https://github.com/titusfortner/webdrivers'
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency 'rubocop-rspec', '~>1.32'
22
22
  s.add_development_dependency 'simplecov', '~>0.16'
23
23
 
24
- s.add_runtime_dependency 'net_http_ssl_fix'
25
24
  s.add_runtime_dependency 'nokogiri', '~> 1.6'
26
25
  s.add_runtime_dependency 'rubyzip', '~> 1.0'
27
26
  s.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.2
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-01 00:00:00.000000000 Z
12
+ date: 2019-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -81,20 +81,6 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0.16'
84
- - !ruby/object:Gem::Dependency
85
- name: net_http_ssl_fix
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :runtime
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
84
  - !ruby/object:Gem::Dependency
99
85
  name: nokogiri
100
86
  requirement: !ruby/object:Gem::Requirement