watir 6.18.0 → 6.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/unit.yml +7 -1
- data/CHANGES.md +17 -0
- data/README.md +5 -5
- data/lib/watir.rb +2 -0
- data/lib/watir/capabilities.rb +245 -100
- data/lib/watir/http_client.rb +17 -0
- data/lib/watir/version.rb +1 -1
- data/lib/watir/window_collection.rb +19 -10
- data/lib/watirspec/runner.rb +1 -1
- data/spec/unit/capabilities_spec.rb +1234 -18
- data/spec/watirspec/support/rspec_matchers.rb +16 -1
- data/spec/watirspec/window_switching_spec.rb +6 -0
- data/spec/watirspec_helper.rb +3 -3
- data/watir.gemspec +1 -1
- metadata +8 -7
@@ -1,5 +1,18 @@
|
|
1
1
|
if defined?(RSpec)
|
2
2
|
DEPRECATION_WARNINGS = %i[selector_parameters
|
3
|
+
options_capabilities
|
4
|
+
firefox_profile
|
5
|
+
remote_keyword
|
6
|
+
desired_capabilities
|
7
|
+
port_keyword
|
8
|
+
switches_keyword
|
9
|
+
args_keyword
|
10
|
+
url_service
|
11
|
+
driver_opts_keyword
|
12
|
+
http_open_timeout
|
13
|
+
http_read_timeout
|
14
|
+
http_client_timeout
|
15
|
+
unknown_keyword
|
3
16
|
element_cache
|
4
17
|
ready_state
|
5
18
|
caption
|
@@ -22,7 +35,9 @@ if defined?(RSpec)
|
|
22
35
|
DEPRECATION_WARNINGS.each do |deprecation|
|
23
36
|
RSpec::Matchers.define "have_deprecated_#{deprecation}" do
|
24
37
|
match do |actual|
|
25
|
-
|
38
|
+
return actual.call if ENV['IGNORE_DEPRECATIONS']
|
39
|
+
|
40
|
+
warning = /\[DEPRECATION\] \["#{deprecation}"/
|
26
41
|
expect {
|
27
42
|
actual.call
|
28
43
|
@stdout_message = File.read $stdout if $stdout.is_a?(File)
|
@@ -527,6 +527,12 @@ describe Watir::WindowCollection do
|
|
527
527
|
browser.windows.reject(&:current?).each(&:close)
|
528
528
|
end
|
529
529
|
|
530
|
+
it '#to_a' do
|
531
|
+
expect {
|
532
|
+
Watir::WindowCollection.new(browser).to_a
|
533
|
+
}.to have_deprecated_window_index
|
534
|
+
end
|
535
|
+
|
530
536
|
describe '#new' do
|
531
537
|
it 'returns all windows by default' do
|
532
538
|
windows = Watir::WindowCollection.new(browser)
|
data/spec/watirspec_helper.rb
CHANGED
@@ -85,6 +85,7 @@ class LocalConfig
|
|
85
85
|
matching_guards << [browser, Selenium::WebDriver::Platform.os]
|
86
86
|
matching_guards << :relaxed_locate if Watir.relaxed_locate?
|
87
87
|
matching_guards << :headless if @imp.browser_args.last[:headless]
|
88
|
+
matching_guards << "v#{Watir::VERSION.tr('.', '_')[/.*(?=_)/]}".to_sym
|
88
89
|
matching_guards << :w3c if ENV['W3C']
|
89
90
|
|
90
91
|
if !Selenium::WebDriver::Platform.linux? || ENV['DESKTOP_SESSION']
|
@@ -103,10 +104,9 @@ class LocalConfig
|
|
103
104
|
end
|
104
105
|
|
105
106
|
def chrome_args
|
106
|
-
opts = {args: ['--disable-translate']}
|
107
|
+
opts = {options: {args: ['--disable-translate']}}
|
107
108
|
opts[:headless] = true if ENV['HEADLESS'] == 'true'
|
108
|
-
opts[:options] =
|
109
|
-
opts[:options] = {options: {w3c: true}} if ENV['W3C'] == 'true'
|
109
|
+
opts[:options][:binary] = ENV['CHROME_BINARY'] if ENV['CHROME_BINARY']
|
110
110
|
opts
|
111
111
|
end
|
112
112
|
|
data/watir.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
26
26
|
s.require_paths = ['lib']
|
27
27
|
|
28
|
-
s.add_dependency 'selenium-webdriver', '
|
28
|
+
s.add_dependency 'selenium-webdriver', '= 3.142.7'
|
29
29
|
s.add_runtime_dependency 'regexp_parser', '>= 1.2', '< 3'
|
30
30
|
|
31
31
|
s.add_development_dependency 'activesupport', '~> 4.0', '>= 4.1.11' # for pluralization during code generation
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: selenium-webdriver
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.142.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
28
|
+
version: 3.142.7
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: regexp_parser
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -362,6 +362,7 @@ files:
|
|
362
362
|
- lib/watir/generator/svg/spec_extractor.rb
|
363
363
|
- lib/watir/generator/svg/visitor.rb
|
364
364
|
- lib/watir/has_window.rb
|
365
|
+
- lib/watir/http_client.rb
|
365
366
|
- lib/watir/js_execution.rb
|
366
367
|
- lib/watir/js_snippets.rb
|
367
368
|
- lib/watir/js_snippets/attributeValues.js
|
@@ -631,7 +632,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
631
632
|
- !ruby/object:Gem::Version
|
632
633
|
version: '0'
|
633
634
|
requirements: []
|
634
|
-
rubygems_version: 3.
|
635
|
+
rubygems_version: 3.1.4
|
635
636
|
signing_key:
|
636
637
|
specification_version: 4
|
637
638
|
summary: Watir powered by Selenium
|