watir 6.19.1 → 7.0.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/actions/install-chrome/action.yml +1 -0
- data/.github/actions/setup-linux/action.yml +8 -0
- data/.github/workflows/tests.yml +100 -0
- data/CHANGES.md +7 -0
- data/README.md +1 -4
- data/Rakefile +1 -1
- data/lib/watir.rb +1 -45
- data/lib/watir/alert.rb +3 -8
- data/lib/watir/capabilities.rb +54 -230
- data/lib/watir/cell_container.rb +4 -4
- data/lib/watir/container.rb +4 -26
- data/lib/watir/elements/checkbox.rb +4 -4
- data/lib/watir/elements/date_field.rb +4 -4
- data/lib/watir/elements/date_time_field.rb +4 -4
- data/lib/watir/elements/element.rb +12 -49
- data/lib/watir/elements/file_field.rb +4 -4
- data/lib/watir/elements/font.rb +4 -4
- data/lib/watir/elements/hidden.rb +4 -4
- data/lib/watir/elements/html_elements.rb +444 -445
- data/lib/watir/elements/iframe.rb +4 -4
- data/lib/watir/elements/radio.rb +4 -4
- data/lib/watir/elements/select.rb +12 -78
- data/lib/watir/elements/svg_elements.rb +96 -96
- data/lib/watir/elements/text_field.rb +4 -4
- data/lib/watir/generator/base/generator.rb +4 -4
- data/lib/watir/generator/base/visitor.rb +0 -29
- data/lib/watir/generator/html/generator.rb +2 -1
- data/lib/watir/has_window.rb +4 -4
- data/lib/watir/http_client.rb +0 -8
- data/lib/watir/locators.rb +1 -5
- data/lib/watir/locators/button/matcher.rb +0 -23
- data/lib/watir/locators/button/selector_builder/xpath.rb +4 -15
- data/lib/watir/locators/element/matcher.rb +4 -19
- data/lib/watir/locators/element/selector_builder.rb +2 -37
- data/lib/watir/locators/element/selector_builder/xpath.rb +26 -41
- data/lib/watir/radio_set.rb +2 -2
- data/lib/watir/row_container.rb +4 -4
- data/lib/watir/version.rb +1 -1
- data/lib/watir/wait.rb +4 -74
- data/lib/watir/window.rb +6 -22
- data/lib/watir/window_collection.rb +5 -49
- data/lib/watirspec/implementation.rb +4 -0
- data/spec/spec_helper.rb +2 -7
- data/spec/unit/capabilities_spec.rb +196 -929
- data/spec/unit/match_elements/button_spec.rb +0 -13
- data/spec/unit/match_elements/element_spec.rb +38 -47
- data/spec/unit/match_elements/text_field_spec.rb +6 -6
- data/spec/unit/selector_builder/element_spec.rb +6 -23
- data/spec/unit/selector_builder/text_field_spec.rb +6 -7
- data/spec/watirspec/alert_spec.rb +4 -21
- data/spec/watirspec/browser_spec.rb +2 -2
- data/spec/watirspec/cookies_spec.rb +1 -1
- data/spec/watirspec/elements/button_spec.rb +0 -10
- data/spec/watirspec/elements/checkbox_spec.rb +10 -22
- data/spec/watirspec/elements/div_spec.rb +4 -34
- data/spec/watirspec/elements/divs_spec.rb +2 -2
- data/spec/watirspec/elements/element_spec.rb +38 -84
- data/spec/watirspec/elements/form_spec.rb +2 -4
- data/spec/watirspec/elements/links_spec.rb +4 -4
- data/spec/watirspec/elements/select_list_spec.rb +7 -108
- data/spec/watirspec/elements/span_spec.rb +2 -2
- data/spec/watirspec/elements/spans_spec.rb +1 -1
- data/spec/watirspec/elements/strong_spec.rb +1 -1
- data/spec/watirspec/html/non_control_elements.html +8 -3
- data/spec/watirspec/support/rspec_matchers.rb +1 -32
- data/spec/watirspec/window_switching_spec.rb +2 -49
- data/spec/watirspec_helper.rb +6 -1
- data/watir.gemspec +3 -4
- metadata +11 -32
- data/.github/workflows/linux.yml +0 -61
- data/.github/workflows/mac.yml +0 -55
- data/.github/workflows/unit.yml +0 -37
- data/.github/workflows/windows.yml +0 -39
- data/lib/watir/legacy_wait.rb +0 -123
- data/spec/unit/container_spec.rb +0 -35
- data/spec/watirspec/legacy_wait_spec.rb +0 -216
|
@@ -91,12 +91,12 @@ module Watir
|
|
|
91
91
|
end # FrameCollection
|
|
92
92
|
|
|
93
93
|
module Container
|
|
94
|
-
def frame(
|
|
95
|
-
Frame.new(self,
|
|
94
|
+
def frame(opts = {})
|
|
95
|
+
Frame.new(self, opts.merge(tag_name: 'frame'))
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
def frames(
|
|
99
|
-
FrameCollection.new(self,
|
|
98
|
+
def frames(opts = {})
|
|
99
|
+
FrameCollection.new(self, opts.merge(tag_name: 'frame'))
|
|
100
100
|
end
|
|
101
101
|
end # Container
|
|
102
102
|
|
data/lib/watir/elements/radio.rb
CHANGED
|
@@ -39,12 +39,12 @@ module Watir
|
|
|
39
39
|
end # Radio
|
|
40
40
|
|
|
41
41
|
module Container
|
|
42
|
-
def radio(
|
|
43
|
-
Radio.new(self,
|
|
42
|
+
def radio(opts = {})
|
|
43
|
+
Radio.new(self, opts.merge(tag_name: 'input', type: 'radio'))
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
def radios(
|
|
47
|
-
RadioCollection.new(self,
|
|
46
|
+
def radios(opts = {})
|
|
47
|
+
RadioCollection.new(self, opts.merge(tag_name: 'input', type: 'radio'))
|
|
48
48
|
end
|
|
49
49
|
end # Container
|
|
50
50
|
|
|
@@ -33,27 +33,11 @@ module Watir
|
|
|
33
33
|
if str_or_rx.size > 1 || str_or_rx.first.is_a?(Array)
|
|
34
34
|
str_or_rx.flatten.map { |v| select_all_by v }.first
|
|
35
35
|
else
|
|
36
|
-
str_or_rx.flatten.
|
|
36
|
+
found = find_options(:value, str_or_rx.flatten.first).first
|
|
37
|
+
select_matching([found])
|
|
37
38
|
end
|
|
38
39
|
end
|
|
39
40
|
|
|
40
|
-
#
|
|
41
|
-
# Select all options whose text or label matches the given string.
|
|
42
|
-
#
|
|
43
|
-
# @param [String, Regexp] str_or_rx
|
|
44
|
-
# @raise [Watir::Exception::NoValueFoundException] if the value does not exist.
|
|
45
|
-
# @return [String] The text of the first option selected.
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
def select_all(*str_or_rx)
|
|
49
|
-
Watir.logger.deprecate('#select_all',
|
|
50
|
-
'#select with an Array instance',
|
|
51
|
-
ids: [:select_all])
|
|
52
|
-
|
|
53
|
-
results = str_or_rx.flatten.map { |v| select_all_by v }
|
|
54
|
-
results.first
|
|
55
|
-
end
|
|
56
|
-
|
|
57
41
|
#
|
|
58
42
|
# Uses JavaScript to select the option whose text matches the given string.
|
|
59
43
|
#
|
|
@@ -69,37 +53,6 @@ module Watir
|
|
|
69
53
|
end
|
|
70
54
|
end
|
|
71
55
|
|
|
72
|
-
#
|
|
73
|
-
# Uses JavaScript to select all options whose text matches the given string.
|
|
74
|
-
#
|
|
75
|
-
# @param [String, Regexp] str_or_rx
|
|
76
|
-
# @raise [Watir::Exception::NoValueFoundException] if the value does not exist.
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
def select_all!(*str_or_rx)
|
|
80
|
-
Watir.logger.deprecate('#select_all!',
|
|
81
|
-
'#select! with an Array instance',
|
|
82
|
-
ids: [:select_all])
|
|
83
|
-
|
|
84
|
-
results = str_or_rx.flatten.map { |v| select_by!(v, :multiple) }
|
|
85
|
-
results.first
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
#
|
|
89
|
-
# Selects the option(s) whose value attribute matches the given string.
|
|
90
|
-
#
|
|
91
|
-
# @see +select+
|
|
92
|
-
#
|
|
93
|
-
# @param [String, Regexp] str_or_rx
|
|
94
|
-
# @raise [Watir::Exception::NoValueFoundException] if the value does not exist.
|
|
95
|
-
# @return [String] The option selected. If multiple options match, returns the first match
|
|
96
|
-
#
|
|
97
|
-
|
|
98
|
-
def select_value(str_or_rx)
|
|
99
|
-
Watir.logger.deprecate '#select_value', '#select', ids: [:select_value]
|
|
100
|
-
select_by str_or_rx
|
|
101
|
-
end
|
|
102
|
-
|
|
103
56
|
#
|
|
104
57
|
# Returns true if any of the selected options' text or label matches the given value.
|
|
105
58
|
#
|
|
@@ -155,17 +108,6 @@ module Watir
|
|
|
155
108
|
|
|
156
109
|
private
|
|
157
110
|
|
|
158
|
-
def select_by(str_or_rx)
|
|
159
|
-
found = find_options(:value, str_or_rx)
|
|
160
|
-
|
|
161
|
-
if found.size > 1
|
|
162
|
-
Watir.logger.deprecate 'Selecting multiple options with #select using a String or Regexp value',
|
|
163
|
-
'#select with the desired values in an Array instance',
|
|
164
|
-
ids: [:select_by]
|
|
165
|
-
end
|
|
166
|
-
select_matching(found)
|
|
167
|
-
end
|
|
168
|
-
|
|
169
111
|
def select_by!(str_or_rx, number)
|
|
170
112
|
js_rx = process_str_or_rx(str_or_rx)
|
|
171
113
|
|
|
@@ -208,27 +150,20 @@ module Watir
|
|
|
208
150
|
def select_all_by(str_or_rx)
|
|
209
151
|
raise Error, 'you can only use #select_all on multi-selects' unless multiple?
|
|
210
152
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
select_matching(found)
|
|
153
|
+
select_matching(find_options(:text, str_or_rx))
|
|
214
154
|
end
|
|
215
155
|
|
|
216
156
|
def find_options(how, str_or_rx)
|
|
157
|
+
msg = "expected String, Numeric or Regexp, got #{str_or_rx.inspect}:#{str_or_rx.class}"
|
|
158
|
+
raise TypeError, msg unless [String, Numeric, Regexp].any? { |k| str_or_rx.is_a?(k) }
|
|
159
|
+
|
|
217
160
|
wait_while do
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
@found = options(label: str_or_rx) if @found.empty?
|
|
223
|
-
@found.empty? && Watir.relaxed_locate?
|
|
224
|
-
else
|
|
225
|
-
raise TypeError, "expected String or Regexp, got #{str_or_rx.inspect}:#{str_or_rx.class}"
|
|
226
|
-
end
|
|
161
|
+
@found = how == :value ? options(value: str_or_rx) : []
|
|
162
|
+
@found = options(text: str_or_rx) if @found.empty?
|
|
163
|
+
@found = options(label: str_or_rx) if @found.empty?
|
|
164
|
+
@found.empty?
|
|
227
165
|
end
|
|
228
|
-
|
|
229
|
-
return @found unless @found.empty?
|
|
230
|
-
|
|
231
|
-
raise_no_value_found(str_or_rx)
|
|
166
|
+
@found
|
|
232
167
|
rescue Wait::TimeoutError
|
|
233
168
|
raise_no_value_found(str_or_rx)
|
|
234
169
|
end
|
|
@@ -241,8 +176,7 @@ module Watir
|
|
|
241
176
|
def select_matching(elements)
|
|
242
177
|
elements = [elements.first] unless multiple?
|
|
243
178
|
elements.each { |e| e.click unless e.selected? }
|
|
244
|
-
|
|
245
|
-
elements.first.stale? ? '' : elements.first.text
|
|
179
|
+
elements.first.exists? ? elements.first.text : ''
|
|
246
180
|
end
|
|
247
181
|
end # Select
|
|
248
182
|
|
|
@@ -255,242 +255,242 @@ module Watir
|
|
|
255
255
|
module Container
|
|
256
256
|
|
|
257
257
|
# @return [Circle]
|
|
258
|
-
def circle(
|
|
259
|
-
Circle.new(self,
|
|
258
|
+
def circle(opts = {})
|
|
259
|
+
Circle.new(self, opts.merge(tag_name: "circle"))
|
|
260
260
|
end
|
|
261
261
|
# @return [CircleCollection]
|
|
262
|
-
def circles(
|
|
263
|
-
CircleCollection.new(self,
|
|
262
|
+
def circles(opts = {})
|
|
263
|
+
CircleCollection.new(self, opts.merge(tag_name: "circle"))
|
|
264
264
|
end
|
|
265
265
|
Watir.tag_to_class[:circle] = Circle
|
|
266
266
|
|
|
267
267
|
# @return [Defs]
|
|
268
|
-
def defs(
|
|
269
|
-
Defs.new(self,
|
|
268
|
+
def defs(opts = {})
|
|
269
|
+
Defs.new(self, opts.merge(tag_name: "defs"))
|
|
270
270
|
end
|
|
271
271
|
# @return [DefsCollection]
|
|
272
|
-
def defss(
|
|
273
|
-
DefsCollection.new(self,
|
|
272
|
+
def defss(opts = {})
|
|
273
|
+
DefsCollection.new(self, opts.merge(tag_name: "defs"))
|
|
274
274
|
end
|
|
275
275
|
Watir.tag_to_class[:defs] = Defs
|
|
276
276
|
|
|
277
277
|
# @return [Desc]
|
|
278
|
-
def desc(
|
|
279
|
-
Desc.new(self,
|
|
278
|
+
def desc(opts = {})
|
|
279
|
+
Desc.new(self, opts.merge(tag_name: "desc"))
|
|
280
280
|
end
|
|
281
281
|
# @return [DescCollection]
|
|
282
|
-
def descs(
|
|
283
|
-
DescCollection.new(self,
|
|
282
|
+
def descs(opts = {})
|
|
283
|
+
DescCollection.new(self, opts.merge(tag_name: "desc"))
|
|
284
284
|
end
|
|
285
285
|
Watir.tag_to_class[:desc] = Desc
|
|
286
286
|
|
|
287
287
|
# @return [Ellipse]
|
|
288
|
-
def ellipse(
|
|
289
|
-
Ellipse.new(self,
|
|
288
|
+
def ellipse(opts = {})
|
|
289
|
+
Ellipse.new(self, opts.merge(tag_name: "ellipse"))
|
|
290
290
|
end
|
|
291
291
|
# @return [EllipseCollection]
|
|
292
|
-
def ellipses(
|
|
293
|
-
EllipseCollection.new(self,
|
|
292
|
+
def ellipses(opts = {})
|
|
293
|
+
EllipseCollection.new(self, opts.merge(tag_name: "ellipse"))
|
|
294
294
|
end
|
|
295
295
|
Watir.tag_to_class[:ellipse] = Ellipse
|
|
296
296
|
|
|
297
297
|
# @return [ForeignObject]
|
|
298
|
-
def foreign_object(
|
|
299
|
-
ForeignObject.new(self,
|
|
298
|
+
def foreign_object(opts = {})
|
|
299
|
+
ForeignObject.new(self, opts.merge(tag_name: "foreignObject"))
|
|
300
300
|
end
|
|
301
301
|
# @return [ForeignObjectCollection]
|
|
302
|
-
def foreign_objects(
|
|
303
|
-
ForeignObjectCollection.new(self,
|
|
302
|
+
def foreign_objects(opts = {})
|
|
303
|
+
ForeignObjectCollection.new(self, opts.merge(tag_name: "foreignObject"))
|
|
304
304
|
end
|
|
305
305
|
Watir.tag_to_class[:foreignObject] = ForeignObject
|
|
306
306
|
|
|
307
307
|
# @return [G]
|
|
308
|
-
def g(
|
|
309
|
-
G.new(self,
|
|
308
|
+
def g(opts = {})
|
|
309
|
+
G.new(self, opts.merge(tag_name: "g"))
|
|
310
310
|
end
|
|
311
311
|
# @return [GCollection]
|
|
312
|
-
def gs(
|
|
313
|
-
GCollection.new(self,
|
|
312
|
+
def gs(opts = {})
|
|
313
|
+
GCollection.new(self, opts.merge(tag_name: "g"))
|
|
314
314
|
end
|
|
315
315
|
Watir.tag_to_class[:g] = G
|
|
316
316
|
|
|
317
317
|
# @return [Line]
|
|
318
|
-
def line(
|
|
319
|
-
Line.new(self,
|
|
318
|
+
def line(opts = {})
|
|
319
|
+
Line.new(self, opts.merge(tag_name: "line"))
|
|
320
320
|
end
|
|
321
321
|
# @return [LineCollection]
|
|
322
|
-
def lines(
|
|
323
|
-
LineCollection.new(self,
|
|
322
|
+
def lines(opts = {})
|
|
323
|
+
LineCollection.new(self, opts.merge(tag_name: "line"))
|
|
324
324
|
end
|
|
325
325
|
Watir.tag_to_class[:line] = Line
|
|
326
326
|
|
|
327
327
|
# @return [LinearGradient]
|
|
328
|
-
def linear_gradient(
|
|
329
|
-
LinearGradient.new(self,
|
|
328
|
+
def linear_gradient(opts = {})
|
|
329
|
+
LinearGradient.new(self, opts.merge(tag_name: "linearGradient"))
|
|
330
330
|
end
|
|
331
331
|
# @return [LinearGradientCollection]
|
|
332
|
-
def linear_gradients(
|
|
333
|
-
LinearGradientCollection.new(self,
|
|
332
|
+
def linear_gradients(opts = {})
|
|
333
|
+
LinearGradientCollection.new(self, opts.merge(tag_name: "linearGradient"))
|
|
334
334
|
end
|
|
335
335
|
Watir.tag_to_class[:linearGradient] = LinearGradient
|
|
336
336
|
|
|
337
337
|
# @return [Marker]
|
|
338
|
-
def marker(
|
|
339
|
-
Marker.new(self,
|
|
338
|
+
def marker(opts = {})
|
|
339
|
+
Marker.new(self, opts.merge(tag_name: "marker"))
|
|
340
340
|
end
|
|
341
341
|
# @return [MarkerCollection]
|
|
342
|
-
def markers(
|
|
343
|
-
MarkerCollection.new(self,
|
|
342
|
+
def markers(opts = {})
|
|
343
|
+
MarkerCollection.new(self, opts.merge(tag_name: "marker"))
|
|
344
344
|
end
|
|
345
345
|
Watir.tag_to_class[:marker] = Marker
|
|
346
346
|
|
|
347
347
|
# @return [Metadata]
|
|
348
|
-
def metadata(
|
|
349
|
-
Metadata.new(self,
|
|
348
|
+
def metadata(opts = {})
|
|
349
|
+
Metadata.new(self, opts.merge(tag_name: "metadata"))
|
|
350
350
|
end
|
|
351
351
|
# @return [MetadataCollection]
|
|
352
|
-
def metadatas(
|
|
353
|
-
MetadataCollection.new(self,
|
|
352
|
+
def metadatas(opts = {})
|
|
353
|
+
MetadataCollection.new(self, opts.merge(tag_name: "metadata"))
|
|
354
354
|
end
|
|
355
355
|
Watir.tag_to_class[:metadata] = Metadata
|
|
356
356
|
|
|
357
357
|
# @return [Path]
|
|
358
|
-
def path(
|
|
359
|
-
Path.new(self,
|
|
358
|
+
def path(opts = {})
|
|
359
|
+
Path.new(self, opts.merge(tag_name: "path"))
|
|
360
360
|
end
|
|
361
361
|
# @return [PathCollection]
|
|
362
|
-
def paths(
|
|
363
|
-
PathCollection.new(self,
|
|
362
|
+
def paths(opts = {})
|
|
363
|
+
PathCollection.new(self, opts.merge(tag_name: "path"))
|
|
364
364
|
end
|
|
365
365
|
Watir.tag_to_class[:path] = Path
|
|
366
366
|
|
|
367
367
|
# @return [Pattern]
|
|
368
|
-
def pattern(
|
|
369
|
-
Pattern.new(self,
|
|
368
|
+
def pattern(opts = {})
|
|
369
|
+
Pattern.new(self, opts.merge(tag_name: "pattern"))
|
|
370
370
|
end
|
|
371
371
|
# @return [PatternCollection]
|
|
372
|
-
def patterns(
|
|
373
|
-
PatternCollection.new(self,
|
|
372
|
+
def patterns(opts = {})
|
|
373
|
+
PatternCollection.new(self, opts.merge(tag_name: "pattern"))
|
|
374
374
|
end
|
|
375
375
|
Watir.tag_to_class[:pattern] = Pattern
|
|
376
376
|
|
|
377
377
|
# @return [Polygon]
|
|
378
|
-
def polygon(
|
|
379
|
-
Polygon.new(self,
|
|
378
|
+
def polygon(opts = {})
|
|
379
|
+
Polygon.new(self, opts.merge(tag_name: "polygon"))
|
|
380
380
|
end
|
|
381
381
|
# @return [PolygonCollection]
|
|
382
|
-
def polygons(
|
|
383
|
-
PolygonCollection.new(self,
|
|
382
|
+
def polygons(opts = {})
|
|
383
|
+
PolygonCollection.new(self, opts.merge(tag_name: "polygon"))
|
|
384
384
|
end
|
|
385
385
|
Watir.tag_to_class[:polygon] = Polygon
|
|
386
386
|
|
|
387
387
|
# @return [Polyline]
|
|
388
|
-
def polyline(
|
|
389
|
-
Polyline.new(self,
|
|
388
|
+
def polyline(opts = {})
|
|
389
|
+
Polyline.new(self, opts.merge(tag_name: "polyline"))
|
|
390
390
|
end
|
|
391
391
|
# @return [PolylineCollection]
|
|
392
|
-
def polylines(
|
|
393
|
-
PolylineCollection.new(self,
|
|
392
|
+
def polylines(opts = {})
|
|
393
|
+
PolylineCollection.new(self, opts.merge(tag_name: "polyline"))
|
|
394
394
|
end
|
|
395
395
|
Watir.tag_to_class[:polyline] = Polyline
|
|
396
396
|
|
|
397
397
|
# @return [RadialGradient]
|
|
398
|
-
def radial_gradient(
|
|
399
|
-
RadialGradient.new(self,
|
|
398
|
+
def radial_gradient(opts = {})
|
|
399
|
+
RadialGradient.new(self, opts.merge(tag_name: "radialGradient"))
|
|
400
400
|
end
|
|
401
401
|
# @return [RadialGradientCollection]
|
|
402
|
-
def radial_gradients(
|
|
403
|
-
RadialGradientCollection.new(self,
|
|
402
|
+
def radial_gradients(opts = {})
|
|
403
|
+
RadialGradientCollection.new(self, opts.merge(tag_name: "radialGradient"))
|
|
404
404
|
end
|
|
405
405
|
Watir.tag_to_class[:radialGradient] = RadialGradient
|
|
406
406
|
|
|
407
407
|
# @return [Rect]
|
|
408
|
-
def rect(
|
|
409
|
-
Rect.new(self,
|
|
408
|
+
def rect(opts = {})
|
|
409
|
+
Rect.new(self, opts.merge(tag_name: "rect"))
|
|
410
410
|
end
|
|
411
411
|
# @return [RectCollection]
|
|
412
|
-
def rects(
|
|
413
|
-
RectCollection.new(self,
|
|
412
|
+
def rects(opts = {})
|
|
413
|
+
RectCollection.new(self, opts.merge(tag_name: "rect"))
|
|
414
414
|
end
|
|
415
415
|
Watir.tag_to_class[:rect] = Rect
|
|
416
416
|
|
|
417
417
|
# @return [Stop]
|
|
418
|
-
def stop(
|
|
419
|
-
Stop.new(self,
|
|
418
|
+
def stop(opts = {})
|
|
419
|
+
Stop.new(self, opts.merge(tag_name: "stop"))
|
|
420
420
|
end
|
|
421
421
|
# @return [StopCollection]
|
|
422
|
-
def stops(
|
|
423
|
-
StopCollection.new(self,
|
|
422
|
+
def stops(opts = {})
|
|
423
|
+
StopCollection.new(self, opts.merge(tag_name: "stop"))
|
|
424
424
|
end
|
|
425
425
|
Watir.tag_to_class[:stop] = Stop
|
|
426
426
|
|
|
427
427
|
# @return [SVG]
|
|
428
|
-
def svg(
|
|
429
|
-
SVG.new(self,
|
|
428
|
+
def svg(opts = {})
|
|
429
|
+
SVG.new(self, opts.merge(tag_name: "svg"))
|
|
430
430
|
end
|
|
431
431
|
# @return [SVGCollection]
|
|
432
|
-
def svgs(
|
|
433
|
-
SVGCollection.new(self,
|
|
432
|
+
def svgs(opts = {})
|
|
433
|
+
SVGCollection.new(self, opts.merge(tag_name: "svg"))
|
|
434
434
|
end
|
|
435
435
|
Watir.tag_to_class[:svg] = SVG
|
|
436
436
|
|
|
437
437
|
# @return [Switch]
|
|
438
|
-
def switch(
|
|
439
|
-
Switch.new(self,
|
|
438
|
+
def switch(opts = {})
|
|
439
|
+
Switch.new(self, opts.merge(tag_name: "switch"))
|
|
440
440
|
end
|
|
441
441
|
# @return [SwitchCollection]
|
|
442
|
-
def switches(
|
|
443
|
-
SwitchCollection.new(self,
|
|
442
|
+
def switches(opts = {})
|
|
443
|
+
SwitchCollection.new(self, opts.merge(tag_name: "switch"))
|
|
444
444
|
end
|
|
445
445
|
Watir.tag_to_class[:switch] = Switch
|
|
446
446
|
|
|
447
447
|
# @return [Symbol]
|
|
448
|
-
def symbol(
|
|
449
|
-
Symbol.new(self,
|
|
448
|
+
def symbol(opts = {})
|
|
449
|
+
Symbol.new(self, opts.merge(tag_name: "symbol"))
|
|
450
450
|
end
|
|
451
451
|
# @return [SymbolCollection]
|
|
452
|
-
def symbols(
|
|
453
|
-
SymbolCollection.new(self,
|
|
452
|
+
def symbols(opts = {})
|
|
453
|
+
SymbolCollection.new(self, opts.merge(tag_name: "symbol"))
|
|
454
454
|
end
|
|
455
455
|
Watir.tag_to_class[:symbol] = Symbol
|
|
456
456
|
|
|
457
457
|
# @return [TextPath]
|
|
458
|
-
def text_path(
|
|
459
|
-
TextPath.new(self,
|
|
458
|
+
def text_path(opts = {})
|
|
459
|
+
TextPath.new(self, opts.merge(tag_name: "textPath"))
|
|
460
460
|
end
|
|
461
461
|
# @return [TextPathCollection]
|
|
462
|
-
def text_paths(
|
|
463
|
-
TextPathCollection.new(self,
|
|
462
|
+
def text_paths(opts = {})
|
|
463
|
+
TextPathCollection.new(self, opts.merge(tag_name: "textPath"))
|
|
464
464
|
end
|
|
465
465
|
Watir.tag_to_class[:textPath] = TextPath
|
|
466
466
|
|
|
467
467
|
# @return [TSpan]
|
|
468
|
-
def tspan(
|
|
469
|
-
TSpan.new(self,
|
|
468
|
+
def tspan(opts = {})
|
|
469
|
+
TSpan.new(self, opts.merge(tag_name: "tspan"))
|
|
470
470
|
end
|
|
471
471
|
# @return [TSpanCollection]
|
|
472
|
-
def tspans(
|
|
473
|
-
TSpanCollection.new(self,
|
|
472
|
+
def tspans(opts = {})
|
|
473
|
+
TSpanCollection.new(self, opts.merge(tag_name: "tspan"))
|
|
474
474
|
end
|
|
475
475
|
Watir.tag_to_class[:tspan] = TSpan
|
|
476
476
|
|
|
477
477
|
# @return [Use]
|
|
478
|
-
def use(
|
|
479
|
-
Use.new(self,
|
|
478
|
+
def use(opts = {})
|
|
479
|
+
Use.new(self, opts.merge(tag_name: "use"))
|
|
480
480
|
end
|
|
481
481
|
# @return [UseCollection]
|
|
482
|
-
def uses(
|
|
483
|
-
UseCollection.new(self,
|
|
482
|
+
def uses(opts = {})
|
|
483
|
+
UseCollection.new(self, opts.merge(tag_name: "use"))
|
|
484
484
|
end
|
|
485
485
|
Watir.tag_to_class[:use] = Use
|
|
486
486
|
|
|
487
487
|
# @return [View]
|
|
488
|
-
def view(
|
|
489
|
-
View.new(self,
|
|
488
|
+
def view(opts = {})
|
|
489
|
+
View.new(self, opts.merge(tag_name: "view"))
|
|
490
490
|
end
|
|
491
491
|
# @return [ViewCollection]
|
|
492
|
-
def views(
|
|
493
|
-
ViewCollection.new(self,
|
|
492
|
+
def views(opts = {})
|
|
493
|
+
ViewCollection.new(self, opts.merge(tag_name: "view"))
|
|
494
494
|
end
|
|
495
495
|
Watir.tag_to_class[:view] = View
|
|
496
496
|
end # Container
|