watir 7.1.0 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (253) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/chrome.yml +29 -16
  3. data/.github/workflows/edge.yml +19 -11
  4. data/.github/workflows/firefox.yml +28 -16
  5. data/.github/workflows/ie.yml +13 -7
  6. data/.github/workflows/safari.yml +22 -11
  7. data/.github/workflows/unit.yml +31 -23
  8. data/.rubocop.yml +14 -7
  9. data/.rubocop_todo.yml +0 -26
  10. data/CHANGES.md +16 -1
  11. data/Gemfile +6 -1
  12. data/README.md +15 -11
  13. data/Rakefile +9 -7
  14. data/lib/watir/adjacent.rb +3 -1
  15. data/lib/watir/after_hooks.rb +5 -3
  16. data/lib/watir/alert.rb +2 -0
  17. data/lib/watir/aliases.rb +2 -0
  18. data/lib/watir/attribute_helper.rb +4 -2
  19. data/lib/watir/browser.rb +10 -14
  20. data/lib/watir/capabilities.rb +56 -33
  21. data/lib/watir/cell_container.rb +2 -0
  22. data/lib/watir/container.rb +2 -0
  23. data/lib/watir/cookies.rb +5 -5
  24. data/lib/watir/element_collection.rb +3 -1
  25. data/lib/watir/elements/button.rb +2 -0
  26. data/lib/watir/elements/cell.rb +2 -0
  27. data/lib/watir/elements/checkbox.rb +2 -0
  28. data/lib/watir/elements/date_field.rb +2 -0
  29. data/lib/watir/elements/date_time_field.rb +2 -0
  30. data/lib/watir/elements/dlist.rb +3 -1
  31. data/lib/watir/elements/element.rb +29 -105
  32. data/lib/watir/elements/file_field.rb +2 -0
  33. data/lib/watir/elements/font.rb +2 -0
  34. data/lib/watir/elements/form.rb +2 -0
  35. data/lib/watir/elements/hidden.rb +2 -0
  36. data/lib/watir/elements/iframe.rb +2 -0
  37. data/lib/watir/elements/image.rb +2 -0
  38. data/lib/watir/elements/input.rb +2 -0
  39. data/lib/watir/elements/link.rb +2 -0
  40. data/lib/watir/elements/list.rb +2 -0
  41. data/lib/watir/elements/option.rb +2 -0
  42. data/lib/watir/elements/radio.rb +2 -0
  43. data/lib/watir/elements/row.rb +2 -0
  44. data/lib/watir/elements/select.rb +2 -0
  45. data/lib/watir/elements/table.rb +3 -1
  46. data/lib/watir/elements/table_cell.rb +2 -0
  47. data/lib/watir/elements/table_row.rb +2 -0
  48. data/lib/watir/elements/table_section.rb +2 -0
  49. data/lib/watir/elements/text_area.rb +2 -0
  50. data/lib/watir/elements/text_field.rb +2 -0
  51. data/lib/watir/exception.rb +2 -0
  52. data/lib/watir/extensions/nokogiri.rb +2 -0
  53. data/lib/watir/generator/base/generator.rb +2 -0
  54. data/lib/watir/generator/base/idl_sorter.rb +3 -1
  55. data/lib/watir/generator/base/spec_extractor.rb +6 -4
  56. data/lib/watir/generator/base/util.rb +2 -0
  57. data/lib/watir/generator/base/visitor.rb +5 -5
  58. data/lib/watir/generator/base.rb +2 -1
  59. data/lib/watir/generator/html/generator.rb +2 -0
  60. data/lib/watir/generator/html/spec_extractor.rb +2 -0
  61. data/lib/watir/generator/html/visitor.rb +2 -0
  62. data/lib/watir/generator/html.rb +2 -0
  63. data/lib/watir/generator/svg/generator.rb +2 -0
  64. data/lib/watir/generator/svg/spec_extractor.rb +2 -0
  65. data/lib/watir/generator/svg/visitor.rb +2 -0
  66. data/lib/watir/generator/svg.rb +2 -0
  67. data/lib/watir/generator.rb +2 -0
  68. data/lib/watir/has_window.rb +3 -1
  69. data/lib/watir/http_client.rb +2 -0
  70. data/lib/watir/js_execution.rb +2 -0
  71. data/lib/watir/js_snippets.rb +2 -0
  72. data/lib/watir/locators/anchor/selector_builder.rb +2 -0
  73. data/lib/watir/locators/button/matcher.rb +2 -0
  74. data/lib/watir/locators/button/selector_builder/xpath.rb +15 -19
  75. data/lib/watir/locators/button/selector_builder.rb +2 -0
  76. data/lib/watir/locators/cell/selector_builder/xpath.rb +2 -0
  77. data/lib/watir/locators/cell/selector_builder.rb +2 -0
  78. data/lib/watir/locators/element/locator.rb +2 -0
  79. data/lib/watir/locators/element/matcher.rb +2 -0
  80. data/lib/watir/locators/element/selector_builder/regexp_disassembler.rb +2 -0
  81. data/lib/watir/locators/element/selector_builder/xpath.rb +16 -15
  82. data/lib/watir/locators/element/selector_builder/xpath_support.rb +4 -2
  83. data/lib/watir/locators/element/selector_builder.rb +16 -6
  84. data/lib/watir/locators/option/matcher.rb +2 -0
  85. data/lib/watir/locators/option/selector_builder/xpath.rb +2 -0
  86. data/lib/watir/locators/option/selector_builder.rb +2 -0
  87. data/lib/watir/locators/row/selector_builder/xpath.rb +2 -0
  88. data/lib/watir/locators/row/selector_builder.rb +2 -0
  89. data/lib/watir/locators/text_area/selector_builder/xpath.rb +2 -0
  90. data/lib/watir/locators/text_area/selector_builder.rb +2 -0
  91. data/lib/watir/locators/text_field/matcher.rb +2 -0
  92. data/lib/watir/locators/text_field/selector_builder/xpath.rb +2 -0
  93. data/lib/watir/locators/text_field/selector_builder.rb +2 -0
  94. data/lib/watir/locators.rb +2 -0
  95. data/lib/watir/logger.rb +2 -0
  96. data/lib/watir/navigation.rb +3 -1
  97. data/lib/watir/radio_set.rb +2 -0
  98. data/lib/watir/row_container.rb +2 -0
  99. data/lib/watir/screenshot.rb +2 -0
  100. data/lib/watir/scroll.rb +27 -2
  101. data/lib/watir/search_context.rb +96 -0
  102. data/lib/watir/shadow_root.rb +60 -0
  103. data/lib/watir/user_editable.rb +3 -1
  104. data/lib/watir/version.rb +3 -1
  105. data/lib/watir/wait/timer.rb +3 -1
  106. data/lib/watir/wait.rb +5 -5
  107. data/lib/watir/window.rb +7 -3
  108. data/lib/watir/window_collection.rb +4 -1
  109. data/lib/watir.rb +4 -0
  110. data/lib/watirspec/guards.rb +2 -0
  111. data/lib/watirspec/implementation.rb +14 -10
  112. data/lib/watirspec/rake_tasks.rb +4 -4
  113. data/lib/watirspec/remote_server.rb +5 -3
  114. data/lib/watirspec/runner.rb +3 -1
  115. data/lib/watirspec/server/app.rb +2 -0
  116. data/lib/watirspec/server.rb +2 -0
  117. data/lib/watirspec.rb +7 -4
  118. data/spec/locator_spec_helper.rb +2 -0
  119. data/spec/spec_helper.rb +2 -0
  120. data/spec/unit/capabilities_spec.rb +77 -58
  121. data/spec/unit/element_locator_spec.rb +2 -0
  122. data/spec/unit/match_elements/button_spec.rb +2 -0
  123. data/spec/unit/match_elements/element_spec.rb +10 -8
  124. data/spec/unit/match_elements/text_field_spec.rb +2 -0
  125. data/spec/unit/selector_builder/anchor_spec.rb +2 -0
  126. data/spec/unit/selector_builder/button_spec.rb +31 -28
  127. data/spec/unit/selector_builder/cell_spec.rb +3 -1
  128. data/spec/unit/selector_builder/element_spec.rb +61 -60
  129. data/spec/unit/selector_builder/row_spec.rb +21 -10
  130. data/spec/unit/selector_builder/text_field_spec.rb +29 -21
  131. data/spec/unit/selector_builder/textarea_spec.rb +2 -0
  132. data/spec/unit/unit_helper.rb +2 -0
  133. data/spec/unit/wait_spec.rb +2 -0
  134. data/spec/watirspec/adjacent_spec.rb +8 -6
  135. data/spec/watirspec/after_hooks_spec.rb +19 -21
  136. data/spec/watirspec/alert_spec.rb +2 -0
  137. data/spec/watirspec/attributes_spec.rb +2 -0
  138. data/spec/watirspec/browser_spec.rb +16 -12
  139. data/spec/watirspec/capabilities_spec.rb +569 -0
  140. data/spec/watirspec/cookies_spec.rb +4 -2
  141. data/spec/watirspec/drag_and_drop_spec.rb +2 -0
  142. data/spec/watirspec/element_hidden_spec.rb +2 -0
  143. data/spec/watirspec/elements/area_spec.rb +2 -0
  144. data/spec/watirspec/elements/areas_spec.rb +2 -0
  145. data/spec/watirspec/elements/button_spec.rb +2 -0
  146. data/spec/watirspec/elements/buttons_spec.rb +2 -0
  147. data/spec/watirspec/elements/checkbox_spec.rb +2 -0
  148. data/spec/watirspec/elements/checkboxes_spec.rb +2 -0
  149. data/spec/watirspec/elements/collections_spec.rb +5 -3
  150. data/spec/watirspec/elements/date_field_spec.rb +2 -0
  151. data/spec/watirspec/elements/date_fields_spec.rb +2 -0
  152. data/spec/watirspec/elements/date_time_field_spec.rb +2 -0
  153. data/spec/watirspec/elements/date_time_fields_spec.rb +2 -0
  154. data/spec/watirspec/elements/dd_spec.rb +2 -0
  155. data/spec/watirspec/elements/dds_spec.rb +2 -0
  156. data/spec/watirspec/elements/del_spec.rb +2 -0
  157. data/spec/watirspec/elements/dels_spec.rb +2 -0
  158. data/spec/watirspec/elements/div_spec.rb +2 -1
  159. data/spec/watirspec/elements/divs_spec.rb +2 -0
  160. data/spec/watirspec/elements/dl_spec.rb +6 -6
  161. data/spec/watirspec/elements/dls_spec.rb +2 -0
  162. data/spec/watirspec/elements/dt_spec.rb +2 -0
  163. data/spec/watirspec/elements/dts_spec.rb +2 -0
  164. data/spec/watirspec/elements/element_spec.rb +9 -1
  165. data/spec/watirspec/elements/elements_spec.rb +2 -0
  166. data/spec/watirspec/elements/em_spec.rb +2 -0
  167. data/spec/watirspec/elements/ems_spec.rb +2 -0
  168. data/spec/watirspec/elements/filefield_spec.rb +2 -0
  169. data/spec/watirspec/elements/filefields_spec.rb +2 -0
  170. data/spec/watirspec/elements/font_spec.rb +2 -0
  171. data/spec/watirspec/elements/form_spec.rb +2 -0
  172. data/spec/watirspec/elements/forms_spec.rb +2 -0
  173. data/spec/watirspec/elements/frame_spec.rb +2 -0
  174. data/spec/watirspec/elements/frames_spec.rb +2 -0
  175. data/spec/watirspec/elements/hidden_spec.rb +2 -0
  176. data/spec/watirspec/elements/hiddens_spec.rb +2 -0
  177. data/spec/watirspec/elements/hn_spec.rb +2 -0
  178. data/spec/watirspec/elements/hns_spec.rb +2 -0
  179. data/spec/watirspec/elements/iframe_spec.rb +3 -1
  180. data/spec/watirspec/elements/iframes_spec.rb +2 -0
  181. data/spec/watirspec/elements/image_spec.rb +2 -0
  182. data/spec/watirspec/elements/images_spec.rb +2 -0
  183. data/spec/watirspec/elements/input_spec.rb +2 -0
  184. data/spec/watirspec/elements/ins_spec.rb +2 -0
  185. data/spec/watirspec/elements/inses_spec.rb +2 -0
  186. data/spec/watirspec/elements/label_spec.rb +2 -0
  187. data/spec/watirspec/elements/labels_spec.rb +2 -0
  188. data/spec/watirspec/elements/li_spec.rb +2 -0
  189. data/spec/watirspec/elements/link_spec.rb +4 -4
  190. data/spec/watirspec/elements/links_spec.rb +2 -0
  191. data/spec/watirspec/elements/lis_spec.rb +2 -0
  192. data/spec/watirspec/elements/list_spec.rb +2 -0
  193. data/spec/watirspec/elements/map_spec.rb +2 -0
  194. data/spec/watirspec/elements/maps_spec.rb +2 -0
  195. data/spec/watirspec/elements/meta_spec.rb +2 -0
  196. data/spec/watirspec/elements/metas_spec.rb +2 -0
  197. data/spec/watirspec/elements/ol_spec.rb +2 -0
  198. data/spec/watirspec/elements/ols_spec.rb +2 -0
  199. data/spec/watirspec/elements/option_spec.rb +2 -0
  200. data/spec/watirspec/elements/p_spec.rb +2 -0
  201. data/spec/watirspec/elements/pre_spec.rb +2 -0
  202. data/spec/watirspec/elements/pres_spec.rb +2 -0
  203. data/spec/watirspec/elements/ps_spec.rb +2 -0
  204. data/spec/watirspec/elements/radio_spec.rb +2 -0
  205. data/spec/watirspec/elements/radios_spec.rb +2 -0
  206. data/spec/watirspec/elements/select_list_spec.rb +7 -1
  207. data/spec/watirspec/elements/select_lists_spec.rb +2 -0
  208. data/spec/watirspec/elements/span_spec.rb +2 -0
  209. data/spec/watirspec/elements/spans_spec.rb +2 -0
  210. data/spec/watirspec/elements/strong_spec.rb +2 -0
  211. data/spec/watirspec/elements/strongs_spec.rb +2 -0
  212. data/spec/watirspec/elements/table_nesting_spec.rb +2 -0
  213. data/spec/watirspec/elements/table_spec.rb +2 -0
  214. data/spec/watirspec/elements/tables_spec.rb +2 -0
  215. data/spec/watirspec/elements/tbody_spec.rb +2 -0
  216. data/spec/watirspec/elements/tbodys_spec.rb +2 -0
  217. data/spec/watirspec/elements/td_spec.rb +2 -0
  218. data/spec/watirspec/elements/tds_spec.rb +2 -0
  219. data/spec/watirspec/elements/text_field_spec.rb +2 -0
  220. data/spec/watirspec/elements/text_fields_spec.rb +2 -0
  221. data/spec/watirspec/elements/textarea_spec.rb +2 -0
  222. data/spec/watirspec/elements/textareas_spec.rb +2 -0
  223. data/spec/watirspec/elements/tfoot_spec.rb +2 -0
  224. data/spec/watirspec/elements/tfoots_spec.rb +2 -0
  225. data/spec/watirspec/elements/thead_spec.rb +2 -0
  226. data/spec/watirspec/elements/theads_spec.rb +2 -0
  227. data/spec/watirspec/elements/tr_spec.rb +2 -0
  228. data/spec/watirspec/elements/trs_spec.rb +2 -0
  229. data/spec/watirspec/elements/ul_spec.rb +2 -0
  230. data/spec/watirspec/elements/uls_spec.rb +2 -0
  231. data/spec/watirspec/html/child_frame.html +29 -0
  232. data/spec/watirspec/html/class_locator.html +2 -0
  233. data/spec/watirspec/html/scroll_nested.html +17 -0
  234. data/spec/watirspec/html/scroll_nested_offscreen.html +18 -0
  235. data/spec/watirspec/html/shadow_dom.html +28 -0
  236. data/spec/watirspec/radio_set_spec.rb +2 -0
  237. data/spec/watirspec/screenshot_spec.rb +4 -2
  238. data/spec/watirspec/scroll_spec.rb +75 -7
  239. data/spec/watirspec/shadow_root_spec.rb +103 -0
  240. data/spec/watirspec/special_chars_spec.rb +2 -0
  241. data/spec/watirspec/support/rspec_matchers.rb +35 -32
  242. data/spec/watirspec/user_editable_spec.rb +2 -0
  243. data/spec/watirspec/wait_spec.rb +2 -0
  244. data/spec/watirspec/window_switching_spec.rb +48 -38
  245. data/spec/watirspec_helper.rb +24 -18
  246. data/support/doctest_helper.rb +2 -0
  247. data/support/version_differ.rb +2 -0
  248. data/watir.gemspec +11 -8
  249. metadata +54 -215
  250. data/.github/actions/enable-safari/action.yml +0 -11
  251. data/.github/actions/install-chrome/action.yml +0 -12
  252. data/.github/actions/setup-linux/action.yml +0 -8
  253. data/lib/watir-webdriver.rb +0 -2
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'watirspec'
2
4
  require 'spec_helper'
3
5
  require 'webdrivers'
@@ -20,6 +22,7 @@ class LocalConfig
20
22
  end
21
23
 
22
24
  def configure
25
+ @imp.browser_class = Watir::Browser
23
26
  set_webdriver
24
27
  set_browser_args
25
28
  load_webdrivers
@@ -45,8 +48,7 @@ class LocalConfig
45
48
  end
46
49
 
47
50
  def set_webdriver
48
- @imp.name = :webdriver
49
- @imp.browser_class = Watir::Browser
51
+ @imp.name = :local_driver
50
52
  end
51
53
 
52
54
  def set_browser_args
@@ -72,20 +74,32 @@ class LocalConfig
72
74
  end
73
75
 
74
76
  def firefox_args
75
- ENV['FIREFOX_BINARY'] ? {options: {binary: ENV['FIREFOX_BINARY']}} : {}
77
+ opts = {options: {}}
78
+ opts[:headless] = true if ENV['HEADLESS']
79
+ opts[:options][:binary] = ENV['FIREFOX_BINARY'] if ENV['FIREFOX_BINARY']
80
+ opts
76
81
  end
77
82
 
78
83
  def safari_preview_args
84
+ @browser = :safari
85
+ Selenium::WebDriver::Safari.technology_preview!
79
86
  {technology_preview: true}
80
87
  end
81
88
 
82
89
  def chrome_args
83
90
  opts = {options: {args: ['--disable-translate']}}
84
- opts[:headless] = true if ENV['HEADLESS'] == 'true'
91
+ opts[:headless] = true if ENV['HEADLESS']
85
92
  opts[:options][:binary] = ENV['CHROME_BINARY'] if ENV['CHROME_BINARY']
86
93
  opts
87
94
  end
88
95
 
96
+ def edge_args
97
+ opts = {options: {args: ['--disable-translate']}}
98
+ opts[:headless] = true if ENV['HEADLESS']
99
+ opts[:options][:binary] = ENV['EDGE_BINARY'] if ENV['EDGE_BINARY']
100
+ opts
101
+ end
102
+
89
103
  class SelectorListener < Selenium::WebDriver::Support::AbstractEventListener
90
104
  def initialize
91
105
  super
@@ -97,7 +111,7 @@ class LocalConfig
97
111
  end
98
112
 
99
113
  def report
100
- total = @counts.values.inject(0) { |mem, var| mem + var }
114
+ total = @counts.values.sum
101
115
  str = "Selenium selector stats: \n"
102
116
  @counts.each do |how, count|
103
117
  str << "\t#{how.to_s.ljust(20)}: #{count * 100 / total} (#{count})\n"
@@ -124,16 +138,13 @@ class RemoteConfig < LocalConfig
124
138
 
125
139
  private
126
140
 
127
- def add_guards
128
- matching_guards = common_guards
129
- matching_guards << :remote
130
- matching_guards << [:remote, browser]
131
- matching_guards
132
- end
133
-
134
141
  def create_args
135
142
  super.merge(url: @url)
136
143
  end
144
+
145
+ def set_webdriver
146
+ @imp.name = :remote_driver
147
+ end
137
148
  end
138
149
 
139
150
  if ENV['REMOTE_SERVER_URL'] || ENV['USE_REMOTE']
@@ -151,18 +162,13 @@ RSpec.configure do |config|
151
162
 
152
163
  guards.add_condition(:browser, WatirSpec.implementation.browser_args.first)
153
164
  guards.add_condition(:platform, Selenium::WebDriver::Platform.os)
165
+ guards.add_condition(:driver, WatirSpec.implementation.name)
154
166
 
155
167
  headless = WatirSpec.implementation.browser_args.last[:headless]
156
168
  guards.add_condition(:headless, headless)
157
169
 
158
170
  guards.add_condition(:ci, ENV['DESKTOP_SESSION'].nil?)
159
171
 
160
- window_manager = !Selenium::WebDriver::Platform.linux? || !ENV['DESKTOP_SESSION'].nil?
161
- guards.add_condition(:window_manager, window_manager)
162
-
163
- remote = ENV['USE_REMOTE'] == 'true'
164
- guards.add_condition(:remote, remote)
165
-
166
172
  results = guards.disposition
167
173
  send(*results) if results
168
174
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'watir'
2
4
  require 'watirspec'
3
5
  require 'webdrivers'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class VersionDiffer
2
4
  def print_latest(io = $stdout)
3
5
  io.puts diff(last_version, '.')
data/watir.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
3
5
 
@@ -6,12 +8,12 @@ require 'watir/version'
6
8
  Gem::Specification.new do |s|
7
9
  s.name = 'watir'
8
10
  s.version = Watir::VERSION
9
- s.required_ruby_version = '>= 2.6.0'
11
+ s.required_ruby_version = '>= 2.7.0'
10
12
 
11
13
  s.platform = Gem::Platform::RUBY
12
14
  s.authors = ['Alex Rodionov', 'Titus Fortner', 'Justin Ko']
13
15
  s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com', 'jkotests@gmail.com ']
14
- s.homepage = 'http://github.com/watir/watir'
16
+ s.homepage = 'https://github.com/watir/watir'
15
17
  s.summary = 'Watir powered by Selenium'
16
18
  s.description = <<~DESCRIPTION_MESSAGE
17
19
  Watir stands for Web Application Testing In Ruby
@@ -19,28 +21,29 @@ Gem::Specification.new do |s|
19
21
  DESCRIPTION_MESSAGE
20
22
 
21
23
  s.license = 'MIT'
24
+ s.metadata['rubygems_mfa_required'] = 'true'
22
25
 
23
26
  s.files = `git ls-files`.split("\n")
24
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
25
27
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
26
28
  s.require_paths = ['lib']
27
29
 
28
- s.add_dependency 'selenium-webdriver', '~> 4.0'
30
+ s.add_dependency 'selenium-webdriver', '~> 4.2'
29
31
  s.add_runtime_dependency 'regexp_parser', '>= 1.2', '< 3'
30
32
 
31
33
  s.add_development_dependency 'activesupport', '~> 4.0', '>= 4.1.11' # for pluralization during code generation
32
34
  s.add_development_dependency 'coveralls_reborn'
33
- s.add_development_dependency 'fuubar'
34
35
  s.add_development_dependency 'nokogiri'
35
- s.add_development_dependency 'pry'
36
+ s.add_development_dependency 'pry', '~> 0.14'
36
37
  s.add_development_dependency 'rake', '>= 12.3.3'
37
38
  s.add_development_dependency 'rspec', '~> 3.0'
38
39
  s.add_development_dependency 'rspec-retry'
39
- s.add_development_dependency 'rubocop', '~> 0.59'
40
+ s.add_development_dependency 'rubocop', '= 1.40'
41
+ s.add_development_dependency 'rubocop-performance', '~> 1.15'
42
+ s.add_development_dependency 'rubocop-rake', '~> 0.6'
40
43
  s.add_development_dependency 'selenium_statistics'
41
44
  s.add_development_dependency 'simplecov-console'
42
45
  s.add_development_dependency 'webdrivers', '~> 4.7'
43
46
  s.add_development_dependency 'webidl', '>= 0.2.2'
44
- s.add_development_dependency 'yard', '> 0.8.2.1'
47
+ s.add_development_dependency 'yard', '> 0.9.11'
45
48
  s.add_development_dependency 'yard-doctest', '~> 0.1.14'
46
49
  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: 7.1.0
4
+ version: 7.2.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: 2021-11-15 00:00:00.000000000 Z
13
+ date: 2022-12-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: selenium-webdriver
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '4.0'
21
+ version: '4.2'
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: '4.0'
28
+ version: '4.2'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: regexp_parser
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: fuubar
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: nokogiri
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +98,16 @@ dependencies:
112
98
  name: pry
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: '0.14'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: '0.14'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: rake
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -166,18 +152,46 @@ dependencies:
166
152
  version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: '1.40'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: '1.40'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop-performance
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.15'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.15'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-rake
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: '0.59'
187
+ version: '0.6'
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: '0.59'
194
+ version: '0.6'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: selenium_statistics
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +254,14 @@ dependencies:
240
254
  requirements:
241
255
  - - ">"
242
256
  - !ruby/object:Gem::Version
243
- version: 0.8.2.1
257
+ version: 0.9.11
244
258
  type: :development
245
259
  prerelease: false
246
260
  version_requirements: !ruby/object:Gem::Requirement
247
261
  requirements:
248
262
  - - ">"
249
263
  - !ruby/object:Gem::Version
250
- version: 0.8.2.1
264
+ version: 0.9.11
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: yard-doctest
253
267
  requirement: !ruby/object:Gem::Requirement
@@ -275,9 +289,6 @@ extra_rdoc_files: []
275
289
  files:
276
290
  - ".document"
277
291
  - ".github/ISSUE_TEMPLATE.md"
278
- - ".github/actions/enable-safari/action.yml"
279
- - ".github/actions/install-chrome/action.yml"
280
- - ".github/actions/setup-linux/action.yml"
281
292
  - ".github/workflows/chrome.yml"
282
293
  - ".github/workflows/edge.yml"
283
294
  - ".github/workflows/firefox.yml"
@@ -292,7 +303,6 @@ files:
292
303
  - LICENSE
293
304
  - README.md
294
305
  - Rakefile
295
- - lib/watir-webdriver.rb
296
306
  - lib/watir.rb
297
307
  - lib/watir/adjacent.rb
298
308
  - lib/watir/after_hooks.rb
@@ -403,6 +413,8 @@ files:
403
413
  - lib/watir/row_container.rb
404
414
  - lib/watir/screenshot.rb
405
415
  - lib/watir/scroll.rb
416
+ - lib/watir/search_context.rb
417
+ - lib/watir/shadow_root.rb
406
418
  - lib/watir/user_editable.rb
407
419
  - lib/watir/version.rb
408
420
  - lib/watir/wait.rb
@@ -438,6 +450,7 @@ files:
438
450
  - spec/watirspec/alert_spec.rb
439
451
  - spec/watirspec/attributes_spec.rb
440
452
  - spec/watirspec/browser_spec.rb
453
+ - spec/watirspec/capabilities_spec.rb
441
454
  - spec/watirspec/cookies_spec.rb
442
455
  - spec/watirspec/drag_and_drop_spec.rb
443
456
  - spec/watirspec/element_hidden_spec.rb
@@ -531,6 +544,7 @@ files:
531
544
  - spec/watirspec/elements/uls_spec.rb
532
545
  - spec/watirspec/html/alerts.html
533
546
  - spec/watirspec/html/aria_attributes.html
547
+ - spec/watirspec/html/child_frame.html
534
548
  - spec/watirspec/html/class_locator.html
535
549
  - spec/watirspec/html/clicks.html
536
550
  - spec/watirspec/html/closeable.html
@@ -580,6 +594,9 @@ files:
580
594
  - spec/watirspec/html/removed_element.html
581
595
  - spec/watirspec/html/right_click.html
582
596
  - spec/watirspec/html/scroll.html
597
+ - spec/watirspec/html/scroll_nested.html
598
+ - spec/watirspec/html/scroll_nested_offscreen.html
599
+ - spec/watirspec/html/shadow_dom.html
583
600
  - spec/watirspec/html/special_chars.html
584
601
  - spec/watirspec/html/sticky_elements.html
585
602
  - spec/watirspec/html/tables.html
@@ -591,6 +608,7 @@ files:
591
608
  - spec/watirspec/radio_set_spec.rb
592
609
  - spec/watirspec/screenshot_spec.rb
593
610
  - spec/watirspec/scroll_spec.rb
611
+ - spec/watirspec/shadow_root_spec.rb
594
612
  - spec/watirspec/special_chars_spec.rb
595
613
  - spec/watirspec/support/rspec_matchers.rb
596
614
  - spec/watirspec/user_editable_spec.rb
@@ -601,10 +619,11 @@ files:
601
619
  - support/travis.sh
602
620
  - support/version_differ.rb
603
621
  - watir.gemspec
604
- homepage: http://github.com/watir/watir
622
+ homepage: https://github.com/watir/watir
605
623
  licenses:
606
624
  - MIT
607
- metadata: {}
625
+ metadata:
626
+ rubygems_mfa_required: 'true'
608
627
  post_install_message:
609
628
  rdoc_options: []
610
629
  require_paths:
@@ -613,195 +632,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
613
632
  requirements:
614
633
  - - ">="
615
634
  - !ruby/object:Gem::Version
616
- version: 2.6.0
635
+ version: 2.7.0
617
636
  required_rubygems_version: !ruby/object:Gem::Requirement
618
637
  requirements:
619
638
  - - ">="
620
639
  - !ruby/object:Gem::Version
621
640
  version: '0'
622
641
  requirements: []
623
- rubygems_version: 3.2.22
642
+ rubygems_version: 3.3.7
624
643
  signing_key:
625
644
  specification_version: 4
626
645
  summary: Watir powered by Selenium
627
- test_files:
628
- - spec/locator_spec_helper.rb
629
- - spec/spec_helper.rb
630
- - spec/unit/capabilities_spec.rb
631
- - spec/unit/element_locator_spec.rb
632
- - spec/unit/match_elements/button_spec.rb
633
- - spec/unit/match_elements/element_spec.rb
634
- - spec/unit/match_elements/text_field_spec.rb
635
- - spec/unit/selector_builder/anchor_spec.rb
636
- - spec/unit/selector_builder/button_spec.rb
637
- - spec/unit/selector_builder/cell_spec.rb
638
- - spec/unit/selector_builder/element_spec.rb
639
- - spec/unit/selector_builder/row_spec.rb
640
- - spec/unit/selector_builder/text_field_spec.rb
641
- - spec/unit/selector_builder/textarea_spec.rb
642
- - spec/unit/unit_helper.rb
643
- - spec/unit/wait_spec.rb
644
- - spec/watirspec/adjacent_spec.rb
645
- - spec/watirspec/after_hooks_spec.rb
646
- - spec/watirspec/alert_spec.rb
647
- - spec/watirspec/attributes_spec.rb
648
- - spec/watirspec/browser_spec.rb
649
- - spec/watirspec/cookies_spec.rb
650
- - spec/watirspec/drag_and_drop_spec.rb
651
- - spec/watirspec/element_hidden_spec.rb
652
- - spec/watirspec/elements/area_spec.rb
653
- - spec/watirspec/elements/areas_spec.rb
654
- - spec/watirspec/elements/button_spec.rb
655
- - spec/watirspec/elements/buttons_spec.rb
656
- - spec/watirspec/elements/checkbox_spec.rb
657
- - spec/watirspec/elements/checkboxes_spec.rb
658
- - spec/watirspec/elements/collections_spec.rb
659
- - spec/watirspec/elements/date_field_spec.rb
660
- - spec/watirspec/elements/date_fields_spec.rb
661
- - spec/watirspec/elements/date_time_field_spec.rb
662
- - spec/watirspec/elements/date_time_fields_spec.rb
663
- - spec/watirspec/elements/dd_spec.rb
664
- - spec/watirspec/elements/dds_spec.rb
665
- - spec/watirspec/elements/del_spec.rb
666
- - spec/watirspec/elements/dels_spec.rb
667
- - spec/watirspec/elements/div_spec.rb
668
- - spec/watirspec/elements/divs_spec.rb
669
- - spec/watirspec/elements/dl_spec.rb
670
- - spec/watirspec/elements/dls_spec.rb
671
- - spec/watirspec/elements/dt_spec.rb
672
- - spec/watirspec/elements/dts_spec.rb
673
- - spec/watirspec/elements/element_spec.rb
674
- - spec/watirspec/elements/elements_spec.rb
675
- - spec/watirspec/elements/em_spec.rb
676
- - spec/watirspec/elements/ems_spec.rb
677
- - spec/watirspec/elements/filefield_spec.rb
678
- - spec/watirspec/elements/filefields_spec.rb
679
- - spec/watirspec/elements/font_spec.rb
680
- - spec/watirspec/elements/form_spec.rb
681
- - spec/watirspec/elements/forms_spec.rb
682
- - spec/watirspec/elements/frame_spec.rb
683
- - spec/watirspec/elements/frames_spec.rb
684
- - spec/watirspec/elements/hidden_spec.rb
685
- - spec/watirspec/elements/hiddens_spec.rb
686
- - spec/watirspec/elements/hn_spec.rb
687
- - spec/watirspec/elements/hns_spec.rb
688
- - spec/watirspec/elements/iframe_spec.rb
689
- - spec/watirspec/elements/iframes_spec.rb
690
- - spec/watirspec/elements/image_spec.rb
691
- - spec/watirspec/elements/images_spec.rb
692
- - spec/watirspec/elements/input_spec.rb
693
- - spec/watirspec/elements/ins_spec.rb
694
- - spec/watirspec/elements/inses_spec.rb
695
- - spec/watirspec/elements/label_spec.rb
696
- - spec/watirspec/elements/labels_spec.rb
697
- - spec/watirspec/elements/li_spec.rb
698
- - spec/watirspec/elements/link_spec.rb
699
- - spec/watirspec/elements/links_spec.rb
700
- - spec/watirspec/elements/lis_spec.rb
701
- - spec/watirspec/elements/list_spec.rb
702
- - spec/watirspec/elements/map_spec.rb
703
- - spec/watirspec/elements/maps_spec.rb
704
- - spec/watirspec/elements/meta_spec.rb
705
- - spec/watirspec/elements/metas_spec.rb
706
- - spec/watirspec/elements/ol_spec.rb
707
- - spec/watirspec/elements/ols_spec.rb
708
- - spec/watirspec/elements/option_spec.rb
709
- - spec/watirspec/elements/p_spec.rb
710
- - spec/watirspec/elements/pre_spec.rb
711
- - spec/watirspec/elements/pres_spec.rb
712
- - spec/watirspec/elements/ps_spec.rb
713
- - spec/watirspec/elements/radio_spec.rb
714
- - spec/watirspec/elements/radios_spec.rb
715
- - spec/watirspec/elements/select_list_spec.rb
716
- - spec/watirspec/elements/select_lists_spec.rb
717
- - spec/watirspec/elements/span_spec.rb
718
- - spec/watirspec/elements/spans_spec.rb
719
- - spec/watirspec/elements/strong_spec.rb
720
- - spec/watirspec/elements/strongs_spec.rb
721
- - spec/watirspec/elements/table_nesting_spec.rb
722
- - spec/watirspec/elements/table_spec.rb
723
- - spec/watirspec/elements/tables_spec.rb
724
- - spec/watirspec/elements/tbody_spec.rb
725
- - spec/watirspec/elements/tbodys_spec.rb
726
- - spec/watirspec/elements/td_spec.rb
727
- - spec/watirspec/elements/tds_spec.rb
728
- - spec/watirspec/elements/text_field_spec.rb
729
- - spec/watirspec/elements/text_fields_spec.rb
730
- - spec/watirspec/elements/textarea_spec.rb
731
- - spec/watirspec/elements/textareas_spec.rb
732
- - spec/watirspec/elements/tfoot_spec.rb
733
- - spec/watirspec/elements/tfoots_spec.rb
734
- - spec/watirspec/elements/thead_spec.rb
735
- - spec/watirspec/elements/theads_spec.rb
736
- - spec/watirspec/elements/tr_spec.rb
737
- - spec/watirspec/elements/trs_spec.rb
738
- - spec/watirspec/elements/ul_spec.rb
739
- - spec/watirspec/elements/uls_spec.rb
740
- - spec/watirspec/html/alerts.html
741
- - spec/watirspec/html/aria_attributes.html
742
- - spec/watirspec/html/class_locator.html
743
- - spec/watirspec/html/clicks.html
744
- - spec/watirspec/html/closeable.html
745
- - spec/watirspec/html/collections.html
746
- - spec/watirspec/html/css/jquery-ui-1.8.17.custom.css
747
- - spec/watirspec/html/data_attributes.html
748
- - spec/watirspec/html/definition_lists.html
749
- - spec/watirspec/html/drag_and_drop.html
750
- - spec/watirspec/html/font.html
751
- - spec/watirspec/html/forms_with_input_elements.html
752
- - spec/watirspec/html/frame_1.html
753
- - spec/watirspec/html/frame_2.html
754
- - spec/watirspec/html/frames.html
755
- - spec/watirspec/html/iframe_1.html
756
- - spec/watirspec/html/iframes.html
757
- - spec/watirspec/html/images.html
758
- - spec/watirspec/html/images/1.gif
759
- - spec/watirspec/html/images/2.gif
760
- - spec/watirspec/html/images/3.gif
761
- - spec/watirspec/html/images/button.png
762
- - spec/watirspec/html/images/circle.png
763
- - spec/watirspec/html/images/map.gif
764
- - spec/watirspec/html/images/map2.gif
765
- - spec/watirspec/html/images/minus.gif
766
- - spec/watirspec/html/images/originaltriangle.png
767
- - spec/watirspec/html/images/plus.gif
768
- - spec/watirspec/html/images/square.png
769
- - spec/watirspec/html/images/triangle.png
770
- - spec/watirspec/html/inner_outer.html
771
- - spec/watirspec/html/javascript/angular.min.js
772
- - spec/watirspec/html/javascript/helpers.js
773
- - spec/watirspec/html/javascript/jquery-1.7.1.min.js
774
- - spec/watirspec/html/javascript/jquery-ui-1.8.17.custom.min.js
775
- - spec/watirspec/html/keylogger.html
776
- - spec/watirspec/html/modal_dialog.html
777
- - spec/watirspec/html/multiple_ids.html
778
- - spec/watirspec/html/nested_elements.html
779
- - spec/watirspec/html/nested_frame_1.html
780
- - spec/watirspec/html/nested_frame_2.html
781
- - spec/watirspec/html/nested_frame_3.html
782
- - spec/watirspec/html/nested_frames.html
783
- - spec/watirspec/html/nested_iframe_2.html
784
- - spec/watirspec/html/nested_iframes.html
785
- - spec/watirspec/html/nested_tables.html
786
- - spec/watirspec/html/non_control_elements.html
787
- - spec/watirspec/html/obscured.html
788
- - spec/watirspec/html/removed_element.html
789
- - spec/watirspec/html/right_click.html
790
- - spec/watirspec/html/scroll.html
791
- - spec/watirspec/html/special_chars.html
792
- - spec/watirspec/html/sticky_elements.html
793
- - spec/watirspec/html/tables.html
794
- - spec/watirspec/html/timeout_window_location.html
795
- - spec/watirspec/html/uneven_table.html
796
- - spec/watirspec/html/wait.html
797
- - spec/watirspec/html/watirspec.css
798
- - spec/watirspec/html/window_switching.html
799
- - spec/watirspec/radio_set_spec.rb
800
- - spec/watirspec/screenshot_spec.rb
801
- - spec/watirspec/scroll_spec.rb
802
- - spec/watirspec/special_chars_spec.rb
803
- - spec/watirspec/support/rspec_matchers.rb
804
- - spec/watirspec/user_editable_spec.rb
805
- - spec/watirspec/wait_spec.rb
806
- - spec/watirspec/window_switching_spec.rb
807
- - spec/watirspec_helper.rb
646
+ test_files: []
@@ -1,11 +0,0 @@
1
- name: 'Enable Safari Driver'
2
- description: 'Set safaridriver to run in automation mode'
3
- runs:
4
- using: composite
5
- steps:
6
- - run: |
7
- defaults write com.apple.Safari IncludeDevelopMenu YES
8
- defaults write com.apple.Safari AllowRemoteAutomation 1
9
- sudo safaridriver --enable
10
- safaridriver -p 0 &
11
- shell: bash
@@ -1,12 +0,0 @@
1
- name: 'Install Chrome'
2
- description: 'Install Chrome Stable'
3
- runs:
4
- using: "composite"
5
- steps:
6
- - run: |
7
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
8
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
9
- sudo apt-get update -qqy
10
- sudo apt-get -qqy install google-chrome-stable
11
- sudo rm /etc/apt/sources.list.d/google-chrome.list
12
- shell: bash
@@ -1,8 +0,0 @@
1
- name: 'Setup Linux'
2
- description: 'Run Linux in Virtual Desktop'
3
- runs:
4
- using: "composite"
5
- steps:
6
- - shell: bash
7
- run: |
8
- Xvfb :99 &
@@ -1,2 +0,0 @@
1
- require 'watir'
2
- warn "#{Kernel.caller.first}: `require 'watir-webdriver'` is deprecated. Please, use `require 'watir'`."