webdrivers 3.9.1 → 3.9.2
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 +13 -13
- data/.gitignore +7 -7
- data/.rubocop.yml +44 -44
- data/.travis.yml +24 -24
- data/CHANGELOG.md +137 -133
- data/Gemfile +6 -6
- data/LICENSE.txt +22 -22
- data/README.md +169 -169
- data/Rakefile +11 -11
- data/appveyor.yml +22 -22
- data/lib/webdrivers.rb +6 -6
- data/lib/webdrivers/chromedriver.rb +185 -167
- data/lib/webdrivers/common.rb +191 -157
- data/lib/webdrivers/geckodriver.rb +80 -72
- data/lib/webdrivers/iedriver.rb +70 -62
- data/lib/webdrivers/logger.rb +111 -111
- data/lib/webdrivers/mswebdriver.rb +55 -55
- data/lib/webdrivers/network.rb +61 -58
- data/lib/webdrivers/system.rb +154 -151
- data/spec/spec_helper.rb +18 -18
- data/spec/webdrivers/chromedriver_spec.rb +257 -243
- data/spec/webdrivers/geckodriver_spec.rb +210 -210
- data/spec/webdrivers/i_edriver_spec.rb +192 -192
- data/spec/webdrivers/ms_webdriver_spec.rb +30 -30
- data/spec/webdrivers_proxy_support_spec.rb +53 -53
- data/webdrivers.gemspec +31 -31
- metadata +4 -11
@@ -1,30 +1,30 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe Webdrivers::MSWebdriver do
|
6
|
-
let(:mswebdriver) { described_class }
|
7
|
-
|
8
|
-
it 'gives deprecation for using it' do
|
9
|
-
msg = /WARN Webdrivers Microsoft WebDriver for the Edge browser is no longer supported by Webdrivers gem/
|
10
|
-
|
11
|
-
if defined?(Selenium::WebDriver::VERSION) && Selenium::WebDriver::VERSION > '3.141.0'
|
12
|
-
expect { Selenium::WebDriver::Edge::Service.driver_path }.to output(msg).to_stdout_from_any_process
|
13
|
-
else
|
14
|
-
expect { Selenium::WebDriver::Edge.driver_path }.to output(msg).to_stdout_from_any_process
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'does not give deprecation when set to ignore' do
|
19
|
-
described_class.ignore = true
|
20
|
-
|
21
|
-
service = instance_double(Selenium::WebDriver::Service, host: '', start: nil, uri: '')
|
22
|
-
bridge = instance_double(Selenium::WebDriver::Remote::Bridge, create_session: nil, session_id: '')
|
23
|
-
|
24
|
-
allow(Selenium::WebDriver::Service).to receive(:new).and_return(service)
|
25
|
-
allow(Selenium::WebDriver::Remote::Bridge).to receive(:new).and_return(bridge)
|
26
|
-
allow(Selenium::WebDriver::Remote::W3C::Bridge).to receive(:new)
|
27
|
-
|
28
|
-
expect { Selenium::WebDriver.for :edge }.not_to output.to_stdout_from_any_process
|
29
|
-
end
|
30
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Webdrivers::MSWebdriver do
|
6
|
+
let(:mswebdriver) { described_class }
|
7
|
+
|
8
|
+
it 'gives deprecation for using it' do
|
9
|
+
msg = /WARN Webdrivers Microsoft WebDriver for the Edge browser is no longer supported by Webdrivers gem/
|
10
|
+
|
11
|
+
if defined?(Selenium::WebDriver::VERSION) && Selenium::WebDriver::VERSION > '3.141.0'
|
12
|
+
expect { Selenium::WebDriver::Edge::Service.driver_path }.to output(msg).to_stdout_from_any_process
|
13
|
+
else
|
14
|
+
expect { Selenium::WebDriver::Edge.driver_path }.to output(msg).to_stdout_from_any_process
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'does not give deprecation when set to ignore' do
|
19
|
+
described_class.ignore = true
|
20
|
+
|
21
|
+
service = instance_double(Selenium::WebDriver::Service, host: '', start: nil, uri: '')
|
22
|
+
bridge = instance_double(Selenium::WebDriver::Remote::Bridge, create_session: nil, session_id: '')
|
23
|
+
|
24
|
+
allow(Selenium::WebDriver::Service).to receive(:new).and_return(service)
|
25
|
+
allow(Selenium::WebDriver::Remote::Bridge).to receive(:new).and_return(bridge)
|
26
|
+
allow(Selenium::WebDriver::Remote::W3C::Bridge).to receive(:new)
|
27
|
+
|
28
|
+
expect { Selenium::WebDriver.for :edge }.not_to output.to_stdout_from_any_process
|
29
|
+
end
|
30
|
+
end
|
@@ -1,53 +1,53 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
class FakeDriver < Webdrivers::Common
|
6
|
-
def self.http_object
|
7
|
-
Webdrivers::Network.http
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
describe Webdrivers do
|
12
|
-
let(:http_object) { FakeDriver.http_object }
|
13
|
-
|
14
|
-
before do
|
15
|
-
described_class.proxy_addr = nil
|
16
|
-
described_class.proxy_port = nil
|
17
|
-
described_class.proxy_user = nil
|
18
|
-
described_class.proxy_pass = nil
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'allows the proxy values to be set via configuration' do
|
22
|
-
described_class.configure do |config|
|
23
|
-
config.proxy_addr = 'proxy_addr'
|
24
|
-
config.proxy_port = '8888'
|
25
|
-
config.proxy_user = 'proxy_user'
|
26
|
-
config.proxy_pass = 'proxy_pass'
|
27
|
-
end
|
28
|
-
|
29
|
-
expect(described_class.proxy_addr).to eql 'proxy_addr'
|
30
|
-
expect(described_class.proxy_port).to eql '8888'
|
31
|
-
expect(described_class.proxy_user).to eql 'proxy_user'
|
32
|
-
expect(described_class.proxy_pass).to eql 'proxy_pass'
|
33
|
-
end
|
34
|
-
|
35
|
-
it 'uses the Proxy when the proxy_addr is set' do
|
36
|
-
described_class.configure do |config|
|
37
|
-
config.proxy_addr = 'proxy_addr'
|
38
|
-
config.proxy_port = '8080'
|
39
|
-
end
|
40
|
-
|
41
|
-
expect(http_object.instance_variable_get('@is_proxy_class')).to be true
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'does not use the Proxy when proxy is not configured' do
|
45
|
-
expect(http_object.instance_variable_get('@is_proxy_class')).to be false
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'raises an exception when net_http_ssl_fix is called.' do
|
49
|
-
err = 'Webdrivers.net_http_ssl_fix is no longer available.' \
|
50
|
-
' Please see https://github.com/titusfortner/webdrivers#ssl_connect-errors.'
|
51
|
-
expect { described_class.net_http_ssl_fix }.to raise_error(RuntimeError, err)
|
52
|
-
end
|
53
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
class FakeDriver < Webdrivers::Common
|
6
|
+
def self.http_object
|
7
|
+
Webdrivers::Network.http
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe Webdrivers do
|
12
|
+
let(:http_object) { FakeDriver.http_object }
|
13
|
+
|
14
|
+
before do
|
15
|
+
described_class.proxy_addr = nil
|
16
|
+
described_class.proxy_port = nil
|
17
|
+
described_class.proxy_user = nil
|
18
|
+
described_class.proxy_pass = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'allows the proxy values to be set via configuration' do
|
22
|
+
described_class.configure do |config|
|
23
|
+
config.proxy_addr = 'proxy_addr'
|
24
|
+
config.proxy_port = '8888'
|
25
|
+
config.proxy_user = 'proxy_user'
|
26
|
+
config.proxy_pass = 'proxy_pass'
|
27
|
+
end
|
28
|
+
|
29
|
+
expect(described_class.proxy_addr).to eql 'proxy_addr'
|
30
|
+
expect(described_class.proxy_port).to eql '8888'
|
31
|
+
expect(described_class.proxy_user).to eql 'proxy_user'
|
32
|
+
expect(described_class.proxy_pass).to eql 'proxy_pass'
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'uses the Proxy when the proxy_addr is set' do
|
36
|
+
described_class.configure do |config|
|
37
|
+
config.proxy_addr = 'proxy_addr'
|
38
|
+
config.proxy_port = '8080'
|
39
|
+
end
|
40
|
+
|
41
|
+
expect(http_object.instance_variable_get('@is_proxy_class')).to be true
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'does not use the Proxy when proxy is not configured' do
|
45
|
+
expect(http_object.instance_variable_get('@is_proxy_class')).to be false
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'raises an exception when net_http_ssl_fix is called.' do
|
49
|
+
err = 'Webdrivers.net_http_ssl_fix is no longer available.' \
|
50
|
+
' Please see https://github.com/titusfortner/webdrivers#ssl_connect-errors.'
|
51
|
+
expect { described_class.net_http_ssl_fix }.to raise_error(RuntimeError, err)
|
52
|
+
end
|
53
|
+
end
|
data/webdrivers.gemspec
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('../lib', __dir__)
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = 'webdrivers'
|
7
|
-
s.version = '3.9.
|
8
|
-
s.authors = ['Titus Fortner', 'Lakshya Kapoor']
|
9
|
-
s.email = %w[titusfortner@gmail.com kapoorlakshya@gmail.com]
|
10
|
-
s.homepage = 'https://github.com/titusfortner/webdrivers'
|
11
|
-
s.summary = 'Easy download and use of browser drivers.'
|
12
|
-
s.description = 'Run Selenium tests more easily with install and updates for all supported webdrivers.'
|
13
|
-
s.licenses = ['MIT']
|
14
|
-
|
15
|
-
s.files = `git ls-files`.split("\n")
|
16
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
|
-
s.require_paths = ['lib']
|
19
|
-
|
20
|
-
s.add_development_dependency 'ffi', '~> 1.0' # For selenium-webdriver on Windows
|
21
|
-
s.add_development_dependency 'rake', '~> 12.0'
|
22
|
-
s.add_development_dependency 'rspec', '~> 3.0'
|
23
|
-
s.add_development_dependency 'rubocop', '~>0.66'
|
24
|
-
s.add_development_dependency 'rubocop-performance'
|
25
|
-
s.add_development_dependency 'rubocop-rspec', '~>1.32'
|
26
|
-
s.add_development_dependency 'simplecov', '~>0.16'
|
27
|
-
|
28
|
-
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
29
|
-
s.add_runtime_dependency 'rubyzip', '~> 1.0'
|
30
|
-
s.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
|
31
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('../lib', __dir__)
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'webdrivers'
|
7
|
+
s.version = '3.9.2'
|
8
|
+
s.authors = ['Titus Fortner', 'Lakshya Kapoor']
|
9
|
+
s.email = %w[titusfortner@gmail.com kapoorlakshya@gmail.com]
|
10
|
+
s.homepage = 'https://github.com/titusfortner/webdrivers'
|
11
|
+
s.summary = 'Easy download and use of browser drivers.'
|
12
|
+
s.description = 'Run Selenium tests more easily with install and updates for all supported webdrivers.'
|
13
|
+
s.licenses = ['MIT']
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
|
+
s.require_paths = ['lib']
|
19
|
+
|
20
|
+
s.add_development_dependency 'ffi', '~> 1.0' # For selenium-webdriver on Windows
|
21
|
+
s.add_development_dependency 'rake', '~> 12.0'
|
22
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
23
|
+
s.add_development_dependency 'rubocop', '~>0.66'
|
24
|
+
s.add_development_dependency 'rubocop-performance'
|
25
|
+
s.add_development_dependency 'rubocop-rspec', '~>1.32'
|
26
|
+
s.add_development_dependency 'simplecov', '~>0.16'
|
27
|
+
|
28
|
+
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
29
|
+
s.add_runtime_dependency 'rubyzip', '~> 1.0'
|
30
|
+
s.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
|
31
|
+
end
|
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.9.
|
4
|
+
version: 3.9.2
|
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-05-
|
12
|
+
date: 2019-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -205,15 +205,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
|
-
|
209
|
-
rubygems_version: 2.6.14.4
|
208
|
+
rubygems_version: 3.0.2
|
210
209
|
signing_key:
|
211
210
|
specification_version: 4
|
212
211
|
summary: Easy download and use of browser drivers.
|
213
|
-
test_files:
|
214
|
-
- spec/spec_helper.rb
|
215
|
-
- spec/webdrivers/chromedriver_spec.rb
|
216
|
-
- spec/webdrivers/geckodriver_spec.rb
|
217
|
-
- spec/webdrivers/i_edriver_spec.rb
|
218
|
-
- spec/webdrivers/ms_webdriver_spec.rb
|
219
|
-
- spec/webdrivers_proxy_support_spec.rb
|
212
|
+
test_files: []
|