watir-webdriver 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -2
- data/Gemfile +4 -2
- data/Rakefile +1 -3
- data/lib/watir-webdriver.rb +2 -1
- data/lib/watir-webdriver/browser.rb +1 -1
- data/lib/watir-webdriver/elements/element.rb +10 -1
- data/lib/watir-webdriver/elements/generated.rb +75 -65
- data/lib/watir-webdriver/has_window.rb +33 -0
- data/lib/watir-webdriver/html.rb +1 -0
- data/lib/watir-webdriver/html/visitor.rb +2 -2
- data/lib/watir-webdriver/version.rb +1 -1
- data/lib/watir-webdriver/{window_switching.rb → window.rb} +31 -36
- data/spec/implementation.rb +11 -1
- data/support/html5.html +23611 -18623
- data/watir-webdriver.gemspec +2 -2
- metadata +13 -12
data/.travis.yml
CHANGED
@@ -7,7 +7,9 @@ notifications:
|
|
7
7
|
before_script:
|
8
8
|
- support/travis.sh
|
9
9
|
env:
|
10
|
+
- WATIR_WEBDRIVER_BROWSER=firefox
|
10
11
|
- WATIR_WEBDRIVER_BROWSER=firefox ALWAYS_LOCATE=false
|
11
|
-
- WATIR_WEBDRIVER_BROWSER=firefox
|
12
|
+
# - WATIR_WEBDRIVER_BROWSER=firefox NATIVE_EVENTS=true
|
13
|
+
- WATIR_WEBDRIVER_BROWSER=chrome
|
12
14
|
- WATIR_WEBDRIVER_BROWSER=chrome ALWAYS_LOCATE=false
|
13
|
-
- WATIR_WEBDRIVER_BROWSER=chrome
|
15
|
+
# - WATIR_WEBDRIVER_BROWSER=chrome NATIVE_EVENTS=true
|
data/Gemfile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
|
4
|
-
gem "
|
3
|
+
unless ENV['TRAVIS']
|
4
|
+
gem "simplecov", ">= 0.3.5", :platform => :ruby_19
|
5
|
+
gem "ruby-debug19", :platform => :ruby_19
|
6
|
+
end
|
5
7
|
|
6
8
|
# Specify your gem's dependencies in watir-webdriver.gemspec
|
7
9
|
gemspec
|
data/Rakefile
CHANGED
@@ -12,15 +12,13 @@ end
|
|
12
12
|
namespace :spec do
|
13
13
|
RSpec::Core::RakeTask.new(:html) do |spec|
|
14
14
|
spec.ruby_opts = "-I lib:spec"
|
15
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
16
15
|
spec.rspec_opts = "--format html --out #{ENV["SPEC_REPORT"] || "specs.html"}"
|
16
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
task :default => :spec
|
21
21
|
|
22
|
-
|
23
|
-
|
24
22
|
task :lib do
|
25
23
|
$LOAD_PATH.unshift(File.expand_path("lib", File.dirname(__FILE__)))
|
26
24
|
end
|
data/lib/watir-webdriver.rb
CHANGED
@@ -6,7 +6,8 @@ require 'watir-webdriver/version'
|
|
6
6
|
require 'watir-webdriver/wait'
|
7
7
|
require 'watir-webdriver/exception'
|
8
8
|
require 'watir-webdriver/xpath_support'
|
9
|
-
require 'watir-webdriver/
|
9
|
+
require 'watir-webdriver/window'
|
10
|
+
require 'watir-webdriver/has_window'
|
10
11
|
require 'watir-webdriver/atoms'
|
11
12
|
require 'watir-webdriver/container'
|
12
13
|
require 'watir-webdriver/locators/element_locator'
|
@@ -14,6 +14,15 @@ module Watir
|
|
14
14
|
include Selenium
|
15
15
|
include EventuallyPresent
|
16
16
|
|
17
|
+
#
|
18
|
+
# need to add this here since we no longer get them from the spec
|
19
|
+
# @see http://html5.org/r/6605
|
20
|
+
# @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=13610
|
21
|
+
#
|
22
|
+
# TODO: use IDL from DOM core?
|
23
|
+
#
|
24
|
+
attributes :string => [:id]
|
25
|
+
|
17
26
|
def initialize(parent, selector)
|
18
27
|
@parent = parent
|
19
28
|
@selector = selector
|
@@ -187,7 +196,7 @@ module Watir
|
|
187
196
|
def present?
|
188
197
|
exists? && visible?
|
189
198
|
rescue Selenium::WebDriver::Error::ObsoleteElementError, UnknownObjectException
|
190
|
-
# if the element disappears between the exists? and visible? calls,
|
199
|
+
# if the element disappears between the exists? and visible? calls,
|
191
200
|
# consider it not present.
|
192
201
|
false
|
193
202
|
end
|
@@ -45,6 +45,20 @@ module Watir
|
|
45
45
|
|
46
46
|
|
47
47
|
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
48
62
|
|
49
63
|
|
50
64
|
|
@@ -61,7 +75,7 @@ module Watir
|
|
61
75
|
|
62
76
|
|
63
77
|
class HTMLElement < Element
|
64
|
-
attributes(:string => [:
|
78
|
+
attributes(:string => [:access_key, :access_key_label, :class_name, :command_icon, :command_label, :command_type, :content_editable, :dir, :item_id, :item_value, :lang, :title], :token_list => [:class_list, :dropzone, :item_prop, :item_ref, :item_type], :bool => [:command_checked, :command_disabled, :command_hidden, :draggable, :hidden, :content_editable, :item_scope, :spellcheck], :html_element => [:context_menu], :string_map => [:dataset], :function => [:onabort, :onblur, :oncanplay, :oncanplaythrough, :onchange, :onclick, :oncontextmenu, :oncuechange, :ondblclick, :ondrag, :ondragend, :ondragenter, :ondragleave, :ondragover, :ondragstart, :ondrop, :ondurationchange, :onemptied, :onended, :onerror, :onfocus, :oninput, :oninvalid, :onkeydown, :onkeypress, :onkeyup, :onload, :onloadeddata, :onloadedmetadata, :onloadstart, :onmousedown, :onmousemove, :onmouseout, :onmouseover, :onmouseup, :onmousewheel, :onpause, :onplay, :onplaying, :onprogress, :onratechange, :onreset, :onscroll, :onseeked, :onseeking, :onselect, :onshow, :onstalled, :onsubmit, :onsuspend, :ontimeupdate, :onvolumechange, :onwaiting], :properties_collection => [:properties], :style => [:style], :int => [:tab_index])
|
65
79
|
end
|
66
80
|
class HTMLElementCollection < ElementCollection
|
67
81
|
def element_class
|
@@ -93,7 +107,7 @@ module Watir
|
|
93
107
|
end
|
94
108
|
end
|
95
109
|
class Frame < HTMLElement
|
96
|
-
attributes(:string => [:frame_border, :long_desc, :margin_height, :margin_width, :name, :scrolling, :src
|
110
|
+
attributes(:document => [:content_document], :string => [:content_window, :frame_border, :long_desc, :margin_height, :margin_width, :name, :scrolling, :src], :bool => [:no_resize])
|
97
111
|
end
|
98
112
|
class FrameCollection < ElementCollection
|
99
113
|
def element_class
|
@@ -101,7 +115,7 @@ module Watir
|
|
101
115
|
end
|
102
116
|
end
|
103
117
|
class FrameSet < HTMLElement
|
104
|
-
attributes(:string => [:cols, :rows], :function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :
|
118
|
+
attributes(:string => [:cols, :rows], :function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onscroll, :onstorage, :onunload])
|
105
119
|
end
|
106
120
|
class FrameSetCollection < ElementCollection
|
107
121
|
def element_class
|
@@ -109,7 +123,7 @@ module Watir
|
|
109
123
|
end
|
110
124
|
end
|
111
125
|
class Marquee < HTMLElement
|
112
|
-
attributes(:string => [:behavior, :bg_color, :direction, :height, :width], :int => [:hspace, :loop, :scroll_amount, :scroll_delay, :vspace], :
|
126
|
+
attributes(:string => [:behavior, :bg_color, :direction, :height, :width], :int => [:hspace, :loop, :scroll_amount, :scroll_delay, :vspace], :function => [:onbounce, :onfinish, :onstart], :bool => [:true_speed])
|
113
127
|
end
|
114
128
|
class MarqueeCollection < ElementCollection
|
115
129
|
def element_class
|
@@ -125,7 +139,7 @@ module Watir
|
|
125
139
|
end
|
126
140
|
end
|
127
141
|
class Menu < HTMLElement
|
128
|
-
attributes(:string => [:
|
142
|
+
attributes(:string => [:label, :type])
|
129
143
|
end
|
130
144
|
class MenuCollection < ElementCollection
|
131
145
|
def element_class
|
@@ -137,7 +151,7 @@ module Watir
|
|
137
151
|
end
|
138
152
|
# do nothing
|
139
153
|
class Command < HTMLElement
|
140
|
-
attributes(:
|
154
|
+
attributes(:bool => [:checked, :disabled], :string => [:icon, :label, :radiogroup, :type])
|
141
155
|
end
|
142
156
|
class CommandCollection < ElementCollection
|
143
157
|
def element_class
|
@@ -153,7 +167,7 @@ module Watir
|
|
153
167
|
end
|
154
168
|
end
|
155
169
|
class Meter < HTMLElement
|
156
|
-
attributes(:float => [:
|
170
|
+
attributes(:float => [:high, :low, :max, :min, :optimum, :value], :list => [:labels])
|
157
171
|
end
|
158
172
|
class MeterCollection < ElementCollection
|
159
173
|
def element_class
|
@@ -161,7 +175,7 @@ module Watir
|
|
161
175
|
end
|
162
176
|
end
|
163
177
|
class Progress < HTMLElement
|
164
|
-
attributes(:
|
178
|
+
attributes(:list => [:labels], :float => [:max, :position, :value])
|
165
179
|
end
|
166
180
|
class ProgressCollection < ElementCollection
|
167
181
|
def element_class
|
@@ -169,7 +183,7 @@ module Watir
|
|
169
183
|
end
|
170
184
|
end
|
171
185
|
class Output < HTMLElement
|
172
|
-
attributes(:
|
186
|
+
attributes(:string => [:default_value, :name, :type, :validation_message, :validity, :value], :html_element => [:form], :token_list => [:html_for], :list => [:labels], :bool => [:will_validate])
|
173
187
|
end
|
174
188
|
class OutputCollection < ElementCollection
|
175
189
|
def element_class
|
@@ -177,7 +191,7 @@ module Watir
|
|
177
191
|
end
|
178
192
|
end
|
179
193
|
class Keygen < HTMLElement
|
180
|
-
attributes(:bool => [:autofocus, :disabled, :will_validate], :string => [:challenge, :keytype, :name, :type, :
|
194
|
+
attributes(:bool => [:autofocus, :disabled, :will_validate], :string => [:challenge, :keytype, :name, :type, :validation_message, :validity], :html_element => [:form], :list => [:labels])
|
181
195
|
end
|
182
196
|
class KeygenCollection < ElementCollection
|
183
197
|
def element_class
|
@@ -185,7 +199,7 @@ module Watir
|
|
185
199
|
end
|
186
200
|
end
|
187
201
|
class TextArea < HTMLElement
|
188
|
-
attributes(:bool => [:autofocus, :disabled, :read_only, :required, :will_validate], :int => [:cols, :max_length, :rows, :
|
202
|
+
attributes(:bool => [:autofocus, :disabled, :read_only, :required, :will_validate], :int => [:cols, :max_length, :rows, :selection_end, :selection_start, :text_length], :string => [:default_value, :dir_name, :name, :placeholder, :selection_direction, :type, :validation_message, :validity, :value, :wrap], :html_element => [:form], :list => [:labels])
|
189
203
|
end
|
190
204
|
class TextAreaCollection < ElementCollection
|
191
205
|
def element_class
|
@@ -193,7 +207,7 @@ module Watir
|
|
193
207
|
end
|
194
208
|
end
|
195
209
|
class Option < HTMLElement
|
196
|
-
attributes(:bool => [:
|
210
|
+
attributes(:bool => [:default_selected, :disabled, :selected], :html_element => [:form], :int => [:index], :string => [:label, :text, :value])
|
197
211
|
end
|
198
212
|
class OptionCollection < ElementCollection
|
199
213
|
def element_class
|
@@ -217,7 +231,7 @@ module Watir
|
|
217
231
|
end
|
218
232
|
end
|
219
233
|
class Select < HTMLElement
|
220
|
-
attributes(:bool => [:autofocus, :disabled, :multiple, :required, :will_validate], :html_element => [:form], :
|
234
|
+
attributes(:bool => [:autofocus, :disabled, :multiple, :required, :will_validate], :html_element => [:form], :list => [:labels], :int => [:length, :selected_index, :size], :string => [:name, :type, :validation_message, :validity, :value], :html_collection => [:options, :selected_options])
|
221
235
|
end
|
222
236
|
class SelectCollection < ElementCollection
|
223
237
|
def element_class
|
@@ -225,7 +239,7 @@ module Watir
|
|
225
239
|
end
|
226
240
|
end
|
227
241
|
class Button < HTMLElement
|
228
|
-
attributes(:bool => [:autofocus, :disabled, :will_validate], :html_element => [:form], :string => [:form_action, :form_enctype, :form_method, :
|
242
|
+
attributes(:bool => [:autofocus, :disabled, :form_no_validate, :will_validate], :html_element => [:form], :string => [:form_action, :form_enctype, :form_method, :form_target, :name, :type, :validation_message, :validity, :value], :list => [:labels])
|
229
243
|
end
|
230
244
|
class ButtonCollection < ElementCollection
|
231
245
|
def element_class
|
@@ -233,7 +247,7 @@ module Watir
|
|
233
247
|
end
|
234
248
|
end
|
235
249
|
class Input < HTMLElement
|
236
|
-
attributes(:string => [:accept, :alt, :autocomplete, :dir_name, :form_action, :form_enctype, :form_method, :form_target, :
|
250
|
+
attributes(:string => [:accept, :alt, :autocomplete, :default_value, :dir_name, :form_action, :form_enctype, :form_method, :form_target, :max, :min, :name, :pattern, :placeholder, :selection_direction, :src, :step, :type, :validation_message, :validity, :value], :bool => [:autofocus, :checked, :default_checked, :disabled, :form_no_validate, :indeterminate, :multiple, :read_only, :required, :will_validate], :list => [:files, :labels], :html_element => [:form, :list], :int => [:height, :max_length, :selection_end, :selection_start, :size, :width], :date => [:value_as_date], :float => [:value_as_number])
|
237
251
|
end
|
238
252
|
class InputCollection < ElementCollection
|
239
253
|
def element_class
|
@@ -245,7 +259,7 @@ module Watir
|
|
245
259
|
end
|
246
260
|
# do nothing
|
247
261
|
class Label < HTMLElement
|
248
|
-
attributes(:html_element => [:
|
262
|
+
attributes(:html_element => [:control, :form], :string => [:html_for])
|
249
263
|
end
|
250
264
|
class LabelCollection < ElementCollection
|
251
265
|
def element_class
|
@@ -265,7 +279,7 @@ module Watir
|
|
265
279
|
end
|
266
280
|
# do nothing
|
267
281
|
class FieldSet < HTMLElement
|
268
|
-
attributes(:bool => [:disabled, :will_validate], :html_element => [:form], :string => [:name, :type, :
|
282
|
+
attributes(:bool => [:disabled, :will_validate], :html_collection => [:elements], :html_element => [:form], :string => [:name, :type, :validation_message, :validity])
|
269
283
|
end
|
270
284
|
class FieldSetCollection < ElementCollection
|
271
285
|
def element_class
|
@@ -273,7 +287,7 @@ module Watir
|
|
273
287
|
end
|
274
288
|
end
|
275
289
|
class Form < HTMLElement
|
276
|
-
attributes(:string => [:accept_charset, :action, :autocomplete, :
|
290
|
+
attributes(:string => [:accept_charset, :action, :autocomplete, :encoding, :enctype, :method, :name, :target], :html_collection => [:elements], :int => [:length], :bool => [:no_validate])
|
277
291
|
end
|
278
292
|
class FormCollection < ElementCollection
|
279
293
|
def element_class
|
@@ -281,7 +295,7 @@ module Watir
|
|
281
295
|
end
|
282
296
|
end
|
283
297
|
class TableCell < HTMLElement
|
284
|
-
attributes(:int => [:
|
298
|
+
attributes(:int => [:cell_index, :col_span, :row_span], :token_list => [:headers])
|
285
299
|
end
|
286
300
|
class TableCellCollection < ElementCollection
|
287
301
|
def element_class
|
@@ -309,7 +323,7 @@ module Watir
|
|
309
323
|
end
|
310
324
|
end
|
311
325
|
class TableRow < HTMLElement
|
312
|
-
attributes(:
|
326
|
+
attributes(:html_collection => [:cells], :int => [:row_index, :section_row_index])
|
313
327
|
end
|
314
328
|
class TableRowCollection < ElementCollection
|
315
329
|
def element_class
|
@@ -357,7 +371,7 @@ module Watir
|
|
357
371
|
end
|
358
372
|
# do nothing
|
359
373
|
class Table < HTMLElement
|
360
|
-
attributes(:html_element => [:caption, :
|
374
|
+
attributes(:string => [:border], :html_element => [:caption, :t_foot, :t_head], :html_collection => [:rows, :t_bodies])
|
361
375
|
end
|
362
376
|
class TableCollection < ElementCollection
|
363
377
|
def element_class
|
@@ -369,7 +383,7 @@ module Watir
|
|
369
383
|
end
|
370
384
|
# do nothing
|
371
385
|
class Area < HTMLElement
|
372
|
-
attributes(:string => [:alt, :coords, :
|
386
|
+
attributes(:string => [:alt, :coords, :download, :hash, :host, :hostname, :href, :hreflang, :media, :pathname, :ping, :port, :protocol, :rel, :search, :shape, :target, :type], :token_list => [:rel_list])
|
373
387
|
end
|
374
388
|
class AreaCollection < ElementCollection
|
375
389
|
def element_class
|
@@ -381,7 +395,7 @@ module Watir
|
|
381
395
|
end
|
382
396
|
# do nothing
|
383
397
|
class Map < HTMLElement
|
384
|
-
attributes(:
|
398
|
+
attributes(:html_collection => [:areas, :images], :string => [:name])
|
385
399
|
end
|
386
400
|
class MapCollection < ElementCollection
|
387
401
|
def element_class
|
@@ -389,7 +403,7 @@ module Watir
|
|
389
403
|
end
|
390
404
|
end
|
391
405
|
class Canvas < HTMLElement
|
392
|
-
attributes(:int => [:
|
406
|
+
attributes(:int => [:height, :width])
|
393
407
|
end
|
394
408
|
class CanvasCollection < ElementCollection
|
395
409
|
def element_class
|
@@ -397,7 +411,7 @@ module Watir
|
|
397
411
|
end
|
398
412
|
end
|
399
413
|
class Media < HTMLElement
|
400
|
-
attributes(:
|
414
|
+
attributes(:list => [:audio_tracks, :text_tracks, :video_tracks], :bool => [:autoplay, :controls, :default_muted, :ended, :loop, :muted, :paused, :seeking], :string => [:buffered, :controller, :cross_origin, :current_src, :error, :media_group, :played, :preload, :seekable, :src], :float => [:current_time, :default_playback_rate, :duration, :initial_time, :playback_rate, :volume], :int => [:network_state, :ready_state], :date => [:start_offset_time])
|
401
415
|
end
|
402
416
|
class MediaCollection < ElementCollection
|
403
417
|
def element_class
|
@@ -413,7 +427,7 @@ module Watir
|
|
413
427
|
end
|
414
428
|
end
|
415
429
|
class Video < Media
|
416
|
-
attributes(:int => [:
|
430
|
+
attributes(:int => [:height, :video_height, :video_width, :width], :string => [:poster])
|
417
431
|
end
|
418
432
|
class VideoCollection < ElementCollection
|
419
433
|
def element_class
|
@@ -421,7 +435,7 @@ module Watir
|
|
421
435
|
end
|
422
436
|
end
|
423
437
|
class Track < HTMLElement
|
424
|
-
attributes(:string => [:kind, :
|
438
|
+
attributes(:bool => [:default], :string => [:kind, :label, :src, :srclang, :track], :int => [:ready_state])
|
425
439
|
end
|
426
440
|
class TrackCollection < ElementCollection
|
427
441
|
def element_class
|
@@ -429,7 +443,7 @@ module Watir
|
|
429
443
|
end
|
430
444
|
end
|
431
445
|
class Source < HTMLElement
|
432
|
-
attributes(:string => [:
|
446
|
+
attributes(:string => [:media, :src, :type])
|
433
447
|
end
|
434
448
|
class SourceCollection < ElementCollection
|
435
449
|
def element_class
|
@@ -449,7 +463,7 @@ module Watir
|
|
449
463
|
end
|
450
464
|
# do nothing
|
451
465
|
class Object < HTMLElement
|
452
|
-
attributes(:
|
466
|
+
attributes(:document => [:content_document], :string => [:content_window, :data, :height, :name, :type, :use_map, :validation_message, :validity, :width], :html_element => [:form], :bool => [:type_must_match, :will_validate])
|
453
467
|
end
|
454
468
|
class ObjectCollection < ElementCollection
|
455
469
|
def element_class
|
@@ -461,7 +475,7 @@ module Watir
|
|
461
475
|
end
|
462
476
|
# do nothing
|
463
477
|
class Embed < HTMLElement
|
464
|
-
attributes(:string => [:src, :type, :width
|
478
|
+
attributes(:string => [:height, :src, :type, :width])
|
465
479
|
end
|
466
480
|
class EmbedCollection < ElementCollection
|
467
481
|
def element_class
|
@@ -473,7 +487,7 @@ module Watir
|
|
473
487
|
end
|
474
488
|
# do nothing
|
475
489
|
class IFrame < HTMLElement
|
476
|
-
attributes(:string => [:
|
490
|
+
attributes(:document => [:content_document], :string => [:content_window, :height, :name, :src, :srcdoc, :width], :token_list => [:sandbox], :bool => [:seamless])
|
477
491
|
end
|
478
492
|
class IFrameCollection < ElementCollection
|
479
493
|
def element_class
|
@@ -485,7 +499,7 @@ module Watir
|
|
485
499
|
end
|
486
500
|
# do nothing
|
487
501
|
class Image < HTMLElement
|
488
|
-
attributes(:string => [:alt, :
|
502
|
+
attributes(:string => [:alt, :cross_origin, :src, :use_map], :bool => [:complete, :map], :int => [:height, :natural_height, :natural_width, :width])
|
489
503
|
end
|
490
504
|
class ImageCollection < ElementCollection
|
491
505
|
def element_class
|
@@ -493,7 +507,7 @@ module Watir
|
|
493
507
|
end
|
494
508
|
end
|
495
509
|
class Image < HTMLElement
|
496
|
-
attributes(:string => [:
|
510
|
+
attributes(:string => [:align, :border, :long_desc, :name], :int => [:hspace, :vspace])
|
497
511
|
end
|
498
512
|
# do nothing
|
499
513
|
class Mod < HTMLElement
|
@@ -524,16 +538,16 @@ module Watir
|
|
524
538
|
Span
|
525
539
|
end
|
526
540
|
end
|
527
|
-
class
|
528
|
-
attributes(:string => [:
|
541
|
+
class Data < HTMLElement
|
542
|
+
attributes(:string => [:value])
|
529
543
|
end
|
530
|
-
class
|
544
|
+
class DataCollection < ElementCollection
|
531
545
|
def element_class
|
532
|
-
|
546
|
+
Data
|
533
547
|
end
|
534
548
|
end
|
535
549
|
class Anchor < HTMLElement
|
536
|
-
attributes(:string => [:
|
550
|
+
attributes(:string => [:download, :hash, :host, :hostname, :href, :hreflang, :media, :pathname, :ping, :port, :protocol, :rel, :search, :target, :text, :type], :token_list => [:rel_list])
|
537
551
|
end
|
538
552
|
class AnchorCollection < ElementCollection
|
539
553
|
def element_class
|
@@ -541,7 +555,7 @@ module Watir
|
|
541
555
|
end
|
542
556
|
end
|
543
557
|
class Anchor < HTMLElement
|
544
|
-
attributes(:string => [:
|
558
|
+
attributes(:string => [:charset, :coords, :name, :rev, :shape])
|
545
559
|
end
|
546
560
|
# do nothing
|
547
561
|
class Div < HTMLElement
|
@@ -661,7 +675,7 @@ module Watir
|
|
661
675
|
end
|
662
676
|
# do nothing
|
663
677
|
class Body < HTMLElement
|
664
|
-
attributes(:function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :
|
678
|
+
attributes(:function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onscroll, :onstorage, :onunload])
|
665
679
|
end
|
666
680
|
class BodyCollection < ElementCollection
|
667
681
|
def element_class
|
@@ -669,11 +683,11 @@ module Watir
|
|
669
683
|
end
|
670
684
|
end
|
671
685
|
class Body < HTMLElement
|
672
|
-
attributes(:string => [:
|
686
|
+
attributes(:string => [:a_link, :background, :bg_color, :link, :text, :v_link])
|
673
687
|
end
|
674
688
|
# do nothing
|
675
689
|
class Script < HTMLElement
|
676
|
-
attributes(:
|
690
|
+
attributes(:bool => [:async, :defer], :string => [:charset, :src, :text, :type])
|
677
691
|
end
|
678
692
|
class ScriptCollection < ElementCollection
|
679
693
|
def element_class
|
@@ -693,7 +707,7 @@ module Watir
|
|
693
707
|
end
|
694
708
|
end
|
695
709
|
class Meta < HTMLElement
|
696
|
-
attributes(:string => [:
|
710
|
+
attributes(:string => [:content, :http_equiv, :name])
|
697
711
|
end
|
698
712
|
class MetaCollection < ElementCollection
|
699
713
|
def element_class
|
@@ -760,10 +774,6 @@ module Watir
|
|
760
774
|
|
761
775
|
|
762
776
|
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
777
|
module Container
|
768
778
|
#
|
769
779
|
# @return [Anchor]
|
@@ -1140,6 +1150,23 @@ module Watir
|
|
1140
1150
|
|
1141
1151
|
Watir.tag_to_class[:command] = Command
|
1142
1152
|
#
|
1153
|
+
# @return [Data]
|
1154
|
+
#
|
1155
|
+
|
1156
|
+
def data(*args)
|
1157
|
+
Data.new(self, extract_selector(args).merge(:tag_name => "data"))
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
#
|
1161
|
+
# @return [DataCollection]
|
1162
|
+
#
|
1163
|
+
|
1164
|
+
def data(*args)
|
1165
|
+
DataCollection.new(self, extract_selector(args).merge(:tag_name => "data"))
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
Watir.tag_to_class[:data] = Data
|
1169
|
+
#
|
1143
1170
|
# @return [DataList]
|
1144
1171
|
#
|
1145
1172
|
|
@@ -1202,7 +1229,7 @@ module Watir
|
|
1202
1229
|
# @return [DetailsCollection]
|
1203
1230
|
#
|
1204
1231
|
|
1205
|
-
def
|
1232
|
+
def detailses(*args)
|
1206
1233
|
DetailsCollection.new(self, extract_selector(args).merge(:tag_name => "details"))
|
1207
1234
|
end
|
1208
1235
|
|
@@ -2432,23 +2459,6 @@ module Watir
|
|
2432
2459
|
|
2433
2460
|
Watir.tag_to_class[:thead] = TableSection
|
2434
2461
|
#
|
2435
|
-
# @return [Time]
|
2436
|
-
#
|
2437
|
-
|
2438
|
-
def time(*args)
|
2439
|
-
Time.new(self, extract_selector(args).merge(:tag_name => "time"))
|
2440
|
-
end
|
2441
|
-
|
2442
|
-
#
|
2443
|
-
# @return [TimeCollection]
|
2444
|
-
#
|
2445
|
-
|
2446
|
-
def times(*args)
|
2447
|
-
TimeCollection.new(self, extract_selector(args).merge(:tag_name => "time"))
|
2448
|
-
end
|
2449
|
-
|
2450
|
-
Watir.tag_to_class[:time] = Time
|
2451
|
-
#
|
2452
2462
|
# @return [Title]
|
2453
2463
|
#
|
2454
2464
|
|