webdrivers 3.8.0 → 3.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +14 -0
- data/.gitignore +7 -7
- data/.rubocop.yml +35 -19
- data/.travis.yml +24 -16
- data/CHANGELOG.md +120 -113
- data/Gemfile +6 -4
- data/LICENSE.txt +22 -22
- data/README.md +154 -153
- data/Rakefile +9 -9
- data/appveyor.yml +23 -0
- data/lib/webdrivers.rb +28 -26
- data/lib/webdrivers/chromedriver.rb +161 -140
- data/lib/webdrivers/common.rb +221 -205
- data/lib/webdrivers/geckodriver.rb +41 -43
- data/lib/webdrivers/iedriver.rb +41 -43
- data/lib/webdrivers/logger.rb +111 -109
- data/lib/webdrivers/mswebdriver.rb +59 -57
- data/lib/webdrivers/selenium.rb +40 -38
- data/spec/spec_helper.rb +12 -5
- data/spec/webdrivers/chromedriver_spec.rb +129 -104
- data/spec/webdrivers/geckodriver_spec.rb +66 -60
- data/spec/webdrivers/i_edriver_spec.rb +41 -36
- data/spec/webdrivers/ms_webdriver_spec.rb +26 -24
- data/spec/webdrivers_proxy_support_spec.rb +53 -51
- data/webdrivers.gemspec +30 -27
- metadata +27 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6896e06805c951acefc4a41cf1f647eb677bfb1a
|
4
|
+
data.tar.gz: 9dbc3a6e88ed3ac7e2d3c4ca885976ed236f589b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95c2d9ff6ded3b07aeb40018bf4d27046d5c0a691153fee376a59fffefb46172e616bf2d712f8fe4aab08c32e3ea72b31c5b874dd11d8c54a300fd025a2bbfea
|
7
|
+
data.tar.gz: e7476ae99421fb154d8884f6815e40274d05a1a824015a4a229910167ae430f04eeed79e3f5c7c07051ff4e66e045de0e982fd519746b3d841735038f153bf43
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#### Summary
|
2
|
+
Short summary of the bug or feature request.
|
3
|
+
|
4
|
+
#### Debug Info
|
5
|
+
Please provide the following information for bug reports:
|
6
|
+
|
7
|
+
* Operating system / CI Environment:
|
8
|
+
* Browser and version:
|
9
|
+
|
10
|
+
#### Expected Behavior
|
11
|
+
What you expect to happen.
|
12
|
+
|
13
|
+
#### Actual Behavior
|
14
|
+
What is actually happening: Error message, stack trace, DEBUG log if applicable (set `Webdrivers.logger.level = :DEBUG` after you require webdrivers)
|
data/.gitignore
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
*.gem
|
2
|
-
.bundle
|
3
|
-
Gemfile.lock
|
4
|
-
pkg/*
|
5
|
-
chromedriver.log
|
6
|
-
/.idea/
|
7
|
-
coverage/
|
1
|
+
*.gem
|
2
|
+
.bundle
|
3
|
+
Gemfile.lock
|
4
|
+
pkg/*
|
5
|
+
chromedriver.log
|
6
|
+
/.idea/
|
7
|
+
coverage/
|
data/.rubocop.yml
CHANGED
@@ -1,19 +1,35 @@
|
|
1
|
-
require: rubocop-rspec
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
Metrics/
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
Metrics/
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
Layout/EndOfLine:
|
4
|
+
EnforcedStyle: lf
|
5
|
+
|
6
|
+
Metrics/LineLength:
|
7
|
+
Max: 120
|
8
|
+
|
9
|
+
Metrics/MethodLength:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Metrics/BlockLength:
|
13
|
+
Exclude:
|
14
|
+
- 'spec/**/*'
|
15
|
+
|
16
|
+
Metrics/ClassLength:
|
17
|
+
Max: 110
|
18
|
+
Exclude:
|
19
|
+
- 'lib/webdrivers/common.rb'
|
20
|
+
|
21
|
+
Metrics/AbcSize:
|
22
|
+
Exclude:
|
23
|
+
- 'lib/webdrivers/common.rb'
|
24
|
+
|
25
|
+
Metrics/CyclomaticComplexity:
|
26
|
+
Max: 8
|
27
|
+
|
28
|
+
Style/Documentation:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
RSpec/ExampleLength:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
RSpec/MultipleExpectations:
|
35
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -1,16 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
addons:
|
4
|
+
apt:
|
5
|
+
packages:
|
6
|
+
- chromium-browser
|
7
|
+
- libgconf-2-4
|
8
|
+
chrome: stable
|
9
|
+
script: bundle exec rake $RAKE_TASK
|
10
|
+
matrix:
|
11
|
+
include:
|
12
|
+
- rvm: 2.6.3
|
13
|
+
env: RAKE_TASK=spec
|
14
|
+
- rvm: 2.5.5
|
15
|
+
env: RAKE_TASK=spec
|
16
|
+
- rvm: 2.4.6
|
17
|
+
env: RAKE_TASK=spec
|
18
|
+
- rvm: 2.4.6
|
19
|
+
os: osx
|
20
|
+
env: RAKE_TASK=spec
|
21
|
+
- rvm: 2.4.6
|
22
|
+
env: RAKE_TASK=rubocop
|
23
|
+
- rvm: jruby-9.2.0.0
|
24
|
+
env: RAKE_TASK=spec
|
data/CHANGELOG.md
CHANGED
@@ -1,113 +1,120 @@
|
|
1
|
-
### 3.8.
|
2
|
-
*
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
1
|
+
### 3.8.1 (2019-05-04)
|
2
|
+
* Downloads chromedriver with direct URL instead of parsing the downloads page
|
3
|
+
* Raises exception if version of Chrome does not have a known version of the driver (issue #79)
|
4
|
+
* Fixed bug warning of non-initialized variables (issue #62)
|
5
|
+
* Fixed bug with threads/processes colliding by downloading to temp files
|
6
|
+
* Fixed bug for file locking issue on Windows
|
7
|
+
|
8
|
+
### 3.8.0 (2019-04-17)
|
9
|
+
* Add support for `selenium-webdriver` v4. See [#69](https://github.com/titusfortner/webdrivers/pull/69).
|
10
|
+
* 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).
|
11
|
+
|
12
|
+
### 3.7.2 (2019-04-01)
|
13
|
+
* 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).
|
14
|
+
* Add workaround for a Jruby bug when retrieving Chrome version on Windows. See [#41](https://github.com/titusfortner/webdrivers/issues/41).
|
15
|
+
* Update README with more information.
|
16
|
+
|
17
|
+
### 3.7.1 (2019-03-25)
|
18
|
+
* Use `Selenium::WebDriver::Chrome#path` to check for a user given browser executable before defaulting to Google Chrome. Addresses [#38](https://github.com/titusfortner/webdrivers/issues/38).
|
19
|
+
* Download `chromedriver` v2.46 if Chrome/Chromium version is less than 70.
|
20
|
+
|
21
|
+
### 3.7.0 (2019-03-19)
|
22
|
+
|
23
|
+
* `chromedriver` version now matches the installed Chrome version. See [#32](https://github.com/titusfortner/webdrivers/pull/32).
|
24
|
+
|
25
|
+
### 3.6.0 (2018-12-30)
|
26
|
+
|
27
|
+
* Put net_http_ssl_fix inside a toggle since it can cause other issues
|
28
|
+
|
29
|
+
### 3.5.2 (2018-12-16)
|
30
|
+
|
31
|
+
* Use net_http_ssl_fix to address Net::HTTP issues on windows
|
32
|
+
|
33
|
+
### 3.5.1 (2018-12-16)
|
34
|
+
|
35
|
+
### 3.5.0 (2018-12-15)
|
36
|
+
|
37
|
+
### 3.5.0.beta1 (2018-12-15)
|
38
|
+
|
39
|
+
* Allow version to be specified
|
40
|
+
|
41
|
+
### 3.4.3 (2018-10-22)
|
42
|
+
|
43
|
+
* Fix bug with JRuby and geckodriver (thanks twalpole)
|
44
|
+
|
45
|
+
### 3.4.2 (2018-10-15)
|
46
|
+
|
47
|
+
* Use chromedriver latest version
|
48
|
+
|
49
|
+
### 3.4.1 (2018-09-17)
|
50
|
+
|
51
|
+
* Hardcode latest chromedriver version to 2.42 until we figure out chromedriver 70
|
52
|
+
|
53
|
+
### 3.4.0 (2018-09-07)
|
54
|
+
|
55
|
+
* Allow public access to `#install_dir` and `#binary`
|
56
|
+
* Allow user to set the default download directory
|
57
|
+
* Improve version comparisons with use of `Gem::Version`
|
58
|
+
|
59
|
+
### 3.3.3 (2018-08-14)
|
60
|
+
|
61
|
+
* Fix Geckodriver since Github changed its html again
|
62
|
+
|
63
|
+
### 3.3.2 (2018-05-04)
|
64
|
+
|
65
|
+
* Fix bug with IEDriver versioning (Thanks Aleksei Gusev)
|
66
|
+
|
67
|
+
### 3.3.1 (2018-05-04)
|
68
|
+
|
69
|
+
* Fix bug with MSWebdriver to fetch the correct driver instead of latest (Thanks kapoorlakshya)
|
70
|
+
|
71
|
+
### 3.3.0 (2018-04-29)
|
72
|
+
|
73
|
+
* Ensures downloading correct MSWebdriver version (Thanks kapoorlakshya)
|
74
|
+
|
75
|
+
### 3.2.4 (2017-01-04)
|
76
|
+
|
77
|
+
* Improve error message when unable to find the latest driver
|
78
|
+
|
79
|
+
### 3.2.3 (2017-12-12)
|
80
|
+
|
81
|
+
* Fixed bug with finding geckodriver on updated Github release pages
|
82
|
+
|
83
|
+
### 3.2.2 (2017-11-20)
|
84
|
+
|
85
|
+
* Fixed bug in `#untargz_file` (thanks Jake Goulding)
|
86
|
+
|
87
|
+
### 3.2.1 (2017-09-06)
|
88
|
+
|
89
|
+
* Fixed Proxy support so it actually works (thanks Cheezy)
|
90
|
+
|
91
|
+
### 3.2.0 (2017-08-21)
|
92
|
+
|
93
|
+
* Implemented Proxy support
|
94
|
+
|
95
|
+
### 3.1.0 (2017-08-21)
|
96
|
+
|
97
|
+
* Implemented Logging functionality
|
98
|
+
|
99
|
+
### 3.0.1 (2017-08-18)
|
100
|
+
|
101
|
+
* Create ~/.webdrivers directory if doesn't already exist
|
102
|
+
|
103
|
+
### 3.0.0 (2017-08-17)
|
104
|
+
|
105
|
+
* Removes unnecessary downloads
|
106
|
+
|
107
|
+
### 3.0.0.beta3 (2017-08-17)
|
108
|
+
|
109
|
+
* Supports Windows
|
110
|
+
* Supports mswebdriver and iedriver
|
111
|
+
|
112
|
+
### 3.0.0.beta2 (2017-08-16)
|
113
|
+
|
114
|
+
* Supports geckodriver on Mac and Linux
|
115
|
+
|
116
|
+
### 3.0.0.beta1 (2017-08-15)
|
117
|
+
|
118
|
+
* Complete Rewrite of 2.x
|
119
|
+
* Implemented with Monkey Patch not Shims
|
120
|
+
* Supports chromedriver on Mac and Linux
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
(The MIT License)
|
2
|
-
|
3
|
-
Copyright (c) 2017: Titus Fortner
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2017: Titus Fortner
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,153 +1,154 @@
|
|
1
|
-
# Webdrivers
|
2
|
-
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/webdrivers.svg)](https://badge.fury.io/rb/webdrivers)
|
4
|
-
[![Build status](https://
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
* [
|
14
|
-
* [
|
15
|
-
* [
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
config.
|
74
|
-
config.
|
75
|
-
config.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
* For versions
|
115
|
-
* For
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
1
|
+
# Webdrivers
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/webdrivers.svg)](https://badge.fury.io/rb/webdrivers)
|
4
|
+
[![Build status](https://travis-ci.org/titusfortner/webdrivers.svg?branch=master)](https://travis-ci.org/titusfortner/webdrivers)
|
5
|
+
[![AppVeyor status](https://ci.appveyor.com/api/projects/status/github/titusfortner/webdrivers?svg=true)](https://ci.appveyor.com/project/titusfortner/webdrivers)
|
6
|
+
|
7
|
+
Run Selenium tests more easily with automatic installation and updates for all supported webdrivers.
|
8
|
+
|
9
|
+
## Description
|
10
|
+
|
11
|
+
`webdrivers` downloads drivers and directs Selenium to use them. Currently supports:
|
12
|
+
|
13
|
+
* [chromedriver](http://chromedriver.chromium.org/)
|
14
|
+
* [geckodriver](https://github.com/mozilla/geckodriver)
|
15
|
+
* [IEDriverServer](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver)
|
16
|
+
* [MicrosoftWebDriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/)
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
In your Gemfile:
|
21
|
+
|
22
|
+
`gem 'webdrivers', '~> 3.0'`
|
23
|
+
|
24
|
+
In your project:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'webdrivers'
|
28
|
+
```
|
29
|
+
|
30
|
+
The drivers will now be automatically downloaded or updated when you launch a browser
|
31
|
+
through Selenium.
|
32
|
+
|
33
|
+
### Download Location
|
34
|
+
|
35
|
+
The default download location is `~/.webdrivers` directory, and this is configurable:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
Webdrivers.install_dir = '/webdrivers/install/dir'
|
39
|
+
```
|
40
|
+
|
41
|
+
### Version Pinning
|
42
|
+
|
43
|
+
If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise, the latest (stable)
|
44
|
+
driver will be downloaded and passed to Selenium.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Chrome
|
48
|
+
Webdrivers::Chromedriver.version = '2.46'
|
49
|
+
|
50
|
+
# Firefox
|
51
|
+
Webdrivers::Geckodriver.version = '0.23.0'
|
52
|
+
|
53
|
+
# Microsoft Internet Explorer
|
54
|
+
Webdrivers::IEdriver.version = '3.14.0'
|
55
|
+
|
56
|
+
# Microsoft Edge
|
57
|
+
Webdrivers::MSWebdriver.version = '17134'
|
58
|
+
```
|
59
|
+
|
60
|
+
You can also trigger the update in your code, but it is not required:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
Webdrivers::Chromedriver.update
|
64
|
+
```
|
65
|
+
|
66
|
+
### Proxy
|
67
|
+
|
68
|
+
If there is a proxy between you and the Internet then you will need to configure
|
69
|
+
the gem to use the proxy. You can do this by calling the `configure` method.
|
70
|
+
|
71
|
+
````ruby
|
72
|
+
Webdrivers.configure do |config|
|
73
|
+
config.proxy_addr = 'myproxy_address.com'
|
74
|
+
config.proxy_port = '8080'
|
75
|
+
config.proxy_user = 'username'
|
76
|
+
config.proxy_pass = 'password'
|
77
|
+
end
|
78
|
+
````
|
79
|
+
|
80
|
+
### `SSL_connect` errors
|
81
|
+
|
82
|
+
If you are getting an error like this (especially common on Windows):
|
83
|
+
|
84
|
+
`SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`
|
85
|
+
|
86
|
+
Add the following to your Gemfile:
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
gem "net_http_ssl_fix"
|
90
|
+
```
|
91
|
+
|
92
|
+
Add the following to your code:
|
93
|
+
|
94
|
+
````ruby
|
95
|
+
require 'net_http_ssl_fix'
|
96
|
+
````
|
97
|
+
|
98
|
+
Other solutions are documented on the RubyGems [website](https://guides.rubygems.org/ssl-certificate-update/).
|
99
|
+
|
100
|
+
### Logging
|
101
|
+
|
102
|
+
The logging level can be configured for debugging purpose:
|
103
|
+
|
104
|
+
```ruby
|
105
|
+
Webdrivers.logger.level = :DEBUG
|
106
|
+
```
|
107
|
+
|
108
|
+
### Browser Specific Notes
|
109
|
+
|
110
|
+
#### When using Chrome/Chromium
|
111
|
+
|
112
|
+
The version of `chromedriver` will depend on the version of Chrome you are using it with:
|
113
|
+
|
114
|
+
* For versions >= 70, the downloaded version of `chromedriver` will match the installed version of Google Chrome. More information [here](http://chromedriver.chromium.org/downloads/version-selection).
|
115
|
+
* For versions <= 69, `chromedriver` version 2.46 will be downloaded.
|
116
|
+
* For beta versions, you'll have to set the desired beta version of `chromedriver` using `Webdrivers::Chromedriver.version`.
|
117
|
+
|
118
|
+
The gem, by default, looks for the Google Chrome version. You can override this by providing a path to the Chromium binary:
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'
|
122
|
+
```
|
123
|
+
|
124
|
+
This is also required if Google Chrome is not installed in its [default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).
|
125
|
+
|
126
|
+
#### When using Microsoft Edge
|
127
|
+
|
128
|
+
After updating Microsoft Edge on Windows 10, you will need to delete the existing binary (`%USERPROFILE%/.webdrivers/MicrosoftWebDriver.exe`) to
|
129
|
+
to be able to download the latest version through this gem.
|
130
|
+
|
131
|
+
This is because `MicrosoftWebDriver.exe` is not backwards compatible and it does not have an argument to retrieve
|
132
|
+
the current version. We work around this limitation by querying the current Edge version from the registry and
|
133
|
+
fetching the corresponding binary IF a file does not already exist. If a file does exist, the gem assumes it is the
|
134
|
+
expected version and skips the download process.
|
135
|
+
|
136
|
+
If you continue with the outdated binary, Selenium will throw an error: `unable to connect to MicrosoftWebDriver localhost:17556`.
|
137
|
+
|
138
|
+
## Wiki
|
139
|
+
|
140
|
+
Please see the [wiki](https://github.com/titusfortner/webdrivers/wiki) for solutions to commonly reported issues.
|
141
|
+
|
142
|
+
## License
|
143
|
+
|
144
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),
|
145
|
+
see LICENSE.txt for full details and copyright.
|
146
|
+
|
147
|
+
## Contributing
|
148
|
+
|
149
|
+
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.
|
150
|
+
|
151
|
+
## Copyright
|
152
|
+
|
153
|
+
Copyright (c) 2017 Titus Fortner
|
154
|
+
See LICENSE for details
|