watir 6.16.5 → 6.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +32 -107
- data/.travis.yml +24 -21
- data/CHANGES.md +16 -0
- data/Gemfile +3 -1
- data/Rakefile +3 -3
- data/appveyor.yml +2 -1
- data/lib/watir-webdriver.rb +1 -1
- data/lib/watir.rb +0 -1
- data/lib/watir/adjacent.rb +8 -10
- data/lib/watir/after_hooks.rb +4 -4
- data/lib/watir/browser.rb +5 -1
- data/lib/watir/capabilities.rb +9 -6
- data/lib/watir/cookies.rb +1 -1
- data/lib/watir/elements/element.rb +59 -46
- data/lib/watir/elements/file_field.rb +1 -0
- data/lib/watir/elements/iframe.rb +2 -2
- data/lib/watir/elements/link.rb +0 -9
- data/lib/watir/elements/radio.rb +1 -1
- data/lib/watir/elements/select.rb +2 -2
- data/lib/watir/generator/base/spec_extractor.rb +4 -4
- data/lib/watir/js_execution.rb +1 -1
- data/lib/watir/legacy_wait.rb +1 -1
- data/lib/watir/locators/element/selector_builder.rb +11 -12
- data/lib/watir/locators/element/selector_builder/xpath.rb +40 -13
- data/lib/watir/locators/text_field/selector_builder/xpath.rb +3 -1
- data/lib/watir/logger.rb +5 -2
- data/lib/watir/version.rb +1 -1
- data/lib/watir/window.rb +1 -1
- data/lib/watirspec.rb +1 -1
- data/lib/watirspec/guards.rb +1 -1
- data/lib/watirspec/rake_tasks.rb +2 -0
- data/lib/watirspec/runner.rb +4 -0
- data/spec/unit/container_spec.rb +1 -1
- data/spec/unit/logger_spec.rb +5 -7
- data/spec/unit/selector_builder/button_spec.rb +16 -15
- data/spec/unit/selector_builder/element_spec.rb +58 -9
- data/spec/unit/selector_builder/text_field_spec.rb +14 -14
- data/spec/watirspec/after_hooks_spec.rb +64 -78
- data/spec/watirspec/alert_spec.rb +69 -79
- data/spec/watirspec/browser_spec.rb +48 -46
- data/spec/watirspec/cookies_spec.rb +52 -37
- data/spec/watirspec/drag_and_drop_spec.rb +14 -38
- data/spec/watirspec/elements/button_spec.rb +2 -0
- data/spec/watirspec/elements/buttons_spec.rb +1 -1
- data/spec/watirspec/elements/checkbox_spec.rb +8 -4
- data/spec/watirspec/elements/date_field_spec.rb +18 -9
- data/spec/watirspec/elements/date_time_field_spec.rb +3 -4
- data/spec/watirspec/elements/div_spec.rb +62 -54
- data/spec/watirspec/elements/element_spec.rb +60 -78
- data/spec/watirspec/elements/elements_spec.rb +12 -3
- data/spec/watirspec/elements/filefield_spec.rb +25 -50
- data/spec/watirspec/elements/form_spec.rb +6 -8
- data/spec/watirspec/elements/frame_spec.rb +10 -13
- data/spec/watirspec/elements/iframe_spec.rb +17 -12
- data/spec/watirspec/elements/iframes_spec.rb +2 -2
- data/spec/watirspec/elements/link_spec.rb +18 -9
- data/spec/watirspec/elements/links_spec.rb +11 -3
- data/spec/watirspec/elements/option_spec.rb +15 -17
- data/spec/watirspec/elements/select_list_spec.rb +66 -80
- data/spec/watirspec/elements/text_field_spec.rb +8 -4
- data/spec/watirspec/elements/tr_spec.rb +0 -9
- data/spec/watirspec/html/forms_with_input_elements.html +1 -0
- data/spec/watirspec/html/iframes.html +3 -0
- data/spec/watirspec/html/non_control_elements.html +4 -4
- data/spec/watirspec/html/right_click.html +12 -0
- data/spec/watirspec/html/wait.html +1 -1
- data/spec/watirspec/relaxed_locate_spec.rb +16 -20
- data/spec/watirspec/support/rspec_matchers.rb +7 -6
- data/spec/watirspec/user_editable_spec.rb +1 -1
- data/spec/watirspec/wait_spec.rb +13 -17
- data/spec/watirspec/window_switching_spec.rb +162 -163
- data/spec/watirspec_helper.rb +7 -5
- data/watir.gemspec +4 -5
- metadata +14 -16
- data/lib/watir/elements/area.rb +0 -10
data/spec/watirspec_helper.rb
CHANGED
@@ -29,11 +29,9 @@ class LocalConfig
|
|
29
29
|
def load_webdrivers
|
30
30
|
case browser
|
31
31
|
when :chrome
|
32
|
-
Webdrivers::Chromedriver.version = 2.44 if ENV['APPVEYOR']
|
33
32
|
Webdrivers::Chromedriver.update
|
34
33
|
Watir.logger.info "chromedriver version: #{Webdrivers::Chromedriver.current_version.version}"
|
35
34
|
when :firefox
|
36
|
-
Webdrivers::Geckodriver.version = '0.20.1' if ENV['APPVEYOR']
|
37
35
|
Webdrivers::Geckodriver.update
|
38
36
|
Watir.logger.info "geckodriver version: #{Webdrivers::Geckodriver.current_version.version}"
|
39
37
|
end
|
@@ -86,6 +84,8 @@ class LocalConfig
|
|
86
84
|
matching_guards << [browser, Selenium::WebDriver::Platform.os]
|
87
85
|
matching_guards << :relaxed_locate if Watir.relaxed_locate?
|
88
86
|
matching_guards << :headless if @imp.browser_args.last[:headless]
|
87
|
+
matching_guards << :w3c if ENV['W3C']
|
88
|
+
|
89
89
|
# TODO: Replace this with Selenium::WebDriver::Platform.ci after next Selenium Release
|
90
90
|
if ENV['APPVEYOR']
|
91
91
|
matching_guards << :appveyor
|
@@ -110,12 +110,14 @@ class LocalConfig
|
|
110
110
|
def chrome_args
|
111
111
|
opts = {args: ['--disable-translate']}
|
112
112
|
opts[:headless] = true if ENV['HEADLESS'] == 'true'
|
113
|
-
opts[:options] = {binary: ENV['CHROME_BINARY']} if ENV['CHROME_BINARY']
|
113
|
+
opts[:options] = {binary: ENV['CHROME_BINARY']} if ENV['CHROME_BINARY'] == 'true'
|
114
|
+
opts[:options] = {options: {w3c: true}} if ENV['W3C'] == 'true'
|
114
115
|
opts
|
115
116
|
end
|
116
117
|
|
117
118
|
class SelectorListener < Selenium::WebDriver::Support::AbstractEventListener
|
118
119
|
def initialize
|
120
|
+
super
|
119
121
|
@counts = Hash.new(0)
|
120
122
|
end
|
121
123
|
|
@@ -141,8 +143,8 @@ class RemoteConfig < LocalConfig
|
|
141
143
|
require 'watirspec/remote_server'
|
142
144
|
|
143
145
|
remote_server = WatirSpec::RemoteServer.new
|
144
|
-
args = ["-Dwebdriver.chrome.driver=#{Webdrivers::Chromedriver.
|
145
|
-
"-Dwebdriver.gecko.driver=#{Webdrivers::Geckodriver.
|
146
|
+
args = ["-Dwebdriver.chrome.driver=#{Webdrivers::Chromedriver.driver_path}",
|
147
|
+
"-Dwebdriver.gecko.driver=#{Webdrivers::Geckodriver.driver_path}"]
|
146
148
|
remote_server.start(4444, args: args)
|
147
149
|
remote_server.server.webdriver_url
|
148
150
|
end
|
data/watir.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'watir/version'
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'watir'
|
8
8
|
s.version = Watir::VERSION
|
9
|
-
s.required_ruby_version = '>= 2.
|
9
|
+
s.required_ruby_version = '>= 2.5.0'
|
10
10
|
|
11
11
|
s.platform = Gem::Platform::RUBY
|
12
12
|
s.authors = ['Alex Rodionov', 'Titus Fortner', 'Justin Ko']
|
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
DESCRIPTION_MESSAGE
|
20
20
|
|
21
21
|
s.license = 'MIT'
|
22
|
-
s.rubyforge_project = 'watir'
|
23
22
|
|
24
23
|
s.files = `git ls-files`.split("\n")
|
25
24
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -34,15 +33,15 @@ Gem::Specification.new do |s|
|
|
34
33
|
s.add_development_dependency 'fuubar'
|
35
34
|
s.add_development_dependency 'nokogiri'
|
36
35
|
s.add_development_dependency 'pry'
|
37
|
-
s.add_development_dependency 'rake', '
|
36
|
+
s.add_development_dependency 'rake', '>= 12.3.3'
|
38
37
|
s.add_development_dependency 'rspec', '~> 3.0'
|
39
38
|
s.add_development_dependency 'rspec-retry'
|
40
39
|
s.add_development_dependency 'rubocop', '~> 0.59'
|
41
40
|
s.add_development_dependency 'selenium_statistics'
|
42
41
|
s.add_development_dependency 'simplecov'
|
43
42
|
s.add_development_dependency 'simplecov-console'
|
44
|
-
s.add_development_dependency 'webdrivers', '~>
|
43
|
+
s.add_development_dependency 'webdrivers', '~> 4.1'
|
45
44
|
s.add_development_dependency 'webidl', '>= 0.2.2'
|
46
45
|
s.add_development_dependency 'yard', '> 0.8.2.1'
|
47
|
-
s.add_development_dependency 'yard-doctest', '
|
46
|
+
s.add_development_dependency 'yard-doctest', '~> 0.1.14'
|
48
47
|
end
|
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.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: selenium-webdriver
|
@@ -120,16 +120,16 @@ dependencies:
|
|
120
120
|
name: rake
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 12.3.3
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 12.3.3
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rspec
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,14 +220,14 @@ dependencies:
|
|
220
220
|
requirements:
|
221
221
|
- - "~>"
|
222
222
|
- !ruby/object:Gem::Version
|
223
|
-
version:
|
223
|
+
version: '4.1'
|
224
224
|
type: :development
|
225
225
|
prerelease: false
|
226
226
|
version_requirements: !ruby/object:Gem::Requirement
|
227
227
|
requirements:
|
228
228
|
- - "~>"
|
229
229
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
230
|
+
version: '4.1'
|
231
231
|
- !ruby/object:Gem::Dependency
|
232
232
|
name: webidl
|
233
233
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,16 +260,16 @@ dependencies:
|
|
260
260
|
name: yard-doctest
|
261
261
|
requirement: !ruby/object:Gem::Requirement
|
262
262
|
requirements:
|
263
|
-
- - "
|
263
|
+
- - "~>"
|
264
264
|
- !ruby/object:Gem::Version
|
265
|
-
version: 0.1.
|
265
|
+
version: 0.1.14
|
266
266
|
type: :development
|
267
267
|
prerelease: false
|
268
268
|
version_requirements: !ruby/object:Gem::Requirement
|
269
269
|
requirements:
|
270
|
-
- - "
|
270
|
+
- - "~>"
|
271
271
|
- !ruby/object:Gem::Version
|
272
|
-
version: 0.1.
|
272
|
+
version: 0.1.14
|
273
273
|
description: |
|
274
274
|
Watir stands for Web Application Testing In Ruby
|
275
275
|
It facilitates the writing of automated tests by mimicing the behavior of a user interacting with a website.
|
@@ -305,7 +305,6 @@ files:
|
|
305
305
|
- lib/watir/container.rb
|
306
306
|
- lib/watir/cookies.rb
|
307
307
|
- lib/watir/element_collection.rb
|
308
|
-
- lib/watir/elements/area.rb
|
309
308
|
- lib/watir/elements/button.rb
|
310
309
|
- lib/watir/elements/cell.rb
|
311
310
|
- lib/watir/elements/checkbox.rb
|
@@ -613,15 +612,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
613
612
|
requirements:
|
614
613
|
- - ">="
|
615
614
|
- !ruby/object:Gem::Version
|
616
|
-
version: 2.
|
615
|
+
version: 2.5.0
|
617
616
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
618
617
|
requirements:
|
619
618
|
- - ">="
|
620
619
|
- !ruby/object:Gem::Version
|
621
620
|
version: '0'
|
622
621
|
requirements: []
|
623
|
-
|
624
|
-
rubygems_version: 2.5.2.3
|
622
|
+
rubygems_version: 3.1.2
|
625
623
|
signing_key:
|
626
624
|
specification_version: 4
|
627
625
|
summary: Watir powered by Selenium
|