watir-webdriver 0.7.0 → 0.8.0
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/.gitignore +3 -2
- data/.travis.yml +2 -3
- data/CHANGES.md +10 -1
- data/Gemfile +1 -1
- data/README.md +22 -17
- data/Rakefile +55 -52
- data/lib/watir-webdriver.rb +3 -2
- data/lib/watir-webdriver/alert.rb +0 -1
- data/lib/watir-webdriver/atoms/README +1 -1
- data/lib/watir-webdriver/browser.rb +4 -5
- data/lib/watir-webdriver/cell_container.rb +2 -2
- data/lib/watir-webdriver/container.rb +2 -3
- data/lib/watir-webdriver/cookies.rb +8 -8
- data/lib/watir-webdriver/element_collection.rb +3 -4
- data/lib/watir-webdriver/elements/area.rb +0 -1
- data/lib/watir-webdriver/elements/button.rb +0 -1
- data/lib/watir-webdriver/elements/checkbox.rb +2 -4
- data/lib/watir-webdriver/elements/element.rb +69 -45
- data/lib/watir-webdriver/elements/file_field.rb +2 -3
- data/lib/watir-webdriver/elements/font.rb +2 -2
- data/lib/watir-webdriver/elements/form.rb +0 -1
- data/lib/watir-webdriver/elements/hidden.rb +2 -3
- data/lib/watir-webdriver/elements/html_elements.rb +2282 -0
- data/lib/watir-webdriver/elements/iframe.rb +6 -7
- data/lib/watir-webdriver/elements/image.rb +0 -1
- data/lib/watir-webdriver/elements/input.rb +0 -1
- data/lib/watir-webdriver/elements/link.rb +0 -1
- data/lib/watir-webdriver/elements/option.rb +3 -4
- data/lib/watir-webdriver/elements/radio.rb +2 -3
- data/lib/watir-webdriver/elements/select.rb +0 -1
- data/lib/watir-webdriver/elements/svg_elements.rb +787 -0
- data/lib/watir-webdriver/elements/table.rb +0 -2
- data/lib/watir-webdriver/elements/table_section.rb +1 -1
- data/lib/watir-webdriver/elements/text_field.rb +2 -3
- data/lib/watir-webdriver/exception.rb +0 -2
- data/lib/watir-webdriver/extensions/nokogiri.rb +1 -1
- data/lib/watir-webdriver/generator.rb +3 -0
- data/lib/watir-webdriver/generator/base.rb +11 -0
- data/lib/watir-webdriver/{html → generator/base}/generator.rb +23 -33
- data/lib/watir-webdriver/{html → generator/base}/idl_sorter.rb +3 -5
- data/lib/watir-webdriver/{html → generator/base}/spec_extractor.rb +15 -41
- data/lib/watir-webdriver/generator/base/util.rb +21 -0
- data/lib/watir-webdriver/{html → generator/base}/visitor.rb +15 -15
- data/lib/watir-webdriver/{html.rb → generator/html.rb} +3 -11
- data/lib/watir-webdriver/generator/html/generator.rb +36 -0
- data/lib/watir-webdriver/generator/html/spec_extractor.rb +50 -0
- data/lib/watir-webdriver/generator/html/visitor.rb +21 -0
- data/lib/watir-webdriver/generator/svg.rb +7 -0
- data/lib/watir-webdriver/generator/svg/generator.rb +38 -0
- data/lib/watir-webdriver/generator/svg/spec_extractor.rb +46 -0
- data/lib/watir-webdriver/generator/svg/visitor.rb +21 -0
- data/lib/watir-webdriver/has_window.rb +3 -3
- data/lib/watir-webdriver/locators/button_locator.rb +7 -2
- data/lib/watir-webdriver/locators/child_cell_locator.rb +1 -1
- data/lib/watir-webdriver/locators/child_row_locator.rb +1 -1
- data/lib/watir-webdriver/locators/element_locator.rb +44 -9
- data/lib/watir-webdriver/locators/text_area_locator.rb +4 -0
- data/lib/watir-webdriver/locators/text_field_locator.rb +7 -2
- data/lib/watir-webdriver/screenshot.rb +0 -1
- data/lib/watir-webdriver/version.rb +1 -1
- data/lib/watir-webdriver/wait.rb +10 -11
- data/lib/watir-webdriver/window.rb +5 -5
- data/lib/watir-webdriver/xpath_support.rb +0 -1
- data/spec/always_locate_spec.rb +4 -4
- data/spec/browser_spec.rb +3 -3
- data/spec/click_spec.rb +11 -4
- data/spec/container_spec.rb +2 -2
- data/spec/element_locator_spec.rb +145 -84
- data/spec/element_spec.rb +29 -16
- data/spec/html/clicks.html +3 -0
- data/spec/html/removed_element.html +7 -0
- data/spec/implementation.rb +5 -5
- data/spec/input_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -2
- data/spec/special_chars_spec.rb +2 -2
- data/support/doctest_helper.rb +4 -4
- data/support/version_differ.rb +2 -2
- data/watir-webdriver.gemspec +3 -3
- metadata +27 -17
- data/lib/watir-webdriver/elements/generated.rb +0 -3106
- data/lib/watir-webdriver/html/util.rb +0 -22
@@ -1,11 +1,10 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
module Watir
|
3
2
|
class IFrame < HTMLElement
|
4
3
|
|
5
4
|
def locate
|
6
5
|
@parent.assert_exists
|
7
6
|
|
8
|
-
locator = locator_class.new(@parent.wd, @selector.merge(:
|
7
|
+
locator = locator_class.new(@parent.wd, @selector.merge(tag_name: frame_tag), self.class.attribute_list)
|
9
8
|
element = locator.locate
|
10
9
|
element or raise UnknownFrameException, "unable to locate #{@selector[:tag_name]} using #{selector_string}"
|
11
10
|
|
@@ -17,7 +16,7 @@ module Watir
|
|
17
16
|
end
|
18
17
|
|
19
18
|
def assert_exists
|
20
|
-
if @selector.
|
19
|
+
if @selector.key? :element
|
21
20
|
raise UnknownFrameException, "wrapping a WebDriver element as a Frame is not currently supported"
|
22
21
|
end
|
23
22
|
|
@@ -29,7 +28,7 @@ module Watir
|
|
29
28
|
|
30
29
|
# this will actually give us the innerHTML instead of the outerHTML of the <frame>,
|
31
30
|
# but given the choice this seems more useful
|
32
|
-
element_call { execute_atom(:getOuterHtml, @element.find_element(:
|
31
|
+
element_call { execute_atom(:getOuterHtml, @element.find_element(tag_name: "html")).strip }
|
33
32
|
end
|
34
33
|
|
35
34
|
def execute_script(*args)
|
@@ -53,7 +52,7 @@ module Watir
|
|
53
52
|
# index will return nil. That's why `#all_elements` should always
|
54
53
|
# be called after `#elements.`
|
55
54
|
element_indexes = elements.map { |el| all_elements.index(el) }
|
56
|
-
element_indexes.map { |idx| element_class.new(@parent, tag_name: @selector[:tag_name], :
|
55
|
+
element_indexes.map { |idx| element_class.new(@parent, tag_name: @selector[:tag_name], index: idx) }
|
57
56
|
end
|
58
57
|
|
59
58
|
def element_class
|
@@ -96,11 +95,11 @@ module Watir
|
|
96
95
|
module Container
|
97
96
|
|
98
97
|
def frame(*args)
|
99
|
-
Frame.new(self, extract_selector(args).merge(:
|
98
|
+
Frame.new(self, extract_selector(args).merge(tag_name: "frame"))
|
100
99
|
end
|
101
100
|
|
102
101
|
def frames(*args)
|
103
|
-
FrameCollection.new(self, extract_selector(args).merge(:
|
102
|
+
FrameCollection.new(self, extract_selector(args).merge(tag_name: "frame"))
|
104
103
|
end
|
105
104
|
|
106
105
|
end # Container
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
module Watir
|
3
2
|
|
4
3
|
#
|
@@ -11,7 +10,7 @@ module Watir
|
|
11
10
|
# Selects this option.
|
12
11
|
#
|
13
12
|
# @example
|
14
|
-
# browser.select(:
|
13
|
+
# browser.select(id: "foo").options.first.select
|
15
14
|
#
|
16
15
|
|
17
16
|
alias_method :select, :click
|
@@ -20,7 +19,7 @@ module Watir
|
|
20
19
|
# Toggles the selected state of this option.
|
21
20
|
#
|
22
21
|
# @example
|
23
|
-
# browser.select(:
|
22
|
+
# browser.select(id: "foo").options.first.toggle
|
24
23
|
#
|
25
24
|
|
26
25
|
alias_method :toggle, :click
|
@@ -29,7 +28,7 @@ module Watir
|
|
29
28
|
# Clears (i.e. toggles selected state) option.
|
30
29
|
#
|
31
30
|
# @example
|
32
|
-
# browser.select(:
|
31
|
+
# browser.select(id: "foo").options.first.clear
|
33
32
|
#
|
34
33
|
|
35
34
|
def clear
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
module Watir
|
3
2
|
class Radio < Input
|
4
3
|
|
@@ -25,11 +24,11 @@ module Watir
|
|
25
24
|
|
26
25
|
module Container
|
27
26
|
def radio(*args)
|
28
|
-
Radio.new(self, extract_selector(args).merge(:
|
27
|
+
Radio.new(self, extract_selector(args).merge(tag_name: "input", type: "radio"))
|
29
28
|
end
|
30
29
|
|
31
30
|
def radios(*args)
|
32
|
-
RadioCollection.new(self, extract_selector(args).merge(:
|
31
|
+
RadioCollection.new(self, extract_selector(args).merge(tag_name: "input", type: "radio" ))
|
33
32
|
end
|
34
33
|
end # Container
|
35
34
|
|
@@ -0,0 +1,787 @@
|
|
1
|
+
# Autogenerated from SVG specification. Edits may be lost.
|
2
|
+
module Watir
|
3
|
+
class SVGElement < HTMLElement
|
4
|
+
attribute(String, :class_name, :className)
|
5
|
+
attribute(String, :style, :style)
|
6
|
+
attribute(String, :ownersvg_element, :ownerSVGElement)
|
7
|
+
attribute(String, :viewport_element, :viewportElement)
|
8
|
+
attribute(Fixnum, :tab_index, :tabIndex)
|
9
|
+
end
|
10
|
+
class SVGElementCollection < ElementCollection
|
11
|
+
def element_class
|
12
|
+
SVGElement
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class MPath < SVGElement
|
17
|
+
attribute(String, :href, :href)
|
18
|
+
end
|
19
|
+
class MPathCollection < ElementCollection
|
20
|
+
def element_class
|
21
|
+
MPath
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class Animation < SVGElement
|
26
|
+
attribute(String, :target_element, :targetElement)
|
27
|
+
attribute(String, :onbegin, :onbegin)
|
28
|
+
attribute(String, :onend, :onend)
|
29
|
+
attribute(String, :onrepeat, :onrepeat)
|
30
|
+
attribute(String, :required_features, :requiredFeatures)
|
31
|
+
attribute(String, :required_extensions, :requiredExtensions)
|
32
|
+
attribute(String, :system_language, :systemLanguage)
|
33
|
+
end
|
34
|
+
class AnimationCollection < ElementCollection
|
35
|
+
def element_class
|
36
|
+
Animation
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class AnimateTransform < Animation
|
41
|
+
end
|
42
|
+
class AnimateTransformCollection < ElementCollection
|
43
|
+
def element_class
|
44
|
+
AnimateTransform
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
class AnimateMotion < Animation
|
49
|
+
end
|
50
|
+
class AnimateMotionCollection < ElementCollection
|
51
|
+
def element_class
|
52
|
+
AnimateMotion
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
class Set < Animation
|
57
|
+
end
|
58
|
+
class SetCollection < ElementCollection
|
59
|
+
def element_class
|
60
|
+
Set
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
class Animate < Animation
|
65
|
+
end
|
66
|
+
class AnimateCollection < ElementCollection
|
67
|
+
def element_class
|
68
|
+
Animate
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class View < SVGElement
|
73
|
+
attribute(String, :view_target, :viewTarget)
|
74
|
+
attribute(String, :view_box, :viewBox)
|
75
|
+
attribute(String, :preserve_aspect_ratio, :preserveAspectRatio)
|
76
|
+
attribute(Fixnum, :zoom_and_pan, :zoomAndPan)
|
77
|
+
end
|
78
|
+
class ViewCollection < ElementCollection
|
79
|
+
def element_class
|
80
|
+
View
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class Cursor < SVGElement
|
85
|
+
attribute(Fixnum, :x, :x)
|
86
|
+
attribute(Fixnum, :y, :y)
|
87
|
+
attribute(String, :href, :href)
|
88
|
+
end
|
89
|
+
class CursorCollection < ElementCollection
|
90
|
+
def element_class
|
91
|
+
Cursor
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class Pattern < SVGElement
|
96
|
+
attribute(String, :pattern_units, :patternUnits)
|
97
|
+
attribute(String, :pattern_content_units, :patternContentUnits)
|
98
|
+
attribute(String, :pattern_transform, :patternTransform)
|
99
|
+
attribute(Fixnum, :x, :x)
|
100
|
+
attribute(Fixnum, :y, :y)
|
101
|
+
attribute(Fixnum, :width, :width)
|
102
|
+
attribute(Fixnum, :height, :height)
|
103
|
+
attribute(String, :view_box, :viewBox)
|
104
|
+
attribute(String, :preserve_aspect_ratio, :preserveAspectRatio)
|
105
|
+
attribute(String, :href, :href)
|
106
|
+
end
|
107
|
+
class PatternCollection < ElementCollection
|
108
|
+
def element_class
|
109
|
+
Pattern
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
class Stop < SVGElement
|
114
|
+
attribute(String, :offset, :offset)
|
115
|
+
end
|
116
|
+
class StopCollection < ElementCollection
|
117
|
+
def element_class
|
118
|
+
Stop
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
class MeshPatch < SVGElement
|
123
|
+
end
|
124
|
+
class MeshPatchCollection < ElementCollection
|
125
|
+
def element_class
|
126
|
+
MeshPatch
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
class MeshRow < SVGElement
|
131
|
+
end
|
132
|
+
class MeshRowCollection < ElementCollection
|
133
|
+
def element_class
|
134
|
+
MeshRow
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
class Gradient < SVGElement
|
139
|
+
attribute(String, :gradient_units, :gradientUnits)
|
140
|
+
attribute(String, :gradient_transform, :gradientTransform)
|
141
|
+
attribute(String, :spread_method, :spreadMethod)
|
142
|
+
attribute(String, :href, :href)
|
143
|
+
end
|
144
|
+
class GradientCollection < ElementCollection
|
145
|
+
def element_class
|
146
|
+
Gradient
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
class MeshGradient < Gradient
|
151
|
+
attribute(Fixnum, :x, :x)
|
152
|
+
attribute(Fixnum, :y, :y)
|
153
|
+
end
|
154
|
+
class MeshGradientCollection < ElementCollection
|
155
|
+
def element_class
|
156
|
+
MeshGradient
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
class RadialGradient < Gradient
|
161
|
+
attribute(Fixnum, :cx, :cx)
|
162
|
+
attribute(Fixnum, :cy, :cy)
|
163
|
+
attribute(Fixnum, :r, :r)
|
164
|
+
attribute(Fixnum, :fx, :fx)
|
165
|
+
attribute(Fixnum, :fy, :fy)
|
166
|
+
attribute(Fixnum, :fr, :fr)
|
167
|
+
end
|
168
|
+
class RadialGradientCollection < ElementCollection
|
169
|
+
def element_class
|
170
|
+
RadialGradient
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
class LinearGradient < Gradient
|
175
|
+
attribute(Fixnum, :x1, :x1)
|
176
|
+
attribute(Fixnum, :y1, :y1)
|
177
|
+
attribute(Fixnum, :x2, :x2)
|
178
|
+
attribute(Fixnum, :y2, :y2)
|
179
|
+
end
|
180
|
+
class LinearGradientCollection < ElementCollection
|
181
|
+
def element_class
|
182
|
+
LinearGradient
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class Marker < SVGElement
|
187
|
+
attribute(Fixnum, :refx, :refX)
|
188
|
+
attribute(Fixnum, :refy, :refY)
|
189
|
+
attribute(String, :marker_units, :markerUnits)
|
190
|
+
attribute(Fixnum, :marker_width, :markerWidth)
|
191
|
+
attribute(Fixnum, :marker_height, :markerHeight)
|
192
|
+
attribute(String, :orient_type, :orientType)
|
193
|
+
attribute(String, :orient_angle, :orientAngle)
|
194
|
+
attribute(String, :orient, :orient)
|
195
|
+
attribute(String, :view_box, :viewBox)
|
196
|
+
attribute(String, :preserve_aspect_ratio, :preserveAspectRatio)
|
197
|
+
end
|
198
|
+
class MarkerCollection < ElementCollection
|
199
|
+
def element_class
|
200
|
+
Marker
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
class Symbol < SVGElement
|
205
|
+
attribute(String, :view_box, :viewBox)
|
206
|
+
attribute(String, :preserve_aspect_ratio, :preserveAspectRatio)
|
207
|
+
end
|
208
|
+
class SymbolCollection < ElementCollection
|
209
|
+
def element_class
|
210
|
+
Symbol
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class Metadata < SVGElement
|
215
|
+
end
|
216
|
+
class MetadataCollection < ElementCollection
|
217
|
+
def element_class
|
218
|
+
Metadata
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class Desc < SVGElement
|
223
|
+
end
|
224
|
+
class DescCollection < ElementCollection
|
225
|
+
def element_class
|
226
|
+
Desc
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
class Graphics < SVGElement
|
231
|
+
attribute(String, :transform, :transform)
|
232
|
+
attribute(String, :required_features, :requiredFeatures)
|
233
|
+
attribute(String, :required_extensions, :requiredExtensions)
|
234
|
+
attribute(String, :system_language, :systemLanguage)
|
235
|
+
end
|
236
|
+
class GraphicsCollection < ElementCollection
|
237
|
+
def element_class
|
238
|
+
Graphics
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
class ForeignObject < Graphics
|
243
|
+
attribute(Fixnum, :x, :x)
|
244
|
+
attribute(Fixnum, :y, :y)
|
245
|
+
attribute(Fixnum, :width, :width)
|
246
|
+
attribute(Fixnum, :height, :height)
|
247
|
+
end
|
248
|
+
class ForeignObjectCollection < ElementCollection
|
249
|
+
def element_class
|
250
|
+
ForeignObject
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
class TextContent < Graphics
|
255
|
+
attribute(Fixnum, :text_length, :textLength)
|
256
|
+
attribute(String, :length_adjust, :lengthAdjust)
|
257
|
+
end
|
258
|
+
class TextContentCollection < ElementCollection
|
259
|
+
def element_class
|
260
|
+
TextContent
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class TextPath < TextContent
|
265
|
+
attribute(Fixnum, :start_offset, :startOffset)
|
266
|
+
attribute(String, :method, :method)
|
267
|
+
attribute(String, :spacing, :spacing)
|
268
|
+
attribute(String, :href, :href)
|
269
|
+
attribute(String, :path_seg_list, :pathSegList)
|
270
|
+
attribute(String, :animated_path_seg_list, :animatedPathSegList)
|
271
|
+
end
|
272
|
+
class TextPathCollection < ElementCollection
|
273
|
+
def element_class
|
274
|
+
TextPath
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
class TextPositioning < TextContent
|
279
|
+
attribute(String, :x, :x)
|
280
|
+
attribute(String, :y, :y)
|
281
|
+
attribute(String, :dx, :dx)
|
282
|
+
attribute(String, :dy, :dy)
|
283
|
+
attribute(String, :rotate, :rotate)
|
284
|
+
end
|
285
|
+
class TextPositioningCollection < ElementCollection
|
286
|
+
def element_class
|
287
|
+
TextPositioning
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
class TSpan < TextPositioning
|
292
|
+
end
|
293
|
+
class TSpanCollection < ElementCollection
|
294
|
+
def element_class
|
295
|
+
TSpan
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
class Switch < Graphics
|
300
|
+
end
|
301
|
+
class SwitchCollection < ElementCollection
|
302
|
+
def element_class
|
303
|
+
Switch
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
class Use < Graphics
|
308
|
+
attribute(Fixnum, :x, :x)
|
309
|
+
attribute(Fixnum, :y, :y)
|
310
|
+
attribute(Fixnum, :width, :width)
|
311
|
+
attribute(Fixnum, :height, :height)
|
312
|
+
attribute(String, :href, :href)
|
313
|
+
end
|
314
|
+
class UseCollection < ElementCollection
|
315
|
+
def element_class
|
316
|
+
Use
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
class Defs < Graphics
|
321
|
+
end
|
322
|
+
class DefsCollection < ElementCollection
|
323
|
+
def element_class
|
324
|
+
Defs
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
class G < Graphics
|
329
|
+
end
|
330
|
+
class GCollection < ElementCollection
|
331
|
+
def element_class
|
332
|
+
G
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
class SVG < Graphics
|
337
|
+
attribute(Fixnum, :x, :x)
|
338
|
+
attribute(Fixnum, :y, :y)
|
339
|
+
attribute(Fixnum, :width, :width)
|
340
|
+
attribute(Fixnum, :height, :height)
|
341
|
+
attribute(String, :viewport, :viewport)
|
342
|
+
attribute("Boolean", :use_current_view?, :useCurrentView)
|
343
|
+
attribute(String, :current_view, :currentView)
|
344
|
+
attribute(Float, :current_scale, :currentScale)
|
345
|
+
attribute(String, :current_translate, :currentTranslate)
|
346
|
+
attribute(String, :view_box, :viewBox)
|
347
|
+
attribute(String, :preserve_aspect_ratio, :preserveAspectRatio)
|
348
|
+
attribute(Fixnum, :zoom_and_pan, :zoomAndPan)
|
349
|
+
end
|
350
|
+
class SVGCollection < ElementCollection
|
351
|
+
def element_class
|
352
|
+
SVG
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
class Geometry < Graphics
|
357
|
+
end
|
358
|
+
class GeometryCollection < ElementCollection
|
359
|
+
def element_class
|
360
|
+
Geometry
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
class Polygon < Geometry
|
365
|
+
attribute(String, :points, :points)
|
366
|
+
attribute(String, :animated_points, :animatedPoints)
|
367
|
+
end
|
368
|
+
class PolygonCollection < ElementCollection
|
369
|
+
def element_class
|
370
|
+
Polygon
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
class Polyline < Geometry
|
375
|
+
attribute(String, :points, :points)
|
376
|
+
attribute(String, :animated_points, :animatedPoints)
|
377
|
+
end
|
378
|
+
class PolylineCollection < ElementCollection
|
379
|
+
def element_class
|
380
|
+
Polyline
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
class Line < Geometry
|
385
|
+
attribute(Fixnum, :x1, :x1)
|
386
|
+
attribute(Fixnum, :y1, :y1)
|
387
|
+
attribute(Fixnum, :x2, :x2)
|
388
|
+
attribute(Fixnum, :y2, :y2)
|
389
|
+
end
|
390
|
+
class LineCollection < ElementCollection
|
391
|
+
def element_class
|
392
|
+
Line
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
class Ellipse < Geometry
|
397
|
+
attribute(Fixnum, :cx, :cx)
|
398
|
+
attribute(Fixnum, :cy, :cy)
|
399
|
+
attribute(Fixnum, :rx, :rx)
|
400
|
+
attribute(Fixnum, :ry, :ry)
|
401
|
+
end
|
402
|
+
class EllipseCollection < ElementCollection
|
403
|
+
def element_class
|
404
|
+
Ellipse
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
class Circle < Geometry
|
409
|
+
attribute(Fixnum, :cx, :cx)
|
410
|
+
attribute(Fixnum, :cy, :cy)
|
411
|
+
attribute(Fixnum, :r, :r)
|
412
|
+
end
|
413
|
+
class CircleCollection < ElementCollection
|
414
|
+
def element_class
|
415
|
+
Circle
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
class Rect < Geometry
|
420
|
+
attribute(Fixnum, :x, :x)
|
421
|
+
attribute(Fixnum, :y, :y)
|
422
|
+
attribute(Fixnum, :width, :width)
|
423
|
+
attribute(Fixnum, :height, :height)
|
424
|
+
attribute(Fixnum, :rx, :rx)
|
425
|
+
attribute(Fixnum, :ry, :ry)
|
426
|
+
end
|
427
|
+
class RectCollection < ElementCollection
|
428
|
+
def element_class
|
429
|
+
Rect
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
class Path < Geometry
|
434
|
+
attribute(String, :path_length, :pathLength)
|
435
|
+
attribute(String, :path_seg_list, :pathSegList)
|
436
|
+
attribute(String, :animated_path_seg_list, :animatedPathSegList)
|
437
|
+
end
|
438
|
+
class PathCollection < ElementCollection
|
439
|
+
def element_class
|
440
|
+
Path
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
444
|
+
|
445
|
+
module Container
|
446
|
+
|
447
|
+
# @return [Animate]
|
448
|
+
def animate(*args)
|
449
|
+
Animate.new(self, extract_selector(args).merge(tag_name: "animate"))
|
450
|
+
end
|
451
|
+
# @return [AnimateCollection]
|
452
|
+
def animates(*args)
|
453
|
+
AnimateCollection.new(self, extract_selector(args).merge(tag_name: "animate"))
|
454
|
+
end
|
455
|
+
Watir.tag_to_class[:animate] = Animate
|
456
|
+
|
457
|
+
# @return [AnimateMotion]
|
458
|
+
def animate_motion(*args)
|
459
|
+
AnimateMotion.new(self, extract_selector(args).merge(tag_name: "animateMotion"))
|
460
|
+
end
|
461
|
+
# @return [AnimateMotionCollection]
|
462
|
+
def animate_motions(*args)
|
463
|
+
AnimateMotionCollection.new(self, extract_selector(args).merge(tag_name: "animateMotion"))
|
464
|
+
end
|
465
|
+
Watir.tag_to_class[:animateMotion] = AnimateMotion
|
466
|
+
|
467
|
+
# @return [AnimateTransform]
|
468
|
+
def animate_transform(*args)
|
469
|
+
AnimateTransform.new(self, extract_selector(args).merge(tag_name: "animateTransform"))
|
470
|
+
end
|
471
|
+
# @return [AnimateTransformCollection]
|
472
|
+
def animate_transforms(*args)
|
473
|
+
AnimateTransformCollection.new(self, extract_selector(args).merge(tag_name: "animateTransform"))
|
474
|
+
end
|
475
|
+
Watir.tag_to_class[:animateTransform] = AnimateTransform
|
476
|
+
|
477
|
+
# @return [Circle]
|
478
|
+
def circle(*args)
|
479
|
+
Circle.new(self, extract_selector(args).merge(tag_name: "circle"))
|
480
|
+
end
|
481
|
+
# @return [CircleCollection]
|
482
|
+
def circles(*args)
|
483
|
+
CircleCollection.new(self, extract_selector(args).merge(tag_name: "circle"))
|
484
|
+
end
|
485
|
+
Watir.tag_to_class[:circle] = Circle
|
486
|
+
|
487
|
+
# @return [Cursor]
|
488
|
+
def cursor(*args)
|
489
|
+
Cursor.new(self, extract_selector(args).merge(tag_name: "cursor"))
|
490
|
+
end
|
491
|
+
# @return [CursorCollection]
|
492
|
+
def cursors(*args)
|
493
|
+
CursorCollection.new(self, extract_selector(args).merge(tag_name: "cursor"))
|
494
|
+
end
|
495
|
+
Watir.tag_to_class[:cursor] = Cursor
|
496
|
+
|
497
|
+
# @return [Defs]
|
498
|
+
def defs(*args)
|
499
|
+
Defs.new(self, extract_selector(args).merge(tag_name: "defs"))
|
500
|
+
end
|
501
|
+
# @return [DefsCollection]
|
502
|
+
def defss(*args)
|
503
|
+
DefsCollection.new(self, extract_selector(args).merge(tag_name: "defs"))
|
504
|
+
end
|
505
|
+
Watir.tag_to_class[:defs] = Defs
|
506
|
+
|
507
|
+
# @return [Desc]
|
508
|
+
def desc(*args)
|
509
|
+
Desc.new(self, extract_selector(args).merge(tag_name: "desc"))
|
510
|
+
end
|
511
|
+
# @return [DescCollection]
|
512
|
+
def descs(*args)
|
513
|
+
DescCollection.new(self, extract_selector(args).merge(tag_name: "desc"))
|
514
|
+
end
|
515
|
+
Watir.tag_to_class[:desc] = Desc
|
516
|
+
|
517
|
+
# @return [Metadata]
|
518
|
+
def discard(*args)
|
519
|
+
Metadata.new(self, extract_selector(args).merge(tag_name: "discard"))
|
520
|
+
end
|
521
|
+
# @return [MetadataCollection]
|
522
|
+
def discards(*args)
|
523
|
+
MetadataCollection.new(self, extract_selector(args).merge(tag_name: "discard"))
|
524
|
+
end
|
525
|
+
Watir.tag_to_class[:discard] = Metadata
|
526
|
+
|
527
|
+
# @return [Ellipse]
|
528
|
+
def ellipse(*args)
|
529
|
+
Ellipse.new(self, extract_selector(args).merge(tag_name: "ellipse"))
|
530
|
+
end
|
531
|
+
# @return [EllipseCollection]
|
532
|
+
def ellipses(*args)
|
533
|
+
EllipseCollection.new(self, extract_selector(args).merge(tag_name: "ellipse"))
|
534
|
+
end
|
535
|
+
Watir.tag_to_class[:ellipse] = Ellipse
|
536
|
+
|
537
|
+
# @return [ForeignObject]
|
538
|
+
def foreign_object(*args)
|
539
|
+
ForeignObject.new(self, extract_selector(args).merge(tag_name: "foreignObject"))
|
540
|
+
end
|
541
|
+
# @return [ForeignObjectCollection]
|
542
|
+
def foreign_objects(*args)
|
543
|
+
ForeignObjectCollection.new(self, extract_selector(args).merge(tag_name: "foreignObject"))
|
544
|
+
end
|
545
|
+
Watir.tag_to_class[:foreignObject] = ForeignObject
|
546
|
+
|
547
|
+
# @return [G]
|
548
|
+
def g(*args)
|
549
|
+
G.new(self, extract_selector(args).merge(tag_name: "g"))
|
550
|
+
end
|
551
|
+
# @return [GCollection]
|
552
|
+
def gs(*args)
|
553
|
+
GCollection.new(self, extract_selector(args).merge(tag_name: "g"))
|
554
|
+
end
|
555
|
+
Watir.tag_to_class[:g] = G
|
556
|
+
|
557
|
+
# @return [Line]
|
558
|
+
def line(*args)
|
559
|
+
Line.new(self, extract_selector(args).merge(tag_name: "line"))
|
560
|
+
end
|
561
|
+
# @return [LineCollection]
|
562
|
+
def lines(*args)
|
563
|
+
LineCollection.new(self, extract_selector(args).merge(tag_name: "line"))
|
564
|
+
end
|
565
|
+
Watir.tag_to_class[:line] = Line
|
566
|
+
|
567
|
+
# @return [LinearGradient]
|
568
|
+
def linear_gradient(*args)
|
569
|
+
LinearGradient.new(self, extract_selector(args).merge(tag_name: "linearGradient"))
|
570
|
+
end
|
571
|
+
# @return [LinearGradientCollection]
|
572
|
+
def linear_gradients(*args)
|
573
|
+
LinearGradientCollection.new(self, extract_selector(args).merge(tag_name: "linearGradient"))
|
574
|
+
end
|
575
|
+
Watir.tag_to_class[:linearGradient] = LinearGradient
|
576
|
+
|
577
|
+
# @return [Marker]
|
578
|
+
def marker(*args)
|
579
|
+
Marker.new(self, extract_selector(args).merge(tag_name: "marker"))
|
580
|
+
end
|
581
|
+
# @return [MarkerCollection]
|
582
|
+
def markers(*args)
|
583
|
+
MarkerCollection.new(self, extract_selector(args).merge(tag_name: "marker"))
|
584
|
+
end
|
585
|
+
Watir.tag_to_class[:marker] = Marker
|
586
|
+
|
587
|
+
# @return [MeshGradient]
|
588
|
+
def mesh_gradient(*args)
|
589
|
+
MeshGradient.new(self, extract_selector(args).merge(tag_name: "meshGradient"))
|
590
|
+
end
|
591
|
+
# @return [MeshGradientCollection]
|
592
|
+
def mesh_gradients(*args)
|
593
|
+
MeshGradientCollection.new(self, extract_selector(args).merge(tag_name: "meshGradient"))
|
594
|
+
end
|
595
|
+
Watir.tag_to_class[:meshGradient] = MeshGradient
|
596
|
+
|
597
|
+
# @return [MeshPatch]
|
598
|
+
def mesh_patch(*args)
|
599
|
+
MeshPatch.new(self, extract_selector(args).merge(tag_name: "meshPatch"))
|
600
|
+
end
|
601
|
+
# @return [MeshPatchCollection]
|
602
|
+
def mesh_patches(*args)
|
603
|
+
MeshPatchCollection.new(self, extract_selector(args).merge(tag_name: "meshPatch"))
|
604
|
+
end
|
605
|
+
Watir.tag_to_class[:meshPatch] = MeshPatch
|
606
|
+
|
607
|
+
# @return [MeshRow]
|
608
|
+
def mesh_row(*args)
|
609
|
+
MeshRow.new(self, extract_selector(args).merge(tag_name: "meshRow"))
|
610
|
+
end
|
611
|
+
# @return [MeshRowCollection]
|
612
|
+
def mesh_rows(*args)
|
613
|
+
MeshRowCollection.new(self, extract_selector(args).merge(tag_name: "meshRow"))
|
614
|
+
end
|
615
|
+
Watir.tag_to_class[:meshRow] = MeshRow
|
616
|
+
|
617
|
+
# @return [Metadata]
|
618
|
+
def metadata(*args)
|
619
|
+
Metadata.new(self, extract_selector(args).merge(tag_name: "metadata"))
|
620
|
+
end
|
621
|
+
# @return [MetadataCollection]
|
622
|
+
def metadatas(*args)
|
623
|
+
MetadataCollection.new(self, extract_selector(args).merge(tag_name: "metadata"))
|
624
|
+
end
|
625
|
+
Watir.tag_to_class[:metadata] = Metadata
|
626
|
+
|
627
|
+
# @return [MPath]
|
628
|
+
def mpath(*args)
|
629
|
+
MPath.new(self, extract_selector(args).merge(tag_name: "mpath"))
|
630
|
+
end
|
631
|
+
# @return [MPathCollection]
|
632
|
+
def mpaths(*args)
|
633
|
+
MPathCollection.new(self, extract_selector(args).merge(tag_name: "mpath"))
|
634
|
+
end
|
635
|
+
Watir.tag_to_class[:mpath] = MPath
|
636
|
+
|
637
|
+
# @return [Path]
|
638
|
+
def path(*args)
|
639
|
+
Path.new(self, extract_selector(args).merge(tag_name: "path"))
|
640
|
+
end
|
641
|
+
# @return [PathCollection]
|
642
|
+
def paths(*args)
|
643
|
+
PathCollection.new(self, extract_selector(args).merge(tag_name: "path"))
|
644
|
+
end
|
645
|
+
Watir.tag_to_class[:path] = Path
|
646
|
+
|
647
|
+
# @return [Pattern]
|
648
|
+
def pattern(*args)
|
649
|
+
Pattern.new(self, extract_selector(args).merge(tag_name: "pattern"))
|
650
|
+
end
|
651
|
+
# @return [PatternCollection]
|
652
|
+
def patterns(*args)
|
653
|
+
PatternCollection.new(self, extract_selector(args).merge(tag_name: "pattern"))
|
654
|
+
end
|
655
|
+
Watir.tag_to_class[:pattern] = Pattern
|
656
|
+
|
657
|
+
# @return [Polygon]
|
658
|
+
def polygon(*args)
|
659
|
+
Polygon.new(self, extract_selector(args).merge(tag_name: "polygon"))
|
660
|
+
end
|
661
|
+
# @return [PolygonCollection]
|
662
|
+
def polygons(*args)
|
663
|
+
PolygonCollection.new(self, extract_selector(args).merge(tag_name: "polygon"))
|
664
|
+
end
|
665
|
+
Watir.tag_to_class[:polygon] = Polygon
|
666
|
+
|
667
|
+
# @return [Polyline]
|
668
|
+
def polyline(*args)
|
669
|
+
Polyline.new(self, extract_selector(args).merge(tag_name: "polyline"))
|
670
|
+
end
|
671
|
+
# @return [PolylineCollection]
|
672
|
+
def polylines(*args)
|
673
|
+
PolylineCollection.new(self, extract_selector(args).merge(tag_name: "polyline"))
|
674
|
+
end
|
675
|
+
Watir.tag_to_class[:polyline] = Polyline
|
676
|
+
|
677
|
+
# @return [RadialGradient]
|
678
|
+
def radial_gradient(*args)
|
679
|
+
RadialGradient.new(self, extract_selector(args).merge(tag_name: "radialGradient"))
|
680
|
+
end
|
681
|
+
# @return [RadialGradientCollection]
|
682
|
+
def radial_gradients(*args)
|
683
|
+
RadialGradientCollection.new(self, extract_selector(args).merge(tag_name: "radialGradient"))
|
684
|
+
end
|
685
|
+
Watir.tag_to_class[:radialGradient] = RadialGradient
|
686
|
+
|
687
|
+
# @return [Rect]
|
688
|
+
def rect(*args)
|
689
|
+
Rect.new(self, extract_selector(args).merge(tag_name: "rect"))
|
690
|
+
end
|
691
|
+
# @return [RectCollection]
|
692
|
+
def rects(*args)
|
693
|
+
RectCollection.new(self, extract_selector(args).merge(tag_name: "rect"))
|
694
|
+
end
|
695
|
+
Watir.tag_to_class[:rect] = Rect
|
696
|
+
|
697
|
+
# @return [Set]
|
698
|
+
def set(*args)
|
699
|
+
Set.new(self, extract_selector(args).merge(tag_name: "set"))
|
700
|
+
end
|
701
|
+
# @return [SetCollection]
|
702
|
+
def sets(*args)
|
703
|
+
SetCollection.new(self, extract_selector(args).merge(tag_name: "set"))
|
704
|
+
end
|
705
|
+
Watir.tag_to_class[:set] = Set
|
706
|
+
|
707
|
+
# @return [Stop]
|
708
|
+
def stop(*args)
|
709
|
+
Stop.new(self, extract_selector(args).merge(tag_name: "stop"))
|
710
|
+
end
|
711
|
+
# @return [StopCollection]
|
712
|
+
def stops(*args)
|
713
|
+
StopCollection.new(self, extract_selector(args).merge(tag_name: "stop"))
|
714
|
+
end
|
715
|
+
Watir.tag_to_class[:stop] = Stop
|
716
|
+
|
717
|
+
# @return [SVG]
|
718
|
+
def svg(*args)
|
719
|
+
SVG.new(self, extract_selector(args).merge(tag_name: "svg"))
|
720
|
+
end
|
721
|
+
# @return [SVGCollection]
|
722
|
+
def svgs(*args)
|
723
|
+
SVGCollection.new(self, extract_selector(args).merge(tag_name: "svg"))
|
724
|
+
end
|
725
|
+
Watir.tag_to_class[:svg] = SVG
|
726
|
+
|
727
|
+
# @return [Switch]
|
728
|
+
def switch(*args)
|
729
|
+
Switch.new(self, extract_selector(args).merge(tag_name: "switch"))
|
730
|
+
end
|
731
|
+
# @return [SwitchCollection]
|
732
|
+
def switches(*args)
|
733
|
+
SwitchCollection.new(self, extract_selector(args).merge(tag_name: "switch"))
|
734
|
+
end
|
735
|
+
Watir.tag_to_class[:switch] = Switch
|
736
|
+
|
737
|
+
# @return [Symbol]
|
738
|
+
def symbol(*args)
|
739
|
+
Symbol.new(self, extract_selector(args).merge(tag_name: "symbol"))
|
740
|
+
end
|
741
|
+
# @return [SymbolCollection]
|
742
|
+
def symbols(*args)
|
743
|
+
SymbolCollection.new(self, extract_selector(args).merge(tag_name: "symbol"))
|
744
|
+
end
|
745
|
+
Watir.tag_to_class[:symbol] = Symbol
|
746
|
+
|
747
|
+
# @return [TextPath]
|
748
|
+
def text_path(*args)
|
749
|
+
TextPath.new(self, extract_selector(args).merge(tag_name: "textPath"))
|
750
|
+
end
|
751
|
+
# @return [TextPathCollection]
|
752
|
+
def text_paths(*args)
|
753
|
+
TextPathCollection.new(self, extract_selector(args).merge(tag_name: "textPath"))
|
754
|
+
end
|
755
|
+
Watir.tag_to_class[:textPath] = TextPath
|
756
|
+
|
757
|
+
# @return [TSpan]
|
758
|
+
def tspan(*args)
|
759
|
+
TSpan.new(self, extract_selector(args).merge(tag_name: "tspan"))
|
760
|
+
end
|
761
|
+
# @return [TSpanCollection]
|
762
|
+
def tspans(*args)
|
763
|
+
TSpanCollection.new(self, extract_selector(args).merge(tag_name: "tspan"))
|
764
|
+
end
|
765
|
+
Watir.tag_to_class[:tspan] = TSpan
|
766
|
+
|
767
|
+
# @return [Use]
|
768
|
+
def use(*args)
|
769
|
+
Use.new(self, extract_selector(args).merge(tag_name: "use"))
|
770
|
+
end
|
771
|
+
# @return [UseCollection]
|
772
|
+
def uses(*args)
|
773
|
+
UseCollection.new(self, extract_selector(args).merge(tag_name: "use"))
|
774
|
+
end
|
775
|
+
Watir.tag_to_class[:use] = Use
|
776
|
+
|
777
|
+
# @return [View]
|
778
|
+
def view(*args)
|
779
|
+
View.new(self, extract_selector(args).merge(tag_name: "view"))
|
780
|
+
end
|
781
|
+
# @return [ViewCollection]
|
782
|
+
def views(*args)
|
783
|
+
ViewCollection.new(self, extract_selector(args).merge(tag_name: "view"))
|
784
|
+
end
|
785
|
+
Watir.tag_to_class[:view] = View
|
786
|
+
end # Container
|
787
|
+
end # Watir
|