ayanko-watir-webdriver 0.1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/.document +5 -0
  2. data/.gitignore +5 -0
  3. data/.gitmodules +3 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +20 -0
  6. data/README.rdoc +55 -0
  7. data/Rakefile +139 -0
  8. data/VERSION +1 -0
  9. data/lib/watir-webdriver.rb +71 -0
  10. data/lib/watir-webdriver/attribute_helper.rb +128 -0
  11. data/lib/watir-webdriver/browser.rb +164 -0
  12. data/lib/watir-webdriver/browserbot.js +49 -0
  13. data/lib/watir-webdriver/cell_container.rb +19 -0
  14. data/lib/watir-webdriver/container.rb +40 -0
  15. data/lib/watir-webdriver/core_ext/string.rb +22 -0
  16. data/lib/watir-webdriver/element_collection.rb +96 -0
  17. data/lib/watir-webdriver/elements/button.rb +75 -0
  18. data/lib/watir-webdriver/elements/checkbox.rb +73 -0
  19. data/lib/watir-webdriver/elements/element.rb +265 -0
  20. data/lib/watir-webdriver/elements/file_field.rb +69 -0
  21. data/lib/watir-webdriver/elements/font.rb +11 -0
  22. data/lib/watir-webdriver/elements/form.rb +17 -0
  23. data/lib/watir-webdriver/elements/frame.rb +110 -0
  24. data/lib/watir-webdriver/elements/generated.rb +2541 -0
  25. data/lib/watir-webdriver/elements/hidden.rb +24 -0
  26. data/lib/watir-webdriver/elements/image.rb +51 -0
  27. data/lib/watir-webdriver/elements/input.rb +42 -0
  28. data/lib/watir-webdriver/elements/link.rb +7 -0
  29. data/lib/watir-webdriver/elements/option.rb +55 -0
  30. data/lib/watir-webdriver/elements/radio.rb +49 -0
  31. data/lib/watir-webdriver/elements/select.rb +216 -0
  32. data/lib/watir-webdriver/elements/table.rb +37 -0
  33. data/lib/watir-webdriver/elements/table_cell.rb +36 -0
  34. data/lib/watir-webdriver/elements/table_row.rb +45 -0
  35. data/lib/watir-webdriver/elements/table_section.rb +9 -0
  36. data/lib/watir-webdriver/elements/text_field.rb +97 -0
  37. data/lib/watir-webdriver/exception.rb +21 -0
  38. data/lib/watir-webdriver/extensions/alerts.rb +69 -0
  39. data/lib/watir-webdriver/extensions/cookies.rb +39 -0
  40. data/lib/watir-webdriver/extensions/firefox/webdriver.xpi +0 -0
  41. data/lib/watir-webdriver/extensions/nokogiri.rb +14 -0
  42. data/lib/watir-webdriver/extensions/performance.rb +54 -0
  43. data/lib/watir-webdriver/extensions/wait.rb +141 -0
  44. data/lib/watir-webdriver/html.rb +19 -0
  45. data/lib/watir-webdriver/html/generator.rb +112 -0
  46. data/lib/watir-webdriver/html/idl_sorter.rb +49 -0
  47. data/lib/watir-webdriver/html/spec_extractor.rb +111 -0
  48. data/lib/watir-webdriver/html/util.rb +22 -0
  49. data/lib/watir-webdriver/html/visitor.rb +174 -0
  50. data/lib/watir-webdriver/locators/button_locator.rb +74 -0
  51. data/lib/watir-webdriver/locators/child_cell_locator.rb +32 -0
  52. data/lib/watir-webdriver/locators/child_row_locator.rb +37 -0
  53. data/lib/watir-webdriver/locators/element_locator.rb +352 -0
  54. data/lib/watir-webdriver/locators/text_field_locator.rb +65 -0
  55. data/lib/watir-webdriver/row_container.rb +34 -0
  56. data/lib/watir-webdriver/window_switching.rb +105 -0
  57. data/lib/watir-webdriver/xpath_support.rb +28 -0
  58. data/lib/yard/handlers/watir.rb +57 -0
  59. data/spec/alert_spec.rb +49 -0
  60. data/spec/browser_spec.rb +42 -0
  61. data/spec/container_spec.rb +42 -0
  62. data/spec/element_locator_spec.rb +304 -0
  63. data/spec/element_spec.rb +13 -0
  64. data/spec/html/alerts.html +11 -0
  65. data/spec/html/keylogger.html +15 -0
  66. data/spec/html/wait.html +27 -0
  67. data/spec/implementation.rb +17 -0
  68. data/spec/input_spec.rb +39 -0
  69. data/spec/locator_spec_helper.rb +51 -0
  70. data/spec/spec_helper.rb +14 -0
  71. data/spec/wait_spec.rb +98 -0
  72. data/support/html5.html +90243 -0
  73. data/watir-webdriver.gemspec +59 -0
  74. metadata +238 -0
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ module Watir
3
+ class FileField < Input
4
+ def self.from(parent, element)
5
+ if element.attribute(:type) != "file"
6
+ raise TypeError, "expected type=file for #{element.inspect}"
7
+ end
8
+
9
+ super
10
+ end
11
+
12
+ #
13
+ # Set the file field to the given path
14
+ #
15
+ # @param [String] a path
16
+ #
17
+ # @raise [Errno::ENOENT] if the file doesn't exist
18
+ #
19
+
20
+ def set(path)
21
+ raise Errno::ENOENT, path unless File.exist?(path)
22
+ self.value = path
23
+ end
24
+
25
+ #
26
+ # Set the file field to the given path
27
+ #
28
+ # @param [String] a path
29
+ #
30
+ def value=(path)
31
+ assert_exists
32
+ path = path.gsub(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
33
+ @element.send_keys path
34
+ end
35
+
36
+ #
37
+ # Return the value of this field
38
+ #
39
+ # In IE, the path returned depends on the "Include local directory path
40
+ # when uploading files to a server" security setting:
41
+ #
42
+ # @see http://msdn.microsoft.com/en-us/library/ms535128(VS.85).aspx
43
+ #
44
+ # @return [String]
45
+ #
46
+
47
+ def value
48
+ # since 'value' is an attribute on input fields, we override this here
49
+ assert_exists
50
+ @element.value
51
+ end
52
+ end
53
+
54
+ module Container
55
+ def file_field(*args)
56
+ FileField.new(self, extract_selector(args).merge(:tag_name => "input", :type => "file"))
57
+ end
58
+
59
+ def file_fields(*args)
60
+ FileFieldCollection.new(self, extract_selector(args).merge(:tag_name => "input", :type => "file"))
61
+ end
62
+ end # Container
63
+
64
+ class FileFieldCollection < InputCollection
65
+ def element_class
66
+ FileField
67
+ end
68
+ end # FileFieldCollection
69
+ end # Watir
@@ -0,0 +1,11 @@
1
+ module Watir
2
+ module Container
3
+ def font(*args)
4
+ Font.new(self, extract_selector(args).merge(:tag_name => "font"))
5
+ end
6
+
7
+ def fonts(*args)
8
+ FontCollection.new(self, extract_selector(args).merge(:tag_name => "font"))
9
+ end
10
+ end # Container
11
+ end # Watir
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ module Watir
3
+ class Form < HTMLElement
4
+
5
+ #
6
+ # Submits the form.
7
+ #
8
+ # This method should be avoided - invoke the user interface element that triggers the submit instead.
9
+ #
10
+
11
+ def submit
12
+ assert_exists
13
+ @element.submit
14
+ end
15
+
16
+ end # Form
17
+ end # Watir
@@ -0,0 +1,110 @@
1
+ # encoding: utf-8
2
+ module Watir
3
+ class Frame < HTMLElement
4
+
5
+ VALID_LOCATORS = [:id, :name, :index]
6
+
7
+ def initialize(*args)
8
+ super
9
+ @frame_id = nil
10
+ end
11
+
12
+ def locate
13
+ @parent.assert_exists
14
+
15
+ if @iframe
16
+ switch_to_iframe(@iframe)
17
+ driver
18
+ elsif @frame_id.nil?
19
+ locate_iframe || locate_frame
20
+ else
21
+ switch!
22
+ driver
23
+ end
24
+ end
25
+
26
+ def assert_exists
27
+ # we always run locate(), to make sure the frame is switched
28
+ @element = locate
29
+ end
30
+
31
+ def execute_script(*args)
32
+ browser.execute_script(*args)
33
+ end
34
+
35
+ def element_by_xpath(*args)
36
+ assert_exists
37
+ super
38
+ end
39
+
40
+ def elements_by_xpath(*args)
41
+ assert_exists
42
+ super
43
+ end
44
+
45
+ private
46
+
47
+ def locate_iframe
48
+ # hack - frame doesn't have IFrame's attributes either
49
+ @iframe = IFrame.new(@parent, @selector.merge(:tag_name => "iframe")).locate
50
+
51
+ if @iframe
52
+ switch_to_iframe @iframe
53
+ driver
54
+ end
55
+ end
56
+
57
+ def locate_frame
58
+ loc = VALID_LOCATORS.find { |loc| @selector.has_key? loc }
59
+
60
+ unless loc
61
+ raise MissingWayOfFindingObjectException, "can only locate frames by #{VALID_LOCATORS.inspect}"
62
+ end
63
+
64
+ @frame_id = @selector[loc]
65
+
66
+ unless [String, Integer].any? { |e| @frame_id.kind_of?(e) }
67
+ raise TypeError, "can't locate frame using #{@frame_id.inspect}:#{@frame_id.class}"
68
+ end
69
+
70
+ switch!
71
+
72
+ driver
73
+ end
74
+
75
+ def switch!
76
+ driver.switch_to.frame @frame_id
77
+ rescue Selenium::WebDriver::Error::NoSuchFrameError => e
78
+ raise UnknownFrameException, e.message
79
+ end
80
+
81
+ def switch_to_iframe(element)
82
+ loc = [:id, :name].find { |e| not [nil, ""].include?(element.attribute(e)) }
83
+ if loc.nil?
84
+ raise MissingWayOfFindingObjectException, "can't switch to frame without :id or :name"
85
+ end
86
+
87
+ # TODO: get rid of this when we can switch to elements
88
+ # http://groups.google.com/group/selenium-developers/browse_thread/thread/428bd68e9e8bfecd/19a02ecd20835249
89
+
90
+ if @parent.kind_of? Frame
91
+ parent_id = @parent.instance_variable_get("@frame_id")
92
+ loc = [parent_id, element.attribute(loc)].join(".")
93
+ else
94
+ loc = element.attribute(loc)
95
+ end
96
+
97
+ driver.switch_to.frame loc
98
+ end
99
+ end # Frame
100
+
101
+ module Container
102
+ def frame(*args)
103
+ Frame.new(self, extract_selector(args))
104
+ end
105
+
106
+ def frames(*args)
107
+ FrameCollection.new(self, extract_selector(args))
108
+ end
109
+ end
110
+ end # Watir
@@ -0,0 +1,2541 @@
1
+ # Autogenerated from the HTML5 specification. Edits may be lost.
2
+ module Watir
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+ class HTMLElement < Element
45
+ attributes(:string => [:innerhtml, :outerhtml, :id, :title, :lang, :dir, :class_name, :item_type, :item_id, :item_value, :access_key, :access_key_label, :content_editable, :command_type, :label, :icon], :token_list => [:class_list, :item_ref, :item_prop], :string_map => [:dataset], :bool => [:item_scope, :hidden, :draggable, :is_content_editable, :spellcheck, :disabled, :checked], :properties_collection => [:properties], :int => [:tab_index], :html_element => [:context_menu], :style => [:style], :function => [:onabort, :onblur, :oncanplay, :oncanplaythrough, :onchange, :onclick, :oncontextmenu, :oncuechange, :ondblclick, :ondrag, :ondragend, :ondragenter, :ondragleave, :ondragover, :ondragstart, :ondrop, :ondurationchange, :onemptied, :onended, :onerror, :onfocus, :onformchange, :onforminput, :oninput, :oninvalid, :onkeydown, :onkeypress, :onkeyup, :onload, :onloadeddata, :onloadedmetadata, :onloadstart, :onmousedown, :onmousemove, :onmouseout, :onmouseover, :onmouseup, :onmousewheel, :onpause, :onplay, :onplaying, :onprogress, :onratechange, :onreadystatechange, :onreset, :onscroll, :onseeked, :onseeking, :onselect, :onshow, :onstalled, :onsubmit, :onsuspend, :ontimeupdate, :onvolumechange, :onwaiting])
46
+ end
47
+ class HTMLElementCollection < ElementCollection
48
+ def element_class
49
+ HTMLElement
50
+ end
51
+ end
52
+ class Font < HTMLElement
53
+ attributes(:string => [:color, :face, :size])
54
+ end
55
+ class FontCollection < ElementCollection
56
+ def element_class
57
+ Font
58
+ end
59
+ end
60
+ class Directory < HTMLElement
61
+ attributes(:bool => [:compact])
62
+ end
63
+ class DirectoryCollection < ElementCollection
64
+ def element_class
65
+ Directory
66
+ end
67
+ end
68
+ class BaseFont < HTMLElement
69
+ attributes(:string => [:color, :face], :int => [:size])
70
+ end
71
+ class BaseFontCollection < ElementCollection
72
+ def element_class
73
+ BaseFont
74
+ end
75
+ end
76
+ class Frame < HTMLElement
77
+ attributes(:string => [:frame_border, :long_desc, :margin_height, :margin_width, :name, :scrolling, :src, :content_window], :bool => [:no_resize], :document => [:content_document])
78
+ end
79
+ class FrameCollection < ElementCollection
80
+ def element_class
81
+ Frame
82
+ end
83
+ end
84
+ class FrameSet < HTMLElement
85
+ attributes(:string => [:cols, :rows], :function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onredo, :onresize, :onscroll, :onstorage, :onundo, :onunload])
86
+ end
87
+ class FrameSetCollection < ElementCollection
88
+ def element_class
89
+ FrameSet
90
+ end
91
+ end
92
+ class Marquee < HTMLElement
93
+ attributes(:string => [:behavior, :bg_color, :direction, :height, :width], :int => [:hspace, :loop, :scroll_amount, :scroll_delay, :vspace], :bool => [:true_speed], :function => [:onbounce, :onfinish, :onstart])
94
+ end
95
+ class MarqueeCollection < ElementCollection
96
+ def element_class
97
+ Marquee
98
+ end
99
+ end
100
+ class Applet < HTMLElement
101
+ attributes(:string => [:align, :alt, :archive, :code, :code_base, :height, :name, :object, :width], :int => [:hspace, :vspace])
102
+ end
103
+ class AppletCollection < ElementCollection
104
+ def element_class
105
+ Applet
106
+ end
107
+ end
108
+ class Device < HTMLElement
109
+ attributes(:string => [:type, :data])
110
+ end
111
+ class DeviceCollection < ElementCollection
112
+ def element_class
113
+ Device
114
+ end
115
+ end
116
+ class Menu < HTMLElement
117
+ attributes(:string => [:type, :label])
118
+ end
119
+ class MenuCollection < ElementCollection
120
+ def element_class
121
+ Menu
122
+ end
123
+ end
124
+ class Menu < HTMLElement
125
+ attributes(:bool => [:compact])
126
+ end
127
+ # do nothing
128
+ class Command < HTMLElement
129
+ attributes(:string => [:type, :label, :icon, :radiogroup], :bool => [:disabled, :checked])
130
+ end
131
+ class CommandCollection < ElementCollection
132
+ def element_class
133
+ Command
134
+ end
135
+ end
136
+ class Details < HTMLElement
137
+ attributes(:bool => [:open])
138
+ end
139
+ class DetailsCollection < ElementCollection
140
+ def element_class
141
+ Details
142
+ end
143
+ end
144
+ class Meter < HTMLElement
145
+ attributes(:float => [:value, :min, :max, :low, :high, :optimum], :html_element => [:form], :list => [:labels])
146
+ end
147
+ class MeterCollection < ElementCollection
148
+ def element_class
149
+ Meter
150
+ end
151
+ end
152
+ class Progress < HTMLElement
153
+ attributes(:float => [:value, :max, :position], :html_element => [:form], :list => [:labels])
154
+ end
155
+ class ProgressCollection < ElementCollection
156
+ def element_class
157
+ Progress
158
+ end
159
+ end
160
+ class Output < HTMLElement
161
+ attributes(:token_list => [:html_for], :html_element => [:form], :string => [:name, :type, :default_value, :value, :validity, :validation_message], :bool => [:will_validate], :list => [:labels])
162
+ end
163
+ class OutputCollection < ElementCollection
164
+ def element_class
165
+ Output
166
+ end
167
+ end
168
+ class Keygen < HTMLElement
169
+ attributes(:bool => [:autofocus, :disabled, :will_validate], :string => [:challenge, :keytype, :name, :type, :validity, :validation_message], :html_element => [:form], :list => [:labels])
170
+ end
171
+ class KeygenCollection < ElementCollection
172
+ def element_class
173
+ Keygen
174
+ end
175
+ end
176
+ class TextArea < HTMLElement
177
+ attributes(:bool => [:autofocus, :disabled, :read_only, :required, :will_validate], :int => [:cols, :max_length, :rows, :text_length, :selection_start, :selection_end], :html_element => [:form], :string => [:name, :placeholder, :wrap, :type, :default_value, :value, :validity, :validation_message], :list => [:labels])
178
+ end
179
+ class TextAreaCollection < ElementCollection
180
+ def element_class
181
+ TextArea
182
+ end
183
+ end
184
+ class Option < HTMLElement
185
+ attributes(:bool => [:disabled, :default_selected, :selected], :html_element => [:form], :string => [:label, :value, :text], :int => [:index])
186
+ end
187
+ class OptionCollection < ElementCollection
188
+ def element_class
189
+ Option
190
+ end
191
+ end
192
+ class OptGroup < HTMLElement
193
+ attributes(:bool => [:disabled], :string => [:label])
194
+ end
195
+ class OptGroupCollection < ElementCollection
196
+ def element_class
197
+ OptGroup
198
+ end
199
+ end
200
+ class DataList < HTMLElement
201
+ attributes(:html_collection => [:options])
202
+ end
203
+ class DataListCollection < ElementCollection
204
+ def element_class
205
+ DataList
206
+ end
207
+ end
208
+ class Select < HTMLElement
209
+ attributes(:bool => [:autofocus, :disabled, :multiple, :required, :will_validate], :html_element => [:form], :string => [:name, :type, :value, :validity, :validation_message], :int => [:size, :length, :selected_index], :html_collection => [:options, :selected_options], :list => [:labels])
210
+ end
211
+ class SelectCollection < ElementCollection
212
+ def element_class
213
+ Select
214
+ end
215
+ end
216
+ class Button < HTMLElement
217
+ attributes(:bool => [:autofocus, :disabled, :will_validate], :html_element => [:form], :string => [:form_action, :form_enctype, :form_method, :form_no_validate, :form_target, :name, :type, :value, :validity, :validation_message], :list => [:labels])
218
+ end
219
+ class ButtonCollection < ElementCollection
220
+ def element_class
221
+ Button
222
+ end
223
+ end
224
+ class Input < HTMLElement
225
+ attributes(:string => [:accept, :alt, :autocomplete, :form_action, :form_enctype, :form_method, :form_target, :height, :max, :min, :name, :pattern, :placeholder, :src, :step, :type, :default_value, :value, :width, :validity, :validation_message], :bool => [:autofocus, :default_checked, :checked, :disabled, :form_no_validate, :indeterminate, :multiple, :read_only, :required, :will_validate], :html_element => [:form, :list, :selected_option], :list => [:files, :labels], :int => [:max_length, :size, :selection_start, :selection_end], :date => [:value_as_date], :float => [:value_as_number])
226
+ end
227
+ class InputCollection < ElementCollection
228
+ def element_class
229
+ Input
230
+ end
231
+ end
232
+ class Input < HTMLElement
233
+ attributes(:string => [:align, :use_map])
234
+ end
235
+ # do nothing
236
+ class Label < HTMLElement
237
+ attributes(:html_element => [:form, :control], :string => [:html_for])
238
+ end
239
+ class LabelCollection < ElementCollection
240
+ def element_class
241
+ Label
242
+ end
243
+ end
244
+ class Legend < HTMLElement
245
+ attributes(:html_element => [:form])
246
+ end
247
+ class LegendCollection < ElementCollection
248
+ def element_class
249
+ Legend
250
+ end
251
+ end
252
+ class Legend < HTMLElement
253
+ attributes(:string => [:align])
254
+ end
255
+ # do nothing
256
+ class FieldSet < HTMLElement
257
+ attributes(:bool => [:disabled, :will_validate], :html_element => [:form], :string => [:name, :type, :validity, :validation_message], :html_collection => [:elements])
258
+ end
259
+ class FieldSetCollection < ElementCollection
260
+ def element_class
261
+ FieldSet
262
+ end
263
+ end
264
+ class Form < HTMLElement
265
+ attributes(:string => [:accept_charset, :action, :autocomplete, :enctype, :encoding, :method, :name, :target], :bool => [:no_validate], :html_collection => [:elements], :int => [:length])
266
+ end
267
+ class FormCollection < ElementCollection
268
+ def element_class
269
+ Form
270
+ end
271
+ end
272
+ class TableCell < HTMLElement
273
+ attributes(:int => [:col_span, :row_span, :cell_index], :token_list => [:headers])
274
+ end
275
+ class TableCellCollection < ElementCollection
276
+ def element_class
277
+ TableCell
278
+ end
279
+ end
280
+ class TableCell < HTMLElement
281
+ attributes(:string => [:abbr, :align, :axis, :bg_color, :ch, :ch_off, :height, :v_align, :width], :bool => [:no_wrap])
282
+ end
283
+ # do nothing
284
+ class TableHeaderCell < TableCell
285
+ attributes(:string => [:scope])
286
+ end
287
+ class TableHeaderCellCollection < ElementCollection
288
+ def element_class
289
+ TableHeaderCell
290
+ end
291
+ end
292
+ class TableDataCell < TableCell
293
+ # do nothing
294
+ end
295
+ class TableDataCellCollection < ElementCollection
296
+ def element_class
297
+ TableDataCell
298
+ end
299
+ end
300
+ class TableRow < HTMLElement
301
+ attributes(:int => [:row_index, :section_row_index], :html_collection => [:cells])
302
+ end
303
+ class TableRowCollection < ElementCollection
304
+ def element_class
305
+ TableRow
306
+ end
307
+ end
308
+ class TableRow < HTMLElement
309
+ attributes(:string => [:align, :bg_color, :ch, :ch_off, :v_align])
310
+ end
311
+ # do nothing
312
+ class TableSection < HTMLElement
313
+ attributes(:html_collection => [:rows])
314
+ end
315
+ class TableSectionCollection < ElementCollection
316
+ def element_class
317
+ TableSection
318
+ end
319
+ end
320
+ class TableSection < HTMLElement
321
+ attributes(:string => [:align, :ch, :ch_off, :v_align])
322
+ end
323
+ # do nothing
324
+ class TableCol < HTMLElement
325
+ attributes(:int => [:span])
326
+ end
327
+ class TableColCollection < ElementCollection
328
+ def element_class
329
+ TableCol
330
+ end
331
+ end
332
+ class TableCol < HTMLElement
333
+ attributes(:string => [:align, :ch, :ch_off, :v_align, :width])
334
+ end
335
+ # do nothing
336
+ class TableCaption < HTMLElement
337
+ # do nothing
338
+ end
339
+ class TableCaptionCollection < ElementCollection
340
+ def element_class
341
+ TableCaption
342
+ end
343
+ end
344
+ class TableCaption < HTMLElement
345
+ attributes(:string => [:align])
346
+ end
347
+ # do nothing
348
+ class Table < HTMLElement
349
+ attributes(:html_element => [:caption, :t_head, :t_foot], :html_collection => [:t_bodies, :rows], :string => [:summary])
350
+ end
351
+ class TableCollection < ElementCollection
352
+ def element_class
353
+ Table
354
+ end
355
+ end
356
+ class Table < HTMLElement
357
+ attributes(:string => [:align, :bg_color, :border, :cell_padding, :cell_spacing, :frame, :rules, :width])
358
+ end
359
+ # do nothing
360
+ class Area < HTMLElement
361
+ attributes(:string => [:alt, :coords, :shape, :href, :target, :ping, :rel, :media, :hreflang, :type, :protocol, :host, :hostname, :port, :pathname, :search, :hash], :token_list => [:rel_list])
362
+ end
363
+ class AreaCollection < ElementCollection
364
+ def element_class
365
+ Area
366
+ end
367
+ end
368
+ class Area < HTMLElement
369
+ attributes(:bool => [:no_href])
370
+ end
371
+ # do nothing
372
+ class Map < HTMLElement
373
+ attributes(:string => [:name], :html_collection => [:areas, :images])
374
+ end
375
+ class MapCollection < ElementCollection
376
+ def element_class
377
+ Map
378
+ end
379
+ end
380
+ class Canvas < HTMLElement
381
+ attributes(:int => [:width, :height])
382
+ end
383
+ class CanvasCollection < ElementCollection
384
+ def element_class
385
+ Canvas
386
+ end
387
+ end
388
+ class Media < HTMLElement
389
+ attributes(:string => [:error, :src, :current_src, :preload, :buffered, :played, :seekable, :tracks], :int => [:network_state, :ready_state], :bool => [:seeking, :paused, :ended, :autoplay, :loop, :controls, :muted], :float => [:current_time, :initial_time, :duration, :default_playback_rate, :playback_rate, :volume], :date => [:start_offset_time])
390
+ end
391
+ class MediaCollection < ElementCollection
392
+ def element_class
393
+ Media
394
+ end
395
+ end
396
+ class Audio < Media
397
+ # do nothing
398
+ end
399
+ class AudioCollection < ElementCollection
400
+ def element_class
401
+ Audio
402
+ end
403
+ end
404
+ class Video < Media
405
+ attributes(:int => [:width, :height, :video_width, :video_height], :string => [:poster])
406
+ end
407
+ class VideoCollection < ElementCollection
408
+ def element_class
409
+ Video
410
+ end
411
+ end
412
+ class Track < HTMLElement
413
+ attributes(:string => [:kind, :src, :charset, :srclang, :label, :track])
414
+ end
415
+ class TrackCollection < ElementCollection
416
+ def element_class
417
+ Track
418
+ end
419
+ end
420
+ class Source < HTMLElement
421
+ attributes(:string => [:src, :type, :media])
422
+ end
423
+ class SourceCollection < ElementCollection
424
+ def element_class
425
+ Source
426
+ end
427
+ end
428
+ class Param < HTMLElement
429
+ attributes(:string => [:name, :value])
430
+ end
431
+ class ParamCollection < ElementCollection
432
+ def element_class
433
+ Param
434
+ end
435
+ end
436
+ class Param < HTMLElement
437
+ attributes(:string => [:type, :value_type])
438
+ end
439
+ # do nothing
440
+ class Object < HTMLElement
441
+ attributes(:string => [:data, :type, :name, :use_map, :width, :height, :content_window, :validity, :validation_message], :html_element => [:form], :document => [:content_document], :bool => [:will_validate])
442
+ end
443
+ class ObjectCollection < ElementCollection
444
+ def element_class
445
+ Object
446
+ end
447
+ end
448
+ class Object < HTMLElement
449
+ attributes(:string => [:align, :archive, :border, :code, :code_base, :code_type, :standby], :bool => [:declare], :int => [:hspace, :vspace])
450
+ end
451
+ # do nothing
452
+ class Embed < HTMLElement
453
+ attributes(:string => [:src, :type, :width, :height])
454
+ end
455
+ class EmbedCollection < ElementCollection
456
+ def element_class
457
+ Embed
458
+ end
459
+ end
460
+ class Embed < HTMLElement
461
+ attributes(:string => [:align, :name])
462
+ end
463
+ # do nothing
464
+ class IFrame < HTMLElement
465
+ attributes(:string => [:src, :srcdoc, :name, :width, :height, :content_window], :token_list => [:sandbox], :bool => [:seamless], :document => [:content_document])
466
+ end
467
+ class IFrameCollection < ElementCollection
468
+ def element_class
469
+ IFrame
470
+ end
471
+ end
472
+ class IFrame < HTMLElement
473
+ attributes(:string => [:align, :frame_border, :long_desc, :margin_height, :margin_width, :scrolling])
474
+ end
475
+ # do nothing
476
+ class Image < HTMLElement
477
+ attributes(:string => [:alt, :src, :use_map], :bool => [:is_map, :complete], :int => [:width, :height, :natural_width, :natural_height])
478
+ end
479
+ class ImageCollection < ElementCollection
480
+ def element_class
481
+ Image
482
+ end
483
+ end
484
+ class Image < HTMLElement
485
+ attributes(:string => [:name, :align, :border, :long_desc], :int => [:hspace, :vspace])
486
+ end
487
+ # do nothing
488
+ class Mod < HTMLElement
489
+ attributes(:string => [:cite, :date_time])
490
+ end
491
+ class ModCollection < ElementCollection
492
+ def element_class
493
+ Mod
494
+ end
495
+ end
496
+ class BR < HTMLElement
497
+ # do nothing
498
+ end
499
+ class BRCollection < ElementCollection
500
+ def element_class
501
+ BR
502
+ end
503
+ end
504
+ class BR < HTMLElement
505
+ attributes(:string => [:clear])
506
+ end
507
+ # do nothing
508
+ class Span < HTMLElement
509
+ # do nothing
510
+ end
511
+ class SpanCollection < ElementCollection
512
+ def element_class
513
+ Span
514
+ end
515
+ end
516
+ class Time < HTMLElement
517
+ attributes(:string => [:date_time], :bool => [:pub_date], :date => [:value_as_date])
518
+ end
519
+ class TimeCollection < ElementCollection
520
+ def element_class
521
+ Time
522
+ end
523
+ end
524
+ class Anchor < HTMLElement
525
+ attributes(:string => [:href, :target, :ping, :rel, :media, :hreflang, :type, :text, :protocol, :host, :hostname, :port, :pathname, :search, :hash], :token_list => [:rel_list])
526
+ end
527
+ class AnchorCollection < ElementCollection
528
+ def element_class
529
+ Anchor
530
+ end
531
+ end
532
+ class Anchor < HTMLElement
533
+ attributes(:string => [:coords, :charset, :name, :rev, :shape])
534
+ end
535
+ # do nothing
536
+ class Div < HTMLElement
537
+ # do nothing
538
+ end
539
+ class DivCollection < ElementCollection
540
+ def element_class
541
+ Div
542
+ end
543
+ end
544
+ class Div < HTMLElement
545
+ attributes(:string => [:align])
546
+ end
547
+ # do nothing
548
+ class DList < HTMLElement
549
+ # do nothing
550
+ end
551
+ class DListCollection < ElementCollection
552
+ def element_class
553
+ DList
554
+ end
555
+ end
556
+ class DList < HTMLElement
557
+ attributes(:bool => [:compact])
558
+ end
559
+ # do nothing
560
+ class LI < HTMLElement
561
+ attributes(:int => [:value])
562
+ end
563
+ class LICollection < ElementCollection
564
+ def element_class
565
+ LI
566
+ end
567
+ end
568
+ class LI < HTMLElement
569
+ attributes(:string => [:type])
570
+ end
571
+ # do nothing
572
+ class UList < HTMLElement
573
+ # do nothing
574
+ end
575
+ class UListCollection < ElementCollection
576
+ def element_class
577
+ UList
578
+ end
579
+ end
580
+ class UList < HTMLElement
581
+ attributes(:bool => [:compact], :string => [:type])
582
+ end
583
+ # do nothing
584
+ class OList < HTMLElement
585
+ attributes(:bool => [:reversed], :int => [:start], :string => [:type])
586
+ end
587
+ class OListCollection < ElementCollection
588
+ def element_class
589
+ OList
590
+ end
591
+ end
592
+ class OList < HTMLElement
593
+ attributes(:bool => [:compact])
594
+ end
595
+ # do nothing
596
+ class Quote < HTMLElement
597
+ attributes(:string => [:cite])
598
+ end
599
+ class QuoteCollection < ElementCollection
600
+ def element_class
601
+ Quote
602
+ end
603
+ end
604
+ class Pre < HTMLElement
605
+ # do nothing
606
+ end
607
+ class PreCollection < ElementCollection
608
+ def element_class
609
+ Pre
610
+ end
611
+ end
612
+ class Pre < HTMLElement
613
+ attributes(:int => [:width])
614
+ end
615
+ # do nothing
616
+ class HR < HTMLElement
617
+ # do nothing
618
+ end
619
+ class HRCollection < ElementCollection
620
+ def element_class
621
+ HR
622
+ end
623
+ end
624
+ class HR < HTMLElement
625
+ attributes(:string => [:align, :color, :size, :width], :bool => [:no_shade])
626
+ end
627
+ # do nothing
628
+ class Paragraph < HTMLElement
629
+ # do nothing
630
+ end
631
+ class ParagraphCollection < ElementCollection
632
+ def element_class
633
+ Paragraph
634
+ end
635
+ end
636
+ class Paragraph < HTMLElement
637
+ attributes(:string => [:align])
638
+ end
639
+ # do nothing
640
+ class Heading < HTMLElement
641
+ # do nothing
642
+ end
643
+ class HeadingCollection < ElementCollection
644
+ def element_class
645
+ Heading
646
+ end
647
+ end
648
+ class Heading < HTMLElement
649
+ attributes(:string => [:align])
650
+ end
651
+ # do nothing
652
+ class Body < HTMLElement
653
+ attributes(:function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpopstate, :onpagehide, :onpageshow, :onredo, :onresize, :onscroll, :onstorage, :onundo, :onunload])
654
+ end
655
+ class BodyCollection < ElementCollection
656
+ def element_class
657
+ Body
658
+ end
659
+ end
660
+ class Body < HTMLElement
661
+ attributes(:string => [:text, :bg_color, :background, :link, :v_link, :a_link])
662
+ end
663
+ # do nothing
664
+ class Script < HTMLElement
665
+ attributes(:string => [:src, :type, :charset, :text], :bool => [:async, :defer])
666
+ end
667
+ class ScriptCollection < ElementCollection
668
+ def element_class
669
+ Script
670
+ end
671
+ end
672
+ class Script < HTMLElement
673
+ attributes(:string => [:event, :html_for])
674
+ end
675
+ # do nothing
676
+ class Style < HTMLElement
677
+ attributes(:bool => [:disabled, :scoped], :string => [:media, :type])
678
+ end
679
+ class StyleCollection < ElementCollection
680
+ def element_class
681
+ Style
682
+ end
683
+ end
684
+ class Meta < HTMLElement
685
+ attributes(:string => [:name, :http_equiv, :content])
686
+ end
687
+ class MetaCollection < ElementCollection
688
+ def element_class
689
+ Meta
690
+ end
691
+ end
692
+ class Meta < HTMLElement
693
+ attributes(:string => [:scheme])
694
+ end
695
+ # do nothing
696
+ class Base < HTMLElement
697
+ attributes(:string => [:href, :target])
698
+ end
699
+ class BaseCollection < ElementCollection
700
+ def element_class
701
+ Base
702
+ end
703
+ end
704
+ class Title < HTMLElement
705
+ attributes(:string => [:text])
706
+ end
707
+ class TitleCollection < ElementCollection
708
+ def element_class
709
+ Title
710
+ end
711
+ end
712
+ class Head < HTMLElement
713
+ # do nothing
714
+ end
715
+ class HeadCollection < ElementCollection
716
+ def element_class
717
+ Head
718
+ end
719
+ end
720
+ class Html < HTMLElement
721
+ # do nothing
722
+ end
723
+ class HtmlCollection < ElementCollection
724
+ def element_class
725
+ Html
726
+ end
727
+ end
728
+ class Html < HTMLElement
729
+ attributes(:string => [:version])
730
+ end
731
+ # do nothing
732
+ class Unknown < HTMLElement
733
+ # do nothing
734
+ end
735
+ class UnknownCollection < ElementCollection
736
+ def element_class
737
+ Unknown
738
+ end
739
+ end
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+ module Container
755
+ #
756
+ # @return [Anchor]
757
+ #
758
+
759
+ def a(*args)
760
+ Anchor.new(self, extract_selector(args).merge(:tag_name => "a"))
761
+ end
762
+
763
+ #
764
+ # @return [AnchorCollection]
765
+ #
766
+
767
+ def as(*args)
768
+ AnchorCollection.new(self, extract_selector(args).merge(:tag_name => "a"))
769
+ end
770
+
771
+ Watir.tag_to_class[:a] = Anchor
772
+ #
773
+ # @return [HTMLElement]
774
+ #
775
+
776
+ def abbr(*args)
777
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "abbr"))
778
+ end
779
+
780
+ #
781
+ # @return [HTMLElementCollection]
782
+ #
783
+
784
+ def abbrs(*args)
785
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "abbr"))
786
+ end
787
+
788
+ Watir.tag_to_class[:abbr] = HTMLElement
789
+ #
790
+ # @return [HTMLElement]
791
+ #
792
+
793
+ def address(*args)
794
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "address"))
795
+ end
796
+
797
+ #
798
+ # @return [HTMLElementCollection]
799
+ #
800
+
801
+ def addresses(*args)
802
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "address"))
803
+ end
804
+
805
+ Watir.tag_to_class[:address] = HTMLElement
806
+ #
807
+ # @return [Area]
808
+ #
809
+
810
+ def area(*args)
811
+ Area.new(self, extract_selector(args).merge(:tag_name => "area"))
812
+ end
813
+
814
+ #
815
+ # @return [AreaCollection]
816
+ #
817
+
818
+ def areas(*args)
819
+ AreaCollection.new(self, extract_selector(args).merge(:tag_name => "area"))
820
+ end
821
+
822
+ Watir.tag_to_class[:area] = Area
823
+ #
824
+ # @return [HTMLElement]
825
+ #
826
+
827
+ def article(*args)
828
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "article"))
829
+ end
830
+
831
+ #
832
+ # @return [HTMLElementCollection]
833
+ #
834
+
835
+ def articles(*args)
836
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "article"))
837
+ end
838
+
839
+ Watir.tag_to_class[:article] = HTMLElement
840
+ #
841
+ # @return [HTMLElement]
842
+ #
843
+
844
+ def aside(*args)
845
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "aside"))
846
+ end
847
+
848
+ #
849
+ # @return [HTMLElementCollection]
850
+ #
851
+
852
+ def asides(*args)
853
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "aside"))
854
+ end
855
+
856
+ Watir.tag_to_class[:aside] = HTMLElement
857
+ #
858
+ # @return [Audio]
859
+ #
860
+
861
+ def audio(*args)
862
+ Audio.new(self, extract_selector(args).merge(:tag_name => "audio"))
863
+ end
864
+
865
+ #
866
+ # @return [AudioCollection]
867
+ #
868
+
869
+ def audios(*args)
870
+ AudioCollection.new(self, extract_selector(args).merge(:tag_name => "audio"))
871
+ end
872
+
873
+ Watir.tag_to_class[:audio] = Audio
874
+ #
875
+ # @return [HTMLElement]
876
+ #
877
+
878
+ def b(*args)
879
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "b"))
880
+ end
881
+
882
+ #
883
+ # @return [HTMLElementCollection]
884
+ #
885
+
886
+ def bs(*args)
887
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "b"))
888
+ end
889
+
890
+ Watir.tag_to_class[:b] = HTMLElement
891
+ #
892
+ # @return [Base]
893
+ #
894
+
895
+ def base(*args)
896
+ Base.new(self, extract_selector(args).merge(:tag_name => "base"))
897
+ end
898
+
899
+ #
900
+ # @return [BaseCollection]
901
+ #
902
+
903
+ def bases(*args)
904
+ BaseCollection.new(self, extract_selector(args).merge(:tag_name => "base"))
905
+ end
906
+
907
+ Watir.tag_to_class[:base] = Base
908
+ #
909
+ # @return [HTMLElement]
910
+ #
911
+
912
+ def bdo(*args)
913
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "bdo"))
914
+ end
915
+
916
+ #
917
+ # @return [HTMLElementCollection]
918
+ #
919
+
920
+ def bdos(*args)
921
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "bdo"))
922
+ end
923
+
924
+ Watir.tag_to_class[:bdo] = HTMLElement
925
+ #
926
+ # @return [Quote]
927
+ #
928
+
929
+ def blockquote(*args)
930
+ Quote.new(self, extract_selector(args).merge(:tag_name => "blockquote"))
931
+ end
932
+
933
+ #
934
+ # @return [QuoteCollection]
935
+ #
936
+
937
+ def blockquotes(*args)
938
+ QuoteCollection.new(self, extract_selector(args).merge(:tag_name => "blockquote"))
939
+ end
940
+
941
+ Watir.tag_to_class[:blockquote] = Quote
942
+ #
943
+ # @return [Body]
944
+ #
945
+
946
+ def body(*args)
947
+ Body.new(self, extract_selector(args).merge(:tag_name => "body"))
948
+ end
949
+
950
+ #
951
+ # @return [BodyCollection]
952
+ #
953
+
954
+ def bodys(*args)
955
+ BodyCollection.new(self, extract_selector(args).merge(:tag_name => "body"))
956
+ end
957
+
958
+ Watir.tag_to_class[:body] = Body
959
+ #
960
+ # @return [BR]
961
+ #
962
+
963
+ def br(*args)
964
+ BR.new(self, extract_selector(args).merge(:tag_name => "br"))
965
+ end
966
+
967
+ #
968
+ # @return [BRCollection]
969
+ #
970
+
971
+ def brs(*args)
972
+ BRCollection.new(self, extract_selector(args).merge(:tag_name => "br"))
973
+ end
974
+
975
+ Watir.tag_to_class[:br] = BR
976
+ #
977
+ # @return [Button]
978
+ #
979
+
980
+ def button(*args)
981
+ Button.new(self, extract_selector(args).merge(:tag_name => "button"))
982
+ end
983
+
984
+ #
985
+ # @return [ButtonCollection]
986
+ #
987
+
988
+ def buttons(*args)
989
+ ButtonCollection.new(self, extract_selector(args).merge(:tag_name => "button"))
990
+ end
991
+
992
+ Watir.tag_to_class[:button] = Button
993
+ #
994
+ # @return [Canvas]
995
+ #
996
+
997
+ def canvas(*args)
998
+ Canvas.new(self, extract_selector(args).merge(:tag_name => "canvas"))
999
+ end
1000
+
1001
+ #
1002
+ # @return [CanvasCollection]
1003
+ #
1004
+
1005
+ def canvases(*args)
1006
+ CanvasCollection.new(self, extract_selector(args).merge(:tag_name => "canvas"))
1007
+ end
1008
+
1009
+ Watir.tag_to_class[:canvas] = Canvas
1010
+ #
1011
+ # @return [TableCaption]
1012
+ #
1013
+
1014
+ def caption(*args)
1015
+ TableCaption.new(self, extract_selector(args).merge(:tag_name => "caption"))
1016
+ end
1017
+
1018
+ #
1019
+ # @return [TableCaptionCollection]
1020
+ #
1021
+
1022
+ def captions(*args)
1023
+ TableCaptionCollection.new(self, extract_selector(args).merge(:tag_name => "caption"))
1024
+ end
1025
+
1026
+ Watir.tag_to_class[:caption] = TableCaption
1027
+ #
1028
+ # @return [HTMLElement]
1029
+ #
1030
+
1031
+ def cite(*args)
1032
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "cite"))
1033
+ end
1034
+
1035
+ #
1036
+ # @return [HTMLElementCollection]
1037
+ #
1038
+
1039
+ def cites(*args)
1040
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "cite"))
1041
+ end
1042
+
1043
+ Watir.tag_to_class[:cite] = HTMLElement
1044
+ #
1045
+ # @return [HTMLElement]
1046
+ #
1047
+
1048
+ def code(*args)
1049
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "code"))
1050
+ end
1051
+
1052
+ #
1053
+ # @return [HTMLElementCollection]
1054
+ #
1055
+
1056
+ def codes(*args)
1057
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "code"))
1058
+ end
1059
+
1060
+ Watir.tag_to_class[:code] = HTMLElement
1061
+ #
1062
+ # @return [TableCol]
1063
+ #
1064
+
1065
+ def col(*args)
1066
+ TableCol.new(self, extract_selector(args).merge(:tag_name => "col"))
1067
+ end
1068
+
1069
+ #
1070
+ # @return [TableColCollection]
1071
+ #
1072
+
1073
+ def cols(*args)
1074
+ TableColCollection.new(self, extract_selector(args).merge(:tag_name => "col"))
1075
+ end
1076
+
1077
+ Watir.tag_to_class[:col] = TableCol
1078
+ #
1079
+ # @return [TableCol]
1080
+ #
1081
+
1082
+ def colgroup(*args)
1083
+ TableCol.new(self, extract_selector(args).merge(:tag_name => "colgroup"))
1084
+ end
1085
+
1086
+ #
1087
+ # @return [TableColCollection]
1088
+ #
1089
+
1090
+ def colgroups(*args)
1091
+ TableColCollection.new(self, extract_selector(args).merge(:tag_name => "colgroup"))
1092
+ end
1093
+
1094
+ Watir.tag_to_class[:colgroup] = TableCol
1095
+ #
1096
+ # @return [Command]
1097
+ #
1098
+
1099
+ def command(*args)
1100
+ Command.new(self, extract_selector(args).merge(:tag_name => "command"))
1101
+ end
1102
+
1103
+ #
1104
+ # @return [CommandCollection]
1105
+ #
1106
+
1107
+ def commands(*args)
1108
+ CommandCollection.new(self, extract_selector(args).merge(:tag_name => "command"))
1109
+ end
1110
+
1111
+ Watir.tag_to_class[:command] = Command
1112
+ #
1113
+ # @return [DataList]
1114
+ #
1115
+
1116
+ def datalist(*args)
1117
+ DataList.new(self, extract_selector(args).merge(:tag_name => "datalist"))
1118
+ end
1119
+
1120
+ #
1121
+ # @return [DataListCollection]
1122
+ #
1123
+
1124
+ def datalists(*args)
1125
+ DataListCollection.new(self, extract_selector(args).merge(:tag_name => "datalist"))
1126
+ end
1127
+
1128
+ Watir.tag_to_class[:datalist] = DataList
1129
+ #
1130
+ # @return [HTMLElement]
1131
+ #
1132
+
1133
+ def dd(*args)
1134
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "dd"))
1135
+ end
1136
+
1137
+ #
1138
+ # @return [HTMLElementCollection]
1139
+ #
1140
+
1141
+ def dds(*args)
1142
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "dd"))
1143
+ end
1144
+
1145
+ Watir.tag_to_class[:dd] = HTMLElement
1146
+ #
1147
+ # @return [Mod]
1148
+ #
1149
+
1150
+ def del(*args)
1151
+ Mod.new(self, extract_selector(args).merge(:tag_name => "del"))
1152
+ end
1153
+
1154
+ #
1155
+ # @return [ModCollection]
1156
+ #
1157
+
1158
+ def dels(*args)
1159
+ ModCollection.new(self, extract_selector(args).merge(:tag_name => "del"))
1160
+ end
1161
+
1162
+ Watir.tag_to_class[:del] = Mod
1163
+ #
1164
+ # @return [Details]
1165
+ #
1166
+
1167
+ def details(*args)
1168
+ Details.new(self, extract_selector(args).merge(:tag_name => "details"))
1169
+ end
1170
+
1171
+ #
1172
+ # @return [DetailsCollection]
1173
+ #
1174
+
1175
+ def details(*args)
1176
+ DetailsCollection.new(self, extract_selector(args).merge(:tag_name => "details"))
1177
+ end
1178
+
1179
+ Watir.tag_to_class[:details] = Details
1180
+ #
1181
+ # @return [HTMLElement]
1182
+ #
1183
+
1184
+ def dfn(*args)
1185
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "dfn"))
1186
+ end
1187
+
1188
+ #
1189
+ # @return [HTMLElementCollection]
1190
+ #
1191
+
1192
+ def dfns(*args)
1193
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "dfn"))
1194
+ end
1195
+
1196
+ Watir.tag_to_class[:dfn] = HTMLElement
1197
+ #
1198
+ # @return [Div]
1199
+ #
1200
+
1201
+ def div(*args)
1202
+ Div.new(self, extract_selector(args).merge(:tag_name => "div"))
1203
+ end
1204
+
1205
+ #
1206
+ # @return [DivCollection]
1207
+ #
1208
+
1209
+ def divs(*args)
1210
+ DivCollection.new(self, extract_selector(args).merge(:tag_name => "div"))
1211
+ end
1212
+
1213
+ Watir.tag_to_class[:div] = Div
1214
+ #
1215
+ # @return [DList]
1216
+ #
1217
+
1218
+ def dl(*args)
1219
+ DList.new(self, extract_selector(args).merge(:tag_name => "dl"))
1220
+ end
1221
+
1222
+ #
1223
+ # @return [DListCollection]
1224
+ #
1225
+
1226
+ def dls(*args)
1227
+ DListCollection.new(self, extract_selector(args).merge(:tag_name => "dl"))
1228
+ end
1229
+
1230
+ Watir.tag_to_class[:dl] = DList
1231
+ #
1232
+ # @return [HTMLElement]
1233
+ #
1234
+
1235
+ def dt(*args)
1236
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "dt"))
1237
+ end
1238
+
1239
+ #
1240
+ # @return [HTMLElementCollection]
1241
+ #
1242
+
1243
+ def dts(*args)
1244
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "dt"))
1245
+ end
1246
+
1247
+ Watir.tag_to_class[:dt] = HTMLElement
1248
+ #
1249
+ # @return [HTMLElement]
1250
+ #
1251
+
1252
+ def em(*args)
1253
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "em"))
1254
+ end
1255
+
1256
+ #
1257
+ # @return [HTMLElementCollection]
1258
+ #
1259
+
1260
+ def ems(*args)
1261
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "em"))
1262
+ end
1263
+
1264
+ Watir.tag_to_class[:em] = HTMLElement
1265
+ #
1266
+ # @return [Embed]
1267
+ #
1268
+
1269
+ def embed(*args)
1270
+ Embed.new(self, extract_selector(args).merge(:tag_name => "embed"))
1271
+ end
1272
+
1273
+ #
1274
+ # @return [EmbedCollection]
1275
+ #
1276
+
1277
+ def embeds(*args)
1278
+ EmbedCollection.new(self, extract_selector(args).merge(:tag_name => "embed"))
1279
+ end
1280
+
1281
+ Watir.tag_to_class[:embed] = Embed
1282
+ #
1283
+ # @return [FieldSet]
1284
+ #
1285
+
1286
+ def fieldset(*args)
1287
+ FieldSet.new(self, extract_selector(args).merge(:tag_name => "fieldset"))
1288
+ end
1289
+
1290
+ #
1291
+ # @return [FieldSetCollection]
1292
+ #
1293
+
1294
+ def fieldsets(*args)
1295
+ FieldSetCollection.new(self, extract_selector(args).merge(:tag_name => "fieldset"))
1296
+ end
1297
+
1298
+ Watir.tag_to_class[:fieldset] = FieldSet
1299
+ #
1300
+ # @return [HTMLElement]
1301
+ #
1302
+
1303
+ def figcaption(*args)
1304
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "figcaption"))
1305
+ end
1306
+
1307
+ #
1308
+ # @return [HTMLElementCollection]
1309
+ #
1310
+
1311
+ def figcaptions(*args)
1312
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "figcaption"))
1313
+ end
1314
+
1315
+ Watir.tag_to_class[:figcaption] = HTMLElement
1316
+ #
1317
+ # @return [HTMLElement]
1318
+ #
1319
+
1320
+ def figure(*args)
1321
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "figure"))
1322
+ end
1323
+
1324
+ #
1325
+ # @return [HTMLElementCollection]
1326
+ #
1327
+
1328
+ def figures(*args)
1329
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "figure"))
1330
+ end
1331
+
1332
+ Watir.tag_to_class[:figure] = HTMLElement
1333
+ #
1334
+ # @return [HTMLElement]
1335
+ #
1336
+
1337
+ def footer(*args)
1338
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "footer"))
1339
+ end
1340
+
1341
+ #
1342
+ # @return [HTMLElementCollection]
1343
+ #
1344
+
1345
+ def footers(*args)
1346
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "footer"))
1347
+ end
1348
+
1349
+ Watir.tag_to_class[:footer] = HTMLElement
1350
+ #
1351
+ # @return [Form]
1352
+ #
1353
+
1354
+ def form(*args)
1355
+ Form.new(self, extract_selector(args).merge(:tag_name => "form"))
1356
+ end
1357
+
1358
+ #
1359
+ # @return [FormCollection]
1360
+ #
1361
+
1362
+ def forms(*args)
1363
+ FormCollection.new(self, extract_selector(args).merge(:tag_name => "form"))
1364
+ end
1365
+
1366
+ Watir.tag_to_class[:form] = Form
1367
+ #
1368
+ # @return [Heading]
1369
+ #
1370
+
1371
+ def h1(*args)
1372
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h1"))
1373
+ end
1374
+
1375
+ #
1376
+ # @return [HeadingCollection]
1377
+ #
1378
+
1379
+ def h1s(*args)
1380
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h1"))
1381
+ end
1382
+
1383
+ Watir.tag_to_class[:h1] = Heading
1384
+ #
1385
+ # @return [Heading]
1386
+ #
1387
+
1388
+ def h2(*args)
1389
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h2"))
1390
+ end
1391
+
1392
+ #
1393
+ # @return [HeadingCollection]
1394
+ #
1395
+
1396
+ def h2s(*args)
1397
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h2"))
1398
+ end
1399
+
1400
+ Watir.tag_to_class[:h2] = Heading
1401
+ #
1402
+ # @return [Heading]
1403
+ #
1404
+
1405
+ def h3(*args)
1406
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h3"))
1407
+ end
1408
+
1409
+ #
1410
+ # @return [HeadingCollection]
1411
+ #
1412
+
1413
+ def h3s(*args)
1414
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h3"))
1415
+ end
1416
+
1417
+ Watir.tag_to_class[:h3] = Heading
1418
+ #
1419
+ # @return [Heading]
1420
+ #
1421
+
1422
+ def h4(*args)
1423
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h4"))
1424
+ end
1425
+
1426
+ #
1427
+ # @return [HeadingCollection]
1428
+ #
1429
+
1430
+ def h4s(*args)
1431
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h4"))
1432
+ end
1433
+
1434
+ Watir.tag_to_class[:h4] = Heading
1435
+ #
1436
+ # @return [Heading]
1437
+ #
1438
+
1439
+ def h5(*args)
1440
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h5"))
1441
+ end
1442
+
1443
+ #
1444
+ # @return [HeadingCollection]
1445
+ #
1446
+
1447
+ def h5s(*args)
1448
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h5"))
1449
+ end
1450
+
1451
+ Watir.tag_to_class[:h5] = Heading
1452
+ #
1453
+ # @return [Heading]
1454
+ #
1455
+
1456
+ def h6(*args)
1457
+ Heading.new(self, extract_selector(args).merge(:tag_name => "h6"))
1458
+ end
1459
+
1460
+ #
1461
+ # @return [HeadingCollection]
1462
+ #
1463
+
1464
+ def h6s(*args)
1465
+ HeadingCollection.new(self, extract_selector(args).merge(:tag_name => "h6"))
1466
+ end
1467
+
1468
+ Watir.tag_to_class[:h6] = Heading
1469
+ #
1470
+ # @return [Head]
1471
+ #
1472
+
1473
+ def head(*args)
1474
+ Head.new(self, extract_selector(args).merge(:tag_name => "head"))
1475
+ end
1476
+
1477
+ #
1478
+ # @return [HeadCollection]
1479
+ #
1480
+
1481
+ def heads(*args)
1482
+ HeadCollection.new(self, extract_selector(args).merge(:tag_name => "head"))
1483
+ end
1484
+
1485
+ Watir.tag_to_class[:head] = Head
1486
+ #
1487
+ # @return [HTMLElement]
1488
+ #
1489
+
1490
+ def header(*args)
1491
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "header"))
1492
+ end
1493
+
1494
+ #
1495
+ # @return [HTMLElementCollection]
1496
+ #
1497
+
1498
+ def headers(*args)
1499
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "header"))
1500
+ end
1501
+
1502
+ Watir.tag_to_class[:header] = HTMLElement
1503
+ #
1504
+ # @return [HTMLElement]
1505
+ #
1506
+
1507
+ def hgroup(*args)
1508
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "hgroup"))
1509
+ end
1510
+
1511
+ #
1512
+ # @return [HTMLElementCollection]
1513
+ #
1514
+
1515
+ def hgroups(*args)
1516
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "hgroup"))
1517
+ end
1518
+
1519
+ Watir.tag_to_class[:hgroup] = HTMLElement
1520
+ #
1521
+ # @return [HR]
1522
+ #
1523
+
1524
+ def hr(*args)
1525
+ HR.new(self, extract_selector(args).merge(:tag_name => "hr"))
1526
+ end
1527
+
1528
+ #
1529
+ # @return [HRCollection]
1530
+ #
1531
+
1532
+ def hrs(*args)
1533
+ HRCollection.new(self, extract_selector(args).merge(:tag_name => "hr"))
1534
+ end
1535
+
1536
+ Watir.tag_to_class[:hr] = HR
1537
+ #
1538
+ # @return [Html]
1539
+ #
1540
+
1541
+ def html(*args)
1542
+ Html.new(self, extract_selector(args).merge(:tag_name => "html"))
1543
+ end
1544
+
1545
+ #
1546
+ # @return [HtmlCollection]
1547
+ #
1548
+
1549
+ def htmls(*args)
1550
+ HtmlCollection.new(self, extract_selector(args).merge(:tag_name => "html"))
1551
+ end
1552
+
1553
+ Watir.tag_to_class[:html] = Html
1554
+ #
1555
+ # @return [HTMLElement]
1556
+ #
1557
+
1558
+ def i(*args)
1559
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "i"))
1560
+ end
1561
+
1562
+ #
1563
+ # @return [HTMLElementCollection]
1564
+ #
1565
+
1566
+ def is(*args)
1567
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "i"))
1568
+ end
1569
+
1570
+ Watir.tag_to_class[:i] = HTMLElement
1571
+ #
1572
+ # @return [IFrame]
1573
+ #
1574
+
1575
+ def iframe(*args)
1576
+ IFrame.new(self, extract_selector(args).merge(:tag_name => "iframe"))
1577
+ end
1578
+
1579
+ #
1580
+ # @return [IFrameCollection]
1581
+ #
1582
+
1583
+ def iframes(*args)
1584
+ IFrameCollection.new(self, extract_selector(args).merge(:tag_name => "iframe"))
1585
+ end
1586
+
1587
+ Watir.tag_to_class[:iframe] = IFrame
1588
+ #
1589
+ # @return [Image]
1590
+ #
1591
+
1592
+ def img(*args)
1593
+ Image.new(self, extract_selector(args).merge(:tag_name => "img"))
1594
+ end
1595
+
1596
+ #
1597
+ # @return [ImageCollection]
1598
+ #
1599
+
1600
+ def imgs(*args)
1601
+ ImageCollection.new(self, extract_selector(args).merge(:tag_name => "img"))
1602
+ end
1603
+
1604
+ Watir.tag_to_class[:img] = Image
1605
+ #
1606
+ # @return [Input]
1607
+ #
1608
+
1609
+ def input(*args)
1610
+ Input.new(self, extract_selector(args).merge(:tag_name => "input"))
1611
+ end
1612
+
1613
+ #
1614
+ # @return [InputCollection]
1615
+ #
1616
+
1617
+ def inputs(*args)
1618
+ InputCollection.new(self, extract_selector(args).merge(:tag_name => "input"))
1619
+ end
1620
+
1621
+ Watir.tag_to_class[:input] = Input
1622
+ #
1623
+ # @return [Mod]
1624
+ #
1625
+
1626
+ def ins(*args)
1627
+ Mod.new(self, extract_selector(args).merge(:tag_name => "ins"))
1628
+ end
1629
+
1630
+ #
1631
+ # @return [ModCollection]
1632
+ #
1633
+
1634
+ def inses(*args)
1635
+ ModCollection.new(self, extract_selector(args).merge(:tag_name => "ins"))
1636
+ end
1637
+
1638
+ Watir.tag_to_class[:ins] = Mod
1639
+ #
1640
+ # @return [HTMLElement]
1641
+ #
1642
+
1643
+ def kbd(*args)
1644
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "kbd"))
1645
+ end
1646
+
1647
+ #
1648
+ # @return [HTMLElementCollection]
1649
+ #
1650
+
1651
+ def kbds(*args)
1652
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "kbd"))
1653
+ end
1654
+
1655
+ Watir.tag_to_class[:kbd] = HTMLElement
1656
+ #
1657
+ # @return [Keygen]
1658
+ #
1659
+
1660
+ def keygen(*args)
1661
+ Keygen.new(self, extract_selector(args).merge(:tag_name => "keygen"))
1662
+ end
1663
+
1664
+ #
1665
+ # @return [KeygenCollection]
1666
+ #
1667
+
1668
+ def keygens(*args)
1669
+ KeygenCollection.new(self, extract_selector(args).merge(:tag_name => "keygen"))
1670
+ end
1671
+
1672
+ Watir.tag_to_class[:keygen] = Keygen
1673
+ #
1674
+ # @return [Label]
1675
+ #
1676
+
1677
+ def label(*args)
1678
+ Label.new(self, extract_selector(args).merge(:tag_name => "label"))
1679
+ end
1680
+
1681
+ #
1682
+ # @return [LabelCollection]
1683
+ #
1684
+
1685
+ def labels(*args)
1686
+ LabelCollection.new(self, extract_selector(args).merge(:tag_name => "label"))
1687
+ end
1688
+
1689
+ Watir.tag_to_class[:label] = Label
1690
+ #
1691
+ # @return [Legend]
1692
+ #
1693
+
1694
+ def legend(*args)
1695
+ Legend.new(self, extract_selector(args).merge(:tag_name => "legend"))
1696
+ end
1697
+
1698
+ #
1699
+ # @return [LegendCollection]
1700
+ #
1701
+
1702
+ def legends(*args)
1703
+ LegendCollection.new(self, extract_selector(args).merge(:tag_name => "legend"))
1704
+ end
1705
+
1706
+ Watir.tag_to_class[:legend] = Legend
1707
+ #
1708
+ # @return [LI]
1709
+ #
1710
+
1711
+ def li(*args)
1712
+ LI.new(self, extract_selector(args).merge(:tag_name => "li"))
1713
+ end
1714
+
1715
+ #
1716
+ # @return [LICollection]
1717
+ #
1718
+
1719
+ def lis(*args)
1720
+ LICollection.new(self, extract_selector(args).merge(:tag_name => "li"))
1721
+ end
1722
+
1723
+ Watir.tag_to_class[:li] = LI
1724
+ #
1725
+ # @return [Map]
1726
+ #
1727
+
1728
+ def map(*args)
1729
+ Map.new(self, extract_selector(args).merge(:tag_name => "map"))
1730
+ end
1731
+
1732
+ #
1733
+ # @return [MapCollection]
1734
+ #
1735
+
1736
+ def maps(*args)
1737
+ MapCollection.new(self, extract_selector(args).merge(:tag_name => "map"))
1738
+ end
1739
+
1740
+ Watir.tag_to_class[:map] = Map
1741
+ #
1742
+ # @return [HTMLElement]
1743
+ #
1744
+
1745
+ def mark(*args)
1746
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "mark"))
1747
+ end
1748
+
1749
+ #
1750
+ # @return [HTMLElementCollection]
1751
+ #
1752
+
1753
+ def marks(*args)
1754
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "mark"))
1755
+ end
1756
+
1757
+ Watir.tag_to_class[:mark] = HTMLElement
1758
+ #
1759
+ # @return [Menu]
1760
+ #
1761
+
1762
+ def menu(*args)
1763
+ Menu.new(self, extract_selector(args).merge(:tag_name => "menu"))
1764
+ end
1765
+
1766
+ #
1767
+ # @return [MenuCollection]
1768
+ #
1769
+
1770
+ def menus(*args)
1771
+ MenuCollection.new(self, extract_selector(args).merge(:tag_name => "menu"))
1772
+ end
1773
+
1774
+ Watir.tag_to_class[:menu] = Menu
1775
+ #
1776
+ # @return [Meta]
1777
+ #
1778
+
1779
+ def meta(*args)
1780
+ Meta.new(self, extract_selector(args).merge(:tag_name => "meta"))
1781
+ end
1782
+
1783
+ #
1784
+ # @return [MetaCollection]
1785
+ #
1786
+
1787
+ def metas(*args)
1788
+ MetaCollection.new(self, extract_selector(args).merge(:tag_name => "meta"))
1789
+ end
1790
+
1791
+ Watir.tag_to_class[:meta] = Meta
1792
+ #
1793
+ # @return [Meter]
1794
+ #
1795
+
1796
+ def meter(*args)
1797
+ Meter.new(self, extract_selector(args).merge(:tag_name => "meter"))
1798
+ end
1799
+
1800
+ #
1801
+ # @return [MeterCollection]
1802
+ #
1803
+
1804
+ def meters(*args)
1805
+ MeterCollection.new(self, extract_selector(args).merge(:tag_name => "meter"))
1806
+ end
1807
+
1808
+ Watir.tag_to_class[:meter] = Meter
1809
+ #
1810
+ # @return [HTMLElement]
1811
+ #
1812
+
1813
+ def nav(*args)
1814
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "nav"))
1815
+ end
1816
+
1817
+ #
1818
+ # @return [HTMLElementCollection]
1819
+ #
1820
+
1821
+ def navs(*args)
1822
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "nav"))
1823
+ end
1824
+
1825
+ Watir.tag_to_class[:nav] = HTMLElement
1826
+ #
1827
+ # @return [HTMLElement]
1828
+ #
1829
+
1830
+ def noscript(*args)
1831
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "noscript"))
1832
+ end
1833
+
1834
+ #
1835
+ # @return [HTMLElementCollection]
1836
+ #
1837
+
1838
+ def noscripts(*args)
1839
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "noscript"))
1840
+ end
1841
+
1842
+ Watir.tag_to_class[:noscript] = HTMLElement
1843
+ #
1844
+ # @return [Object]
1845
+ #
1846
+
1847
+ def object(*args)
1848
+ Object.new(self, extract_selector(args).merge(:tag_name => "object"))
1849
+ end
1850
+
1851
+ #
1852
+ # @return [ObjectCollection]
1853
+ #
1854
+
1855
+ def objects(*args)
1856
+ ObjectCollection.new(self, extract_selector(args).merge(:tag_name => "object"))
1857
+ end
1858
+
1859
+ Watir.tag_to_class[:object] = Object
1860
+ #
1861
+ # @return [OList]
1862
+ #
1863
+
1864
+ def ol(*args)
1865
+ OList.new(self, extract_selector(args).merge(:tag_name => "ol"))
1866
+ end
1867
+
1868
+ #
1869
+ # @return [OListCollection]
1870
+ #
1871
+
1872
+ def ols(*args)
1873
+ OListCollection.new(self, extract_selector(args).merge(:tag_name => "ol"))
1874
+ end
1875
+
1876
+ Watir.tag_to_class[:ol] = OList
1877
+ #
1878
+ # @return [OptGroup]
1879
+ #
1880
+
1881
+ def optgroup(*args)
1882
+ OptGroup.new(self, extract_selector(args).merge(:tag_name => "optgroup"))
1883
+ end
1884
+
1885
+ #
1886
+ # @return [OptGroupCollection]
1887
+ #
1888
+
1889
+ def optgroups(*args)
1890
+ OptGroupCollection.new(self, extract_selector(args).merge(:tag_name => "optgroup"))
1891
+ end
1892
+
1893
+ Watir.tag_to_class[:optgroup] = OptGroup
1894
+ #
1895
+ # @return [Option]
1896
+ #
1897
+
1898
+ def option(*args)
1899
+ Option.new(self, extract_selector(args).merge(:tag_name => "option"))
1900
+ end
1901
+
1902
+ #
1903
+ # @return [OptionCollection]
1904
+ #
1905
+
1906
+ def options(*args)
1907
+ OptionCollection.new(self, extract_selector(args).merge(:tag_name => "option"))
1908
+ end
1909
+
1910
+ Watir.tag_to_class[:option] = Option
1911
+ #
1912
+ # @return [Output]
1913
+ #
1914
+
1915
+ def output(*args)
1916
+ Output.new(self, extract_selector(args).merge(:tag_name => "output"))
1917
+ end
1918
+
1919
+ #
1920
+ # @return [OutputCollection]
1921
+ #
1922
+
1923
+ def outputs(*args)
1924
+ OutputCollection.new(self, extract_selector(args).merge(:tag_name => "output"))
1925
+ end
1926
+
1927
+ Watir.tag_to_class[:output] = Output
1928
+ #
1929
+ # @return [Paragraph]
1930
+ #
1931
+
1932
+ def p(*args)
1933
+ Paragraph.new(self, extract_selector(args).merge(:tag_name => "p"))
1934
+ end
1935
+
1936
+ #
1937
+ # @return [ParagraphCollection]
1938
+ #
1939
+
1940
+ def ps(*args)
1941
+ ParagraphCollection.new(self, extract_selector(args).merge(:tag_name => "p"))
1942
+ end
1943
+
1944
+ Watir.tag_to_class[:p] = Paragraph
1945
+ #
1946
+ # @return [Param]
1947
+ #
1948
+
1949
+ def param(*args)
1950
+ Param.new(self, extract_selector(args).merge(:tag_name => "param"))
1951
+ end
1952
+
1953
+ #
1954
+ # @return [ParamCollection]
1955
+ #
1956
+
1957
+ def params(*args)
1958
+ ParamCollection.new(self, extract_selector(args).merge(:tag_name => "param"))
1959
+ end
1960
+
1961
+ Watir.tag_to_class[:param] = Param
1962
+ #
1963
+ # @return [Pre]
1964
+ #
1965
+
1966
+ def pre(*args)
1967
+ Pre.new(self, extract_selector(args).merge(:tag_name => "pre"))
1968
+ end
1969
+
1970
+ #
1971
+ # @return [PreCollection]
1972
+ #
1973
+
1974
+ def pres(*args)
1975
+ PreCollection.new(self, extract_selector(args).merge(:tag_name => "pre"))
1976
+ end
1977
+
1978
+ Watir.tag_to_class[:pre] = Pre
1979
+ #
1980
+ # @return [Progress]
1981
+ #
1982
+
1983
+ def progress(*args)
1984
+ Progress.new(self, extract_selector(args).merge(:tag_name => "progress"))
1985
+ end
1986
+
1987
+ #
1988
+ # @return [ProgressCollection]
1989
+ #
1990
+
1991
+ def progresses(*args)
1992
+ ProgressCollection.new(self, extract_selector(args).merge(:tag_name => "progress"))
1993
+ end
1994
+
1995
+ Watir.tag_to_class[:progress] = Progress
1996
+ #
1997
+ # @return [Quote]
1998
+ #
1999
+
2000
+ def q(*args)
2001
+ Quote.new(self, extract_selector(args).merge(:tag_name => "q"))
2002
+ end
2003
+
2004
+ #
2005
+ # @return [QuoteCollection]
2006
+ #
2007
+
2008
+ def qs(*args)
2009
+ QuoteCollection.new(self, extract_selector(args).merge(:tag_name => "q"))
2010
+ end
2011
+
2012
+ Watir.tag_to_class[:q] = Quote
2013
+ #
2014
+ # @return [HTMLElement]
2015
+ #
2016
+
2017
+ def rp(*args)
2018
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "rp"))
2019
+ end
2020
+
2021
+ #
2022
+ # @return [HTMLElementCollection]
2023
+ #
2024
+
2025
+ def rps(*args)
2026
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "rp"))
2027
+ end
2028
+
2029
+ Watir.tag_to_class[:rp] = HTMLElement
2030
+ #
2031
+ # @return [HTMLElement]
2032
+ #
2033
+
2034
+ def rt(*args)
2035
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "rt"))
2036
+ end
2037
+
2038
+ #
2039
+ # @return [HTMLElementCollection]
2040
+ #
2041
+
2042
+ def rts(*args)
2043
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "rt"))
2044
+ end
2045
+
2046
+ Watir.tag_to_class[:rt] = HTMLElement
2047
+ #
2048
+ # @return [HTMLElement]
2049
+ #
2050
+
2051
+ def ruby(*args)
2052
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "ruby"))
2053
+ end
2054
+
2055
+ #
2056
+ # @return [HTMLElementCollection]
2057
+ #
2058
+
2059
+ def rubies(*args)
2060
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "ruby"))
2061
+ end
2062
+
2063
+ Watir.tag_to_class[:ruby] = HTMLElement
2064
+ #
2065
+ # @return [HTMLElement]
2066
+ #
2067
+
2068
+ def s(*args)
2069
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "s"))
2070
+ end
2071
+
2072
+ #
2073
+ # @return [HTMLElementCollection]
2074
+ #
2075
+
2076
+ def ss(*args)
2077
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "s"))
2078
+ end
2079
+
2080
+ Watir.tag_to_class[:s] = HTMLElement
2081
+ #
2082
+ # @return [HTMLElement]
2083
+ #
2084
+
2085
+ def samp(*args)
2086
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "samp"))
2087
+ end
2088
+
2089
+ #
2090
+ # @return [HTMLElementCollection]
2091
+ #
2092
+
2093
+ def samps(*args)
2094
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "samp"))
2095
+ end
2096
+
2097
+ Watir.tag_to_class[:samp] = HTMLElement
2098
+ #
2099
+ # @return [Script]
2100
+ #
2101
+
2102
+ def script(*args)
2103
+ Script.new(self, extract_selector(args).merge(:tag_name => "script"))
2104
+ end
2105
+
2106
+ #
2107
+ # @return [ScriptCollection]
2108
+ #
2109
+
2110
+ def scripts(*args)
2111
+ ScriptCollection.new(self, extract_selector(args).merge(:tag_name => "script"))
2112
+ end
2113
+
2114
+ Watir.tag_to_class[:script] = Script
2115
+ #
2116
+ # @return [HTMLElement]
2117
+ #
2118
+
2119
+ def section(*args)
2120
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "section"))
2121
+ end
2122
+
2123
+ #
2124
+ # @return [HTMLElementCollection]
2125
+ #
2126
+
2127
+ def sections(*args)
2128
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "section"))
2129
+ end
2130
+
2131
+ Watir.tag_to_class[:section] = HTMLElement
2132
+ #
2133
+ # @return [Select]
2134
+ #
2135
+
2136
+ def select(*args)
2137
+ Select.new(self, extract_selector(args).merge(:tag_name => "select"))
2138
+ end
2139
+
2140
+ #
2141
+ # @return [SelectCollection]
2142
+ #
2143
+
2144
+ def selects(*args)
2145
+ SelectCollection.new(self, extract_selector(args).merge(:tag_name => "select"))
2146
+ end
2147
+
2148
+ Watir.tag_to_class[:select] = Select
2149
+ #
2150
+ # @return [HTMLElement]
2151
+ #
2152
+
2153
+ def small(*args)
2154
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "small"))
2155
+ end
2156
+
2157
+ #
2158
+ # @return [HTMLElementCollection]
2159
+ #
2160
+
2161
+ def smalls(*args)
2162
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "small"))
2163
+ end
2164
+
2165
+ Watir.tag_to_class[:small] = HTMLElement
2166
+ #
2167
+ # @return [Source]
2168
+ #
2169
+
2170
+ def source(*args)
2171
+ Source.new(self, extract_selector(args).merge(:tag_name => "source"))
2172
+ end
2173
+
2174
+ #
2175
+ # @return [SourceCollection]
2176
+ #
2177
+
2178
+ def sources(*args)
2179
+ SourceCollection.new(self, extract_selector(args).merge(:tag_name => "source"))
2180
+ end
2181
+
2182
+ Watir.tag_to_class[:source] = Source
2183
+ #
2184
+ # @return [Span]
2185
+ #
2186
+
2187
+ def span(*args)
2188
+ Span.new(self, extract_selector(args).merge(:tag_name => "span"))
2189
+ end
2190
+
2191
+ #
2192
+ # @return [SpanCollection]
2193
+ #
2194
+
2195
+ def spans(*args)
2196
+ SpanCollection.new(self, extract_selector(args).merge(:tag_name => "span"))
2197
+ end
2198
+
2199
+ Watir.tag_to_class[:span] = Span
2200
+ #
2201
+ # @return [HTMLElement]
2202
+ #
2203
+
2204
+ def strong(*args)
2205
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "strong"))
2206
+ end
2207
+
2208
+ #
2209
+ # @return [HTMLElementCollection]
2210
+ #
2211
+
2212
+ def strongs(*args)
2213
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "strong"))
2214
+ end
2215
+
2216
+ Watir.tag_to_class[:strong] = HTMLElement
2217
+ #
2218
+ # @return [Style]
2219
+ #
2220
+
2221
+ def style(*args)
2222
+ Style.new(self, extract_selector(args).merge(:tag_name => "style"))
2223
+ end
2224
+
2225
+ #
2226
+ # @return [StyleCollection]
2227
+ #
2228
+
2229
+ def styles(*args)
2230
+ StyleCollection.new(self, extract_selector(args).merge(:tag_name => "style"))
2231
+ end
2232
+
2233
+ Watir.tag_to_class[:style] = Style
2234
+ #
2235
+ # @return [HTMLElement]
2236
+ #
2237
+
2238
+ def sub(*args)
2239
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "sub"))
2240
+ end
2241
+
2242
+ #
2243
+ # @return [HTMLElementCollection]
2244
+ #
2245
+
2246
+ def subs(*args)
2247
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "sub"))
2248
+ end
2249
+
2250
+ Watir.tag_to_class[:sub] = HTMLElement
2251
+ #
2252
+ # @return [HTMLElement]
2253
+ #
2254
+
2255
+ def summary(*args)
2256
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "summary"))
2257
+ end
2258
+
2259
+ #
2260
+ # @return [HTMLElementCollection]
2261
+ #
2262
+
2263
+ def summaries(*args)
2264
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "summary"))
2265
+ end
2266
+
2267
+ Watir.tag_to_class[:summary] = HTMLElement
2268
+ #
2269
+ # @return [HTMLElement]
2270
+ #
2271
+
2272
+ def sup(*args)
2273
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "sup"))
2274
+ end
2275
+
2276
+ #
2277
+ # @return [HTMLElementCollection]
2278
+ #
2279
+
2280
+ def sups(*args)
2281
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "sup"))
2282
+ end
2283
+
2284
+ Watir.tag_to_class[:sup] = HTMLElement
2285
+ #
2286
+ # @return [Table]
2287
+ #
2288
+
2289
+ def table(*args)
2290
+ Table.new(self, extract_selector(args).merge(:tag_name => "table"))
2291
+ end
2292
+
2293
+ #
2294
+ # @return [TableCollection]
2295
+ #
2296
+
2297
+ def tables(*args)
2298
+ TableCollection.new(self, extract_selector(args).merge(:tag_name => "table"))
2299
+ end
2300
+
2301
+ Watir.tag_to_class[:table] = Table
2302
+ #
2303
+ # @return [TableSection]
2304
+ #
2305
+
2306
+ def tbody(*args)
2307
+ TableSection.new(self, extract_selector(args).merge(:tag_name => "tbody"))
2308
+ end
2309
+
2310
+ #
2311
+ # @return [TableSectionCollection]
2312
+ #
2313
+
2314
+ def tbodys(*args)
2315
+ TableSectionCollection.new(self, extract_selector(args).merge(:tag_name => "tbody"))
2316
+ end
2317
+
2318
+ Watir.tag_to_class[:tbody] = TableSection
2319
+ #
2320
+ # @return [TableDataCell]
2321
+ #
2322
+
2323
+ def td(*args)
2324
+ TableDataCell.new(self, extract_selector(args).merge(:tag_name => "td"))
2325
+ end
2326
+
2327
+ #
2328
+ # @return [TableDataCellCollection]
2329
+ #
2330
+
2331
+ def tds(*args)
2332
+ TableDataCellCollection.new(self, extract_selector(args).merge(:tag_name => "td"))
2333
+ end
2334
+
2335
+ Watir.tag_to_class[:td] = TableDataCell
2336
+ #
2337
+ # @return [TextArea]
2338
+ #
2339
+
2340
+ def textarea(*args)
2341
+ TextArea.new(self, extract_selector(args).merge(:tag_name => "textarea"))
2342
+ end
2343
+
2344
+ #
2345
+ # @return [TextAreaCollection]
2346
+ #
2347
+
2348
+ def textareas(*args)
2349
+ TextAreaCollection.new(self, extract_selector(args).merge(:tag_name => "textarea"))
2350
+ end
2351
+
2352
+ Watir.tag_to_class[:textarea] = TextArea
2353
+ #
2354
+ # @return [TableSection]
2355
+ #
2356
+
2357
+ def tfoot(*args)
2358
+ TableSection.new(self, extract_selector(args).merge(:tag_name => "tfoot"))
2359
+ end
2360
+
2361
+ #
2362
+ # @return [TableSectionCollection]
2363
+ #
2364
+
2365
+ def tfoots(*args)
2366
+ TableSectionCollection.new(self, extract_selector(args).merge(:tag_name => "tfoot"))
2367
+ end
2368
+
2369
+ Watir.tag_to_class[:tfoot] = TableSection
2370
+ #
2371
+ # @return [TableHeaderCell]
2372
+ #
2373
+
2374
+ def th(*args)
2375
+ TableHeaderCell.new(self, extract_selector(args).merge(:tag_name => "th"))
2376
+ end
2377
+
2378
+ #
2379
+ # @return [TableHeaderCellCollection]
2380
+ #
2381
+
2382
+ def ths(*args)
2383
+ TableHeaderCellCollection.new(self, extract_selector(args).merge(:tag_name => "th"))
2384
+ end
2385
+
2386
+ Watir.tag_to_class[:th] = TableHeaderCell
2387
+ #
2388
+ # @return [TableSection]
2389
+ #
2390
+
2391
+ def thead(*args)
2392
+ TableSection.new(self, extract_selector(args).merge(:tag_name => "thead"))
2393
+ end
2394
+
2395
+ #
2396
+ # @return [TableSectionCollection]
2397
+ #
2398
+
2399
+ def theads(*args)
2400
+ TableSectionCollection.new(self, extract_selector(args).merge(:tag_name => "thead"))
2401
+ end
2402
+
2403
+ Watir.tag_to_class[:thead] = TableSection
2404
+ #
2405
+ # @return [Time]
2406
+ #
2407
+
2408
+ def time(*args)
2409
+ Time.new(self, extract_selector(args).merge(:tag_name => "time"))
2410
+ end
2411
+
2412
+ #
2413
+ # @return [TimeCollection]
2414
+ #
2415
+
2416
+ def times(*args)
2417
+ TimeCollection.new(self, extract_selector(args).merge(:tag_name => "time"))
2418
+ end
2419
+
2420
+ Watir.tag_to_class[:time] = Time
2421
+ #
2422
+ # @return [Title]
2423
+ #
2424
+
2425
+ def title(*args)
2426
+ Title.new(self, extract_selector(args).merge(:tag_name => "title"))
2427
+ end
2428
+
2429
+ #
2430
+ # @return [TitleCollection]
2431
+ #
2432
+
2433
+ def titles(*args)
2434
+ TitleCollection.new(self, extract_selector(args).merge(:tag_name => "title"))
2435
+ end
2436
+
2437
+ Watir.tag_to_class[:title] = Title
2438
+ #
2439
+ # @return [TableRow]
2440
+ #
2441
+
2442
+ def tr(*args)
2443
+ TableRow.new(self, extract_selector(args).merge(:tag_name => "tr"))
2444
+ end
2445
+
2446
+ #
2447
+ # @return [TableRowCollection]
2448
+ #
2449
+
2450
+ def trs(*args)
2451
+ TableRowCollection.new(self, extract_selector(args).merge(:tag_name => "tr"))
2452
+ end
2453
+
2454
+ Watir.tag_to_class[:tr] = TableRow
2455
+ #
2456
+ # @return [Track]
2457
+ #
2458
+
2459
+ def track(*args)
2460
+ Track.new(self, extract_selector(args).merge(:tag_name => "track"))
2461
+ end
2462
+
2463
+ #
2464
+ # @return [TrackCollection]
2465
+ #
2466
+
2467
+ def tracks(*args)
2468
+ TrackCollection.new(self, extract_selector(args).merge(:tag_name => "track"))
2469
+ end
2470
+
2471
+ Watir.tag_to_class[:track] = Track
2472
+ #
2473
+ # @return [UList]
2474
+ #
2475
+
2476
+ def ul(*args)
2477
+ UList.new(self, extract_selector(args).merge(:tag_name => "ul"))
2478
+ end
2479
+
2480
+ #
2481
+ # @return [UListCollection]
2482
+ #
2483
+
2484
+ def uls(*args)
2485
+ UListCollection.new(self, extract_selector(args).merge(:tag_name => "ul"))
2486
+ end
2487
+
2488
+ Watir.tag_to_class[:ul] = UList
2489
+ #
2490
+ # @return [HTMLElement]
2491
+ #
2492
+
2493
+ def var(*args)
2494
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "var"))
2495
+ end
2496
+
2497
+ #
2498
+ # @return [HTMLElementCollection]
2499
+ #
2500
+
2501
+ def vars(*args)
2502
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "var"))
2503
+ end
2504
+
2505
+ Watir.tag_to_class[:var] = HTMLElement
2506
+ #
2507
+ # @return [Video]
2508
+ #
2509
+
2510
+ def video(*args)
2511
+ Video.new(self, extract_selector(args).merge(:tag_name => "video"))
2512
+ end
2513
+
2514
+ #
2515
+ # @return [VideoCollection]
2516
+ #
2517
+
2518
+ def videos(*args)
2519
+ VideoCollection.new(self, extract_selector(args).merge(:tag_name => "video"))
2520
+ end
2521
+
2522
+ Watir.tag_to_class[:video] = Video
2523
+ #
2524
+ # @return [HTMLElement]
2525
+ #
2526
+
2527
+ def wbr(*args)
2528
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "wbr"))
2529
+ end
2530
+
2531
+ #
2532
+ # @return [HTMLElementCollection]
2533
+ #
2534
+
2535
+ def wbrs(*args)
2536
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "wbr"))
2537
+ end
2538
+
2539
+ Watir.tag_to_class[:wbr] = HTMLElement
2540
+ end # Container
2541
+ end # Watir