webdrivers 3.9.2 → 3.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- # Specify your gem's dependencies in webdrivers.gemspec
6
- gemspec
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in webdrivers.gemspec
6
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2017-2019: 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-2019: 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,169 +1,169 @@
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/ejh90xqbvkphq4cy/branch/master?svg=true)](https://ci.appveyor.com/project/titusfortner/webdrivers/branch/master)
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
-
17
- ## Usage
18
-
19
- In your Gemfile:
20
-
21
- `gem 'webdrivers', '~> 3.0'`
22
-
23
- In your project:
24
-
25
- ```ruby
26
- require 'webdrivers'
27
- ```
28
-
29
- The drivers will now be automatically downloaded or updated when you launch a browser
30
- through Selenium.
31
-
32
- ### Specific Drivers
33
-
34
- If you want webdrivers to only manage specific drivers you can specify as follows:
35
- ```ruby
36
- require 'webdrivers/chromedriver'
37
- require 'webdrivers/iedriver'
38
- ```
39
-
40
- ### Download Location
41
-
42
- The default download location is `~/.webdrivers` directory, and this is configurable:
43
-
44
- ```ruby
45
- Webdrivers.install_dir = '/webdrivers/install/dir'
46
- ```
47
-
48
- ### Version Pinning
49
-
50
- If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise,
51
- the latest (stable) driver will be downloaded and passed to Selenium.
52
-
53
- ```ruby
54
- # Chrome
55
- Webdrivers::Chromedriver.required_version = '2.46'
56
-
57
- # Firefox
58
- Webdrivers::Geckodriver.required_version = '0.23.0'
59
-
60
- # Microsoft Internet Explorer
61
- Webdrivers::IEdriver.required_version = '3.14.0'
62
-
63
- # Microsoft Edge
64
- Webdrivers::MSWebdriver.required_version = '17134'
65
- ```
66
-
67
- You can explicitly trigger the update in your code, but this will happen automatically when the driver is initialized:
68
-
69
- ```ruby
70
- Webdrivers::Chromedriver.update
71
- ```
72
-
73
- ### Caching Drivers
74
-
75
- You can set Webdrivers to only look for updates if the previous check was longer ago than a specified number of seconds.
76
- ```ruby
77
- Webdrivers.cache_time = 86_400
78
- ```
79
-
80
- The default in 3.9 is zero, and the default for 4.x will be 24 hours (86,400 seconds)
81
-
82
- ### Proxy
83
-
84
- If there is a proxy between you and the Internet then you will need to configure
85
- the gem to use the proxy. You can do this by calling the `configure` method.
86
-
87
- ````ruby
88
- Webdrivers.configure do |config|
89
- config.proxy_addr = 'myproxy_address.com'
90
- config.proxy_port = '8080'
91
- config.proxy_user = 'username'
92
- config.proxy_pass = 'password'
93
- end
94
- ````
95
-
96
- ### `SSL_connect` errors
97
-
98
- If you are getting an error like this (especially common on Windows):
99
-
100
- `SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`
101
-
102
- Add the following to your Gemfile:
103
-
104
- ```ruby
105
- gem "net_http_ssl_fix"
106
- ```
107
-
108
- Add the following to your code:
109
-
110
- ````ruby
111
- require 'net_http_ssl_fix'
112
- ````
113
-
114
- Other solutions are documented on the RubyGems [website](https://guides.rubygems.org/ssl-certificate-update/).
115
-
116
- ### Logging
117
-
118
- The logging level can be configured for debugging purpose:
119
-
120
- ```ruby
121
- Webdrivers.logger.level = :DEBUG
122
- ```
123
-
124
- ### Browser Specific Notes
125
-
126
- #### Chrome/Chromium
127
-
128
- The version of `chromedriver` will depend on the version of Chrome you are using it with:
129
-
130
- * For versions >= 70, the downloaded version of `chromedriver` will match the installed version of Google Chrome.
131
- More information [here](http://chromedriver.chromium.org/downloads/version-selection).
132
- * For versions <= 69, `chromedriver` version 2.46 will be downloaded.
133
- * For beta versions, you'll have to set the desired beta version of `chromedriver`
134
- using `Webdrivers::Chromedriver.required_version`.
135
-
136
- The gem, by default, looks for the Google Chrome version. You can override this by providing a path to the
137
- Chromium binary:
138
-
139
- ```ruby
140
- Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'
141
- ```
142
-
143
- This is also required if Google Chrome is not installed in its
144
- [default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).
145
-
146
- #### Microsoft Edge
147
-
148
- Microsoft Edge support has been removed for now, as it is currently unreliable.
149
-
150
- To use Microsoft Edge, please visit the
151
- [Downloads and Installation page](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads)
152
-
153
- ## Wiki
154
-
155
- Please see the [wiki](https://github.com/titusfortner/webdrivers/wiki) for solutions to commonly reported issues.
156
-
157
- ## License
158
-
159
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),
160
- see LICENSE.txt for full details and copyright.
161
-
162
- ## Contributing
163
-
164
- 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.
165
-
166
- ## Copyright
167
-
168
- Copyright (c) 2017-2019 Titus Fortner
169
- See LICENSE for details
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/ejh90xqbvkphq4cy/branch/master?svg=true)](https://ci.appveyor.com/project/titusfortner/webdrivers/branch/master)
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
+
17
+ ## Usage
18
+
19
+ In your Gemfile:
20
+
21
+ `gem 'webdrivers', '~> 3.0'`
22
+
23
+ In your project:
24
+
25
+ ```ruby
26
+ require 'webdrivers'
27
+ ```
28
+
29
+ The drivers will now be automatically downloaded or updated when you launch a browser
30
+ through Selenium.
31
+
32
+ ### Specific Drivers
33
+
34
+ If you want webdrivers to only manage specific drivers you can specify as follows:
35
+ ```ruby
36
+ require 'webdrivers/chromedriver'
37
+ require 'webdrivers/iedriver'
38
+ ```
39
+
40
+ ### Download Location
41
+
42
+ The default download location is `~/.webdrivers` directory, and this is configurable:
43
+
44
+ ```ruby
45
+ Webdrivers.install_dir = '/webdrivers/install/dir'
46
+ ```
47
+
48
+ ### Version Pinning
49
+
50
+ If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise,
51
+ the latest (stable) driver will be downloaded and passed to Selenium.
52
+
53
+ ```ruby
54
+ # Chrome
55
+ Webdrivers::Chromedriver.required_version = '2.46'
56
+
57
+ # Firefox
58
+ Webdrivers::Geckodriver.required_version = '0.23.0'
59
+
60
+ # Microsoft Internet Explorer
61
+ Webdrivers::IEdriver.required_version = '3.14.0'
62
+
63
+ # Microsoft Edge
64
+ Webdrivers::MSWebdriver.required_version = '17134'
65
+ ```
66
+
67
+ You can explicitly trigger the update in your code, but this will happen automatically when the driver is initialized:
68
+
69
+ ```ruby
70
+ Webdrivers::Chromedriver.update
71
+ ```
72
+
73
+ ### Caching Drivers
74
+
75
+ You can set Webdrivers to only look for updates if the previous check was longer ago than a specified number of seconds.
76
+ ```ruby
77
+ Webdrivers.cache_time = 86_400
78
+ ```
79
+
80
+ The default in 3.9 is zero, and the default for 4.x will be 24 hours (86,400 seconds)
81
+
82
+ ### Proxy
83
+
84
+ If there is a proxy between you and the Internet then you will need to configure
85
+ the gem to use the proxy. You can do this by calling the `configure` method.
86
+
87
+ ````ruby
88
+ Webdrivers.configure do |config|
89
+ config.proxy_addr = 'myproxy_address.com'
90
+ config.proxy_port = '8080'
91
+ config.proxy_user = 'username'
92
+ config.proxy_pass = 'password'
93
+ end
94
+ ````
95
+
96
+ ### `SSL_connect` errors
97
+
98
+ If you are getting an error like this (especially common on Windows):
99
+
100
+ `SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`
101
+
102
+ Add the following to your Gemfile:
103
+
104
+ ```ruby
105
+ gem "net_http_ssl_fix"
106
+ ```
107
+
108
+ Add the following to your code:
109
+
110
+ ````ruby
111
+ require 'net_http_ssl_fix'
112
+ ````
113
+
114
+ Other solutions are documented on the RubyGems [website](https://guides.rubygems.org/ssl-certificate-update/).
115
+
116
+ ### Logging
117
+
118
+ The logging level can be configured for debugging purpose:
119
+
120
+ ```ruby
121
+ Webdrivers.logger.level = :DEBUG
122
+ ```
123
+
124
+ ### Browser Specific Notes
125
+
126
+ #### Chrome/Chromium
127
+
128
+ The version of `chromedriver` will depend on the version of Chrome you are using it with:
129
+
130
+ * For versions >= 70, the downloaded version of `chromedriver` will match the installed version of Google Chrome.
131
+ More information [here](http://chromedriver.chromium.org/downloads/version-selection).
132
+ * For versions <= 69, `chromedriver` version 2.46 will be downloaded.
133
+ * For beta versions, you'll have to set the desired beta version of `chromedriver`
134
+ using `Webdrivers::Chromedriver.required_version`.
135
+
136
+ The gem, by default, looks for the Google Chrome version. You can override this by providing a path to the
137
+ Chromium binary:
138
+
139
+ ```ruby
140
+ Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'
141
+ ```
142
+
143
+ This is also required if Google Chrome is not installed in its
144
+ [default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).
145
+
146
+ #### Microsoft Edge
147
+
148
+ Microsoft Edge support has been removed for now, as it is currently unreliable.
149
+
150
+ To use Microsoft Edge, please visit the
151
+ [Downloads and Installation page](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads)
152
+
153
+ ## Wiki
154
+
155
+ Please see the [wiki](https://github.com/titusfortner/webdrivers/wiki) for solutions to commonly reported issues.
156
+
157
+ ## License
158
+
159
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),
160
+ see LICENSE.txt for full details and copyright.
161
+
162
+ ## Contributing
163
+
164
+ 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.
165
+
166
+ ## Copyright
167
+
168
+ Copyright (c) 2017-2019 Titus Fortner
169
+ See LICENSE for details
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
- require 'rubocop/rake_task'
6
-
7
- RuboCop::RakeTask.new
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- task default: %i[rubocop spec]
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'rubocop/rake_task'
6
+
7
+ RuboCop::RakeTask.new
8
+
9
+ RSpec::Core::RakeTask.new(:spec)
10
+
11
+ task default: %i[rubocop spec]
data/appveyor.yml CHANGED
@@ -1,23 +1,23 @@
1
- build: off
2
- cache:
3
- - vendor/bundle
4
- environment:
5
- matrix:
6
- - RUBY_VERSION: 24
7
- RAKE_TASK: spec
8
- - RUBY_VERSION: 24
9
- RAKE_TASK: rubocop
10
- - RUBY_VERSION: 25
11
- RAKE_TASK: spec
12
- - RUBY_VERSION: 26
13
- RAKE_TASK: spec
14
- install:
15
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
16
- - bundle config --local path vendor/bundle
17
- - bundle install
18
- before_test:
19
- - ruby -v
20
- - gem -v
21
- - bundle -v
22
- test_script:
1
+ build: off
2
+ cache:
3
+ - vendor/bundle
4
+ environment:
5
+ matrix:
6
+ - RUBY_VERSION: 24
7
+ RAKE_TASK: spec
8
+ - RUBY_VERSION: 24
9
+ RAKE_TASK: rubocop
10
+ - RUBY_VERSION: 25
11
+ RAKE_TASK: spec
12
+ - RUBY_VERSION: 26
13
+ RAKE_TASK: spec
14
+ install:
15
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
16
+ - bundle config --local path vendor/bundle
17
+ - bundle install
18
+ before_test:
19
+ - ruby -v
20
+ - gem -v
21
+ - bundle -v
22
+ test_script:
23
23
  - bundle exec rake %RAKE_TASK%