watir-webdriver 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +78 -126
  3. data/LICENSE +3 -1
  4. data/README.md +1 -1
  5. data/Rakefile +1 -1
  6. data/lib/watir-webdriver.rb +15 -1
  7. data/lib/watir-webdriver/browser.rb +2 -1
  8. data/lib/watir-webdriver/cookies.rb +35 -7
  9. data/lib/watir-webdriver/elements/area.rb +13 -0
  10. data/lib/watir-webdriver/elements/element.rb +3 -3
  11. data/lib/watir-webdriver/elements/generated.rb +94 -55
  12. data/lib/watir-webdriver/elements/{frame.rb → iframe.rb} +41 -28
  13. data/lib/watir-webdriver/elements/input.rb +0 -16
  14. data/lib/watir-webdriver/elements/link.rb +13 -1
  15. data/lib/watir-webdriver/elements/text_area.rb +17 -0
  16. data/lib/watir-webdriver/html/generator.rb +2 -2
  17. data/lib/watir-webdriver/html/spec_extractor.rb +31 -4
  18. data/lib/watir-webdriver/html/visitor.rb +12 -4
  19. data/lib/watir-webdriver/locators/button_locator.rb +7 -13
  20. data/lib/watir-webdriver/locators/element_locator.rb +9 -5
  21. data/lib/watir-webdriver/locators/text_area_locator.rb +20 -0
  22. data/lib/watir-webdriver/locators/text_field_locator.rb +8 -0
  23. data/lib/watir-webdriver/version.rb +1 -1
  24. data/lib/watir-webdriver/wait.rb +23 -11
  25. data/spec/browser_spec.rb +18 -18
  26. data/spec/click_spec.rb +5 -5
  27. data/spec/container_spec.rb +5 -11
  28. data/spec/element_locator_spec.rb +32 -26
  29. data/spec/element_spec.rb +9 -9
  30. data/spec/implementation.rb +6 -2
  31. data/spec/input_spec.rb +11 -5
  32. data/spec/locator_spec_helper.rb +3 -3
  33. data/spec/special_chars_spec.rb +1 -1
  34. data/support/travis.sh +19 -5
  35. data/watir-webdriver.gemspec +1 -0
  36. metadata +37 -38
  37. data/spec/html/wait.html +0 -28
  38. data/spec/wait_spec.rb +0 -118
data/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2009-2013 Jari Bakken
1
+ (the MIT License)
2
+
3
+ Copyright (c) 2009-2014 Jari Bakken
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -71,4 +71,4 @@ Note on Patches/Pull Requests
71
71
  Copyright
72
72
  ---------
73
73
 
74
- Copyright (c) 2009-2013 Jari Bakken. See LICENSE for details.
74
+ Copyright (c) 2009-2014 Jari Bakken. See LICENSE for details.
data/Rakefile CHANGED
@@ -61,7 +61,7 @@ namespace :html5 do
61
61
  end
62
62
  end
63
63
 
64
- desc 'Re-enerate the base Watir element classes from the spec '
64
+ desc 'Re-generate the base Watir element classes from the spec'
65
65
  task :generate => :html_lib do
66
66
  old_file = "lib/watir-webdriver/elements/generated.rb"
67
67
  generator = Watir::HTML::Generator.new
@@ -13,6 +13,7 @@ require 'watir-webdriver/container'
13
13
  require 'watir-webdriver/cookies'
14
14
  require 'watir-webdriver/locators/element_locator'
15
15
  require 'watir-webdriver/locators/button_locator'
16
+ require 'watir-webdriver/locators/text_area_locator'
16
17
  require 'watir-webdriver/locators/text_field_locator'
17
18
  require 'watir-webdriver/locators/child_row_locator'
18
19
  require 'watir-webdriver/locators/child_cell_locator'
@@ -35,6 +36,18 @@ module Watir
35
36
  def always_locate=(bool)
36
37
  @always_locate = bool
37
38
  end
39
+
40
+ def default_timeout
41
+ @default_timeout ||= 30
42
+ end
43
+
44
+ #
45
+ # Default wait time for wait methods.
46
+ #
47
+
48
+ def default_timeout=(value)
49
+ @default_timeout = value
50
+ end
38
51
 
39
52
  def prefer_css?
40
53
  @prefer_css
@@ -76,13 +89,14 @@ require 'watir-webdriver/element_collection'
76
89
  require 'watir-webdriver/elements/element'
77
90
  require 'watir-webdriver/elements/generated'
78
91
 
92
+ require 'watir-webdriver/elements/area'
79
93
  require 'watir-webdriver/elements/button'
80
94
  require 'watir-webdriver/elements/checkbox'
81
95
  require 'watir-webdriver/elements/dlist'
82
96
  require 'watir-webdriver/elements/file_field'
83
97
  require 'watir-webdriver/elements/font'
84
98
  require 'watir-webdriver/elements/form'
85
- require 'watir-webdriver/elements/frame'
99
+ require 'watir-webdriver/elements/iframe'
86
100
  require 'watir-webdriver/elements/hidden'
87
101
  require 'watir-webdriver/elements/image'
88
102
  require 'watir-webdriver/elements/input'
@@ -108,6 +108,7 @@ module Watir
108
108
  #
109
109
 
110
110
  def url
111
+ assert_exists
111
112
  @driver.current_url
112
113
  end
113
114
 
@@ -155,7 +156,7 @@ module Watir
155
156
  # browser.name
156
157
  # #=> :chrome
157
158
  #
158
- # @return [String]
159
+ # @return [Symbol]
159
160
  #
160
161
 
161
162
  def name
@@ -1,5 +1,8 @@
1
+ require 'yaml'
2
+
1
3
  module Watir
2
4
  class Cookies
5
+
3
6
  def initialize(control)
4
7
  @control = control
5
8
  end
@@ -31,7 +34,7 @@ module Watir
31
34
  # @param [Hash] opts
32
35
  # @option opts [Boolean] :secure
33
36
  # @option opts [String] :path
34
- # @option opts [] :expires TODO what type
37
+ # @option opts [Time, DateTime, NilClass] :expires
35
38
  # @option opts [String] :domain
36
39
  #
37
40
 
@@ -42,12 +45,9 @@ module Watir
42
45
  :secure => opts[:secure],
43
46
  :path => opts[:path],
44
47
  :expires => opts[:expires],
48
+ :domain => opts[:domain],
45
49
  }
46
50
 
47
- if opts[:domain]
48
- cookie[:domain] = opts[:domain]
49
- end
50
-
51
51
  @control.add_cookie cookie
52
52
  end
53
53
 
@@ -75,6 +75,34 @@ module Watir
75
75
  @control.delete_all_cookies
76
76
  end
77
77
 
78
+ #
79
+ # Save cookies to file
80
+ #
81
+ # @example
82
+ # browser.cookies.save '.cookies'
83
+ #
84
+ # @param [String] file
85
+ #
86
+
87
+ def save(file = '.cookies')
88
+ IO.write(file, to_a.to_yaml)
89
+ end
90
+
91
+ #
92
+ # Load cookies from file
93
+ #
94
+ # @example
95
+ # browser.cookies.load '.cookies'
96
+ #
97
+ # @param [String] file
98
+ #
99
+
100
+ def load(file = '.cookies')
101
+ YAML.load(IO.read(file)).each do |c|
102
+ add(c.delete(:name), c.delete(:value), c)
103
+ end
104
+ end
105
+
78
106
  private
79
107
 
80
108
  def to_time(t)
@@ -84,6 +112,6 @@ module Watir
84
112
  ::Time.local t.year, t.month, t.day, t.hour, t.min, t.sec
85
113
  end
86
114
  end
87
- end
88
- end
89
115
 
116
+ end # Cookies
117
+ end # Watir
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ module Watir
3
+ class Area < HTMLElement
4
+
5
+ #
6
+ # @todo temporarily add href attribute
7
+ #
8
+ # @see https://www.w3.org/Bugs/Public/show_bug.cgi?id=23192
9
+ #
10
+ attributes :string => [:href]
11
+
12
+ end # Area
13
+ end # Watir
@@ -275,11 +275,11 @@ module Watir
275
275
  end
276
276
 
277
277
  #
278
- # Returns inner HTML code of element.
278
+ # Returns outer (inner + element itself) HTML code of element.
279
279
  #
280
280
  # @example
281
281
  # browser.div(:id => "foo").html
282
- # #=> "<a>Click</a>"
282
+ # #=> "<div id=\"foo\"><a>Click</a></div>"
283
283
  #
284
284
  # @return [String]
285
285
  #
@@ -547,7 +547,7 @@ module Watir
547
547
 
548
548
  def method_missing(meth, *args, &blk)
549
549
  method = meth.to_s
550
- if method =~ /^data_(.+)$/
550
+ if method =~ ElementLocator::WILDCARD_ATTRIBUTE
551
551
  attribute_value(method.gsub(/_/, '-'), *args)
552
552
  else
553
553
  super
@@ -61,6 +61,15 @@ module Watir
61
61
 
62
62
 
63
63
 
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
64
73
 
65
74
 
66
75
 
@@ -72,7 +81,7 @@ module Watir
72
81
 
73
82
 
74
83
  class HTMLElement < Element
75
- attributes(:string => [:access_key, :access_key_label, :command_icon, :command_label, :command_type, :content_editable, :dir, :item_id, :item_value, :lang, :title], :bool => [:command_checked, :command_disabled, :command_hidden, :draggable, :hidden, :content_editable, :item_scope, :spellcheck, :translate], :html_element => [:context_menu], :string_map => [:dataset], :token_list => [:dropzone, :item_prop, :item_ref, :item_type], :function => [:onabort, :onblur, :oncancel, :oncanplay, :oncanplaythrough, :onchange, :onclick, :onclose, :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])
84
+ attributes(:string => [:access_key, :access_key_label, :command_icon, :command_label, :command_type, :content_editable, :dir, :item_id, :item_value, :lang, :title], :bool => [:command_checked, :command_disabled, :command_hidden, :draggable, :hidden, :inert, :content_editable, :item_scope, :spellcheck, :translate], :html_element => [:context_menu], :string_map => [:dataset], :token_list => [:dropzone, :item_prop, :item_ref, :item_type], :function => [:onabort, :onblur, :oncancel, :oncanplay, :oncanplaythrough, :onchange, :onclick, :onclose, :oncontextmenu, :oncuechange, :ondblclick, :ondrag, :ondragend, :ondragenter, :ondragexit, :ondragleave, :ondragover, :ondragstart, :ondrop, :ondurationchange, :onemptied, :onended, :onerror, :onfocus, :oninput, :oninvalid, :onkeydown, :onkeypress, :onkeyup, :onload, :onloadeddata, :onloadedmetadata, :onloadstart, :onmousedown, :onmouseenter, :onmouseleave, :onmousemove, :onmouseout, :onmouseover, :onmouseup, :onmousewheel, :onpause, :onplay, :onplaying, :onprogress, :onratechange, :onreset, :onscroll, :onseeked, :onseeking, :onselect, :onshow, :onsort, :onstalled, :onsubmit, :onsuspend, :ontimeupdate, :onvolumechange, :onwaiting], :properties_collection => [:properties], :int => [:tab_index])
76
85
  end
77
86
  class HTMLElementCollection < ElementCollection
78
87
  def element_class
@@ -95,24 +104,8 @@ module Watir
95
104
  Directory
96
105
  end
97
106
  end
98
- class BaseFont < HTMLElement
99
- attributes(:string => [:color, :face], :int => [:size])
100
- end
101
- class BaseFontCollection < ElementCollection
102
- def element_class
103
- BaseFont
104
- end
105
- end
106
- class Frame < HTMLElement
107
- attributes(:document => [:content_document], :string => [:content_window, :frame_border, :long_desc, :margin_height, :margin_width, :name, :scrolling, :src], :bool => [:no_resize])
108
- end
109
- class FrameCollection < ElementCollection
110
- def element_class
111
- Frame
112
- end
113
- end
114
107
  class FrameSet < HTMLElement
115
- attributes(:string => [:cols, :rows], :function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onscroll, :onstorage, :onunload])
108
+ attributes(:string => [:cols, :rows], :function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onhashchange, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onstorage, :onunload])
116
109
  end
117
110
  class FrameSetCollection < ElementCollection
118
111
  def element_class
@@ -143,6 +136,14 @@ module Watir
143
136
  Dialog
144
137
  end
145
138
  end
139
+ class MenuItem < HTMLElement
140
+ attributes(:bool => [:checked, :default, :disabled], :html_element => [:command], :string => [:icon, :label, :radiogroup, :type])
141
+ end
142
+ class MenuItemCollection < ElementCollection
143
+ def element_class
144
+ MenuItem
145
+ end
146
+ end
146
147
  class Menu < HTMLElement
147
148
  attributes(:string => [:label, :type])
148
149
  end
@@ -155,14 +156,6 @@ module Watir
155
156
  attributes(:bool => [:compact])
156
157
  end
157
158
  # do nothing
158
- class Command < HTMLElement
159
- attributes(:bool => [:checked, :disabled], :html_element => [:command], :string => [:icon, :label, :radiogroup, :type])
160
- end
161
- class CommandCollection < ElementCollection
162
- def element_class
163
- Command
164
- end
165
- end
166
159
  class Details < HTMLElement
167
160
  attributes(:bool => [:open])
168
161
  end
@@ -244,7 +237,7 @@ module Watir
244
237
  end
245
238
  end
246
239
  class Button < HTMLElement
247
- 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])
240
+ attributes(:bool => [:autofocus, :disabled, :form_no_validate, :will_validate], :html_element => [:form, :menu], :string => [:form_action, :form_enctype, :form_method, :form_target, :name, :type, :validation_message, :validity, :value], :list => [:labels])
248
241
  end
249
242
  class ButtonCollection < ElementCollection
250
243
  def element_class
@@ -308,11 +301,11 @@ module Watir
308
301
  end
309
302
  end
310
303
  class TableCell < HTMLElement
311
- attributes(:string => [:abbr, :align, :axis, :bg_color, :ch, :ch_off, :height, :v_align, :width], :bool => [:no_wrap])
304
+ attributes(:string => [:align, :axis, :bg_color, :ch, :ch_off, :height, :v_align, :width], :bool => [:no_wrap])
312
305
  end
313
306
  # do nothing
314
307
  class TableHeaderCell < TableCell
315
- attributes(:string => [:abbr, :scope])
308
+ attributes(:string => [:abbr, :scope, :sorted])
316
309
  end
317
310
  class TableHeaderCellCollection < ElementCollection
318
311
  def element_class
@@ -327,6 +320,10 @@ module Watir
327
320
  TableDataCell
328
321
  end
329
322
  end
323
+ class TableDataCell < TableCell
324
+ attributes(:string => [:abbr])
325
+ end
326
+ # do nothing
330
327
  class TableRow < HTMLElement
331
328
  attributes(:html_collection => [:cells], :int => [:row_index, :section_row_index])
332
329
  end
@@ -376,7 +373,7 @@ module Watir
376
373
  end
377
374
  # do nothing
378
375
  class Table < HTMLElement
379
- attributes(:html_element => [:caption, :t_foot, :t_head], :html_collection => [:rows, :t_bodies])
376
+ attributes(:html_element => [:caption, :t_foot, :t_head], :html_collection => [:rows, :t_bodies], :bool => [:sortable])
380
377
  end
381
378
  class TableCollection < ElementCollection
382
379
  def element_class
@@ -388,7 +385,7 @@ module Watir
388
385
  end
389
386
  # do nothing
390
387
  class Area < HTMLElement
391
- attributes(:string => [:alt, :coords, :download, :hash, :host, :hostname, :href, :hreflang, :media, :pathname, :ping, :port, :protocol, :rel, :search, :shape, :target, :type], :token_list => [:rel_list])
388
+ attributes(:string => [:alt, :coords, :download, :hreflang, :ping, :rel, :shape, :target, :type], :token_list => [:rel_list])
392
389
  end
393
390
  class AreaCollection < ElementCollection
394
391
  def element_class
@@ -416,7 +413,7 @@ module Watir
416
413
  end
417
414
  end
418
415
  class Media < HTMLElement
419
- 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, :playback_rate, :volume], :int => [:network_state, :ready_state], :date => [:start_date])
416
+ 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, :playback_rate, :volume], :int => [:network_state, :ready_state])
420
417
  end
421
418
  class MediaCollection < ElementCollection
422
419
  def element_class
@@ -492,7 +489,7 @@ module Watir
492
489
  end
493
490
  # do nothing
494
491
  class IFrame < HTMLElement
495
- attributes(:document => [:content_document], :string => [:content_window, :height, :name, :src, :srcdoc, :width], :token_list => [:sandbox], :bool => [:seamless])
492
+ attributes(:bool => [:allow_fullscreen, :seamless], :document => [:content_document], :string => [:content_window, :height, :name, :src, :srcdoc, :width], :token_list => [:sandbox])
496
493
  end
497
494
  class IFrameCollection < ElementCollection
498
495
  def element_class
@@ -512,7 +509,7 @@ module Watir
512
509
  end
513
510
  end
514
511
  class Image < HTMLElement
515
- attributes(:string => [:align, :border, :long_desc, :name], :int => [:hspace, :vspace])
512
+ attributes(:string => [:align, :border, :long_desc, :lowsrc, :name], :int => [:hspace, :vspace])
516
513
  end
517
514
  # do nothing
518
515
  class Mod < HTMLElement
@@ -544,7 +541,7 @@ module Watir
544
541
  end
545
542
  end
546
543
  class Time < HTMLElement
547
- attributes(:string => [:datetime])
544
+ attributes(:string => [:date_time])
548
545
  end
549
546
  class TimeCollection < ElementCollection
550
547
  def element_class
@@ -560,7 +557,7 @@ module Watir
560
557
  end
561
558
  end
562
559
  class Anchor < HTMLElement
563
- attributes(:string => [:download, :hash, :host, :hostname, :href, :hreflang, :media, :pathname, :ping, :port, :protocol, :rel, :search, :target, :text, :type], :token_list => [:rel_list])
560
+ attributes(:string => [:download, :hreflang, :ping, :rel, :target, :text, :type], :token_list => [:rel_list])
564
561
  end
565
562
  class AnchorCollection < ElementCollection
566
563
  def element_class
@@ -688,7 +685,7 @@ module Watir
688
685
  end
689
686
  # do nothing
690
687
  class Body < HTMLElement
691
- attributes(:function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onblur, :onerror, :onfocus, :onhashchange, :onload, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onscroll, :onstorage, :onunload])
688
+ attributes(:function => [:onafterprint, :onbeforeprint, :onbeforeunload, :onhashchange, :onmessage, :onoffline, :ononline, :onpagehide, :onpageshow, :onpopstate, :onresize, :onstorage, :onunload])
692
689
  end
693
690
  class BodyCollection < ElementCollection
694
691
  def element_class
@@ -699,8 +696,16 @@ module Watir
699
696
  attributes(:string => [:a_link, :background, :bg_color, :link, :text, :v_link])
700
697
  end
701
698
  # do nothing
699
+ class Template < HTMLElement
700
+ attributes(:document => [:content])
701
+ end
702
+ class TemplateCollection < ElementCollection
703
+ def element_class
704
+ Template
705
+ end
706
+ end
702
707
  class Script < HTMLElement
703
- attributes(:bool => [:async, :defer], :string => [:charset, :src, :text, :type])
708
+ attributes(:bool => [:async, :defer], :string => [:charset, :cross_origin, :src, :text, :type])
704
709
  end
705
710
  class ScriptCollection < ElementCollection
706
711
  def element_class
@@ -1146,23 +1151,6 @@ module Watir
1146
1151
 
1147
1152
  Watir.tag_to_class[:colgroup] = TableCol
1148
1153
  #
1149
- # @return [Command]
1150
- #
1151
-
1152
- def command(*args)
1153
- Command.new(self, extract_selector(args).merge(:tag_name => "command"))
1154
- end
1155
-
1156
- #
1157
- # @return [CommandCollection]
1158
- #
1159
-
1160
- def commands(*args)
1161
- CommandCollection.new(self, extract_selector(args).merge(:tag_name => "command"))
1162
- end
1163
-
1164
- Watir.tag_to_class[:command] = Command
1165
- #
1166
1154
  # @return [Data]
1167
1155
  #
1168
1156
 
@@ -1826,6 +1814,23 @@ module Watir
1826
1814
 
1827
1815
  Watir.tag_to_class[:li] = LI
1828
1816
  #
1817
+ # @return [HTMLElement]
1818
+ #
1819
+
1820
+ def main(*args)
1821
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "main"))
1822
+ end
1823
+
1824
+ #
1825
+ # @return [HTMLElementCollection]
1826
+ #
1827
+
1828
+ def mains(*args)
1829
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "main"))
1830
+ end
1831
+
1832
+ Watir.tag_to_class[:main] = HTMLElement
1833
+ #
1829
1834
  # @return [Map]
1830
1835
  #
1831
1836
 
@@ -1877,6 +1882,23 @@ module Watir
1877
1882
 
1878
1883
  Watir.tag_to_class[:menu] = Menu
1879
1884
  #
1885
+ # @return [MenuItem]
1886
+ #
1887
+
1888
+ def menuitem(*args)
1889
+ MenuItem.new(self, extract_selector(args).merge(:tag_name => "menuitem"))
1890
+ end
1891
+
1892
+ #
1893
+ # @return [MenuItemCollection]
1894
+ #
1895
+
1896
+ def menuitems(*args)
1897
+ MenuItemCollection.new(self, extract_selector(args).merge(:tag_name => "menuitem"))
1898
+ end
1899
+
1900
+ Watir.tag_to_class[:menuitem] = MenuItem
1901
+ #
1880
1902
  # @return [Meta]
1881
1903
  #
1882
1904
 
@@ -2438,6 +2460,23 @@ module Watir
2438
2460
 
2439
2461
  Watir.tag_to_class[:td] = TableDataCell
2440
2462
  #
2463
+ # @return [Template]
2464
+ #
2465
+
2466
+ def template(*args)
2467
+ Template.new(self, extract_selector(args).merge(:tag_name => "template"))
2468
+ end
2469
+
2470
+ #
2471
+ # @return [TemplateCollection]
2472
+ #
2473
+
2474
+ def templates(*args)
2475
+ TemplateCollection.new(self, extract_selector(args).merge(:tag_name => "template"))
2476
+ end
2477
+
2478
+ Watir.tag_to_class[:template] = Template
2479
+ #
2441
2480
  # @return [TextArea]
2442
2481
  #
2443
2482