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 +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +23 -15
- data/lib/webdrivers.rb +2 -1
- data/lib/webdrivers/common.rb +2 -2
- data/lib/webdrivers/selenium.rb +26 -17
- data/spec/webdrivers_proxy_support_spec.rb +6 -0
- data/webdrivers.gemspec +1 -2
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f215e928688103db9bbc522a6af8058bd47f11fa48b553923d6b1a70bdb9a1ee
|
4
|
+
data.tar.gz: fa1b202ad49b119ddf1ad2eedfc6dc520d25a2de3e88aabd5cc91ed4a9342d15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c075eb9927535e331def0814676e54c1844a383ba641507ca09327b63839c2bb2691e08039c3bd3d14f590eaebfd9f09d59c4fc46098164d9a266c54803c67e
|
7
|
+
data.tar.gz: 84f7e19c0a7aca6b09d3407b26dad01098027373530ac0916f6d8cf19894cdb57c91ba6345ed71c6c798d99fdb57af5297098120a8dfc2606acf71314bc0400c
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
### 3.
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
94
|
+
require 'net_http_ssl_fix'
|
87
95
|
````
|
88
96
|
|
89
|
-
|
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
|
-
|
107
|
+
### Browser Specific Notes
|
98
108
|
|
99
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
data/lib/webdrivers/common.rb
CHANGED
@@ -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 =>
|
141
|
-
Webdrivers.logger.debug
|
140
|
+
rescue StandardError => e
|
141
|
+
Webdrivers.logger.debug e
|
142
142
|
false
|
143
143
|
end
|
144
144
|
|
data/lib/webdrivers/selenium.rb
CHANGED
@@ -1,28 +1,37 @@
|
|
1
1
|
require 'selenium-webdriver'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
19
|
+
module Firefox
|
20
|
+
def self.driver_path
|
21
|
+
@driver_path ||= Webdrivers::Geckodriver.update
|
22
|
+
end
|
14
23
|
end
|
15
|
-
end
|
16
24
|
|
17
|
-
|
18
|
-
|
19
|
-
|
25
|
+
module Edge
|
26
|
+
def self.driver_path
|
27
|
+
@driver_path ||= Webdrivers::MSWebdriver.update
|
28
|
+
end
|
20
29
|
end
|
21
|
-
end
|
22
30
|
|
23
|
-
|
24
|
-
|
25
|
-
|
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.
|
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.
|
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-
|
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
|