watir 6.19.1 → 7.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.github/actions/install-chrome/action.yml +1 -0
  3. data/.github/actions/setup-linux/action.yml +8 -0
  4. data/.github/workflows/tests.yml +100 -0
  5. data/CHANGES.md +7 -0
  6. data/README.md +1 -4
  7. data/Rakefile +1 -1
  8. data/lib/watir.rb +1 -45
  9. data/lib/watir/alert.rb +3 -8
  10. data/lib/watir/capabilities.rb +54 -230
  11. data/lib/watir/cell_container.rb +4 -4
  12. data/lib/watir/container.rb +4 -26
  13. data/lib/watir/elements/checkbox.rb +4 -4
  14. data/lib/watir/elements/date_field.rb +4 -4
  15. data/lib/watir/elements/date_time_field.rb +4 -4
  16. data/lib/watir/elements/element.rb +12 -49
  17. data/lib/watir/elements/file_field.rb +4 -4
  18. data/lib/watir/elements/font.rb +4 -4
  19. data/lib/watir/elements/hidden.rb +4 -4
  20. data/lib/watir/elements/html_elements.rb +444 -445
  21. data/lib/watir/elements/iframe.rb +4 -4
  22. data/lib/watir/elements/radio.rb +4 -4
  23. data/lib/watir/elements/select.rb +12 -78
  24. data/lib/watir/elements/svg_elements.rb +96 -96
  25. data/lib/watir/elements/text_field.rb +4 -4
  26. data/lib/watir/generator/base/generator.rb +4 -4
  27. data/lib/watir/generator/base/visitor.rb +0 -29
  28. data/lib/watir/generator/html/generator.rb +2 -1
  29. data/lib/watir/has_window.rb +4 -4
  30. data/lib/watir/http_client.rb +0 -8
  31. data/lib/watir/locators.rb +1 -5
  32. data/lib/watir/locators/button/matcher.rb +0 -23
  33. data/lib/watir/locators/button/selector_builder/xpath.rb +4 -15
  34. data/lib/watir/locators/element/matcher.rb +4 -19
  35. data/lib/watir/locators/element/selector_builder.rb +2 -37
  36. data/lib/watir/locators/element/selector_builder/xpath.rb +26 -41
  37. data/lib/watir/radio_set.rb +2 -2
  38. data/lib/watir/row_container.rb +4 -4
  39. data/lib/watir/version.rb +1 -1
  40. data/lib/watir/wait.rb +4 -74
  41. data/lib/watir/window.rb +6 -22
  42. data/lib/watir/window_collection.rb +5 -49
  43. data/lib/watirspec/implementation.rb +4 -0
  44. data/spec/spec_helper.rb +2 -7
  45. data/spec/unit/capabilities_spec.rb +196 -929
  46. data/spec/unit/match_elements/button_spec.rb +0 -13
  47. data/spec/unit/match_elements/element_spec.rb +38 -47
  48. data/spec/unit/match_elements/text_field_spec.rb +6 -6
  49. data/spec/unit/selector_builder/element_spec.rb +6 -23
  50. data/spec/unit/selector_builder/text_field_spec.rb +6 -7
  51. data/spec/watirspec/alert_spec.rb +4 -21
  52. data/spec/watirspec/browser_spec.rb +2 -2
  53. data/spec/watirspec/cookies_spec.rb +1 -1
  54. data/spec/watirspec/elements/button_spec.rb +0 -10
  55. data/spec/watirspec/elements/checkbox_spec.rb +10 -22
  56. data/spec/watirspec/elements/div_spec.rb +4 -34
  57. data/spec/watirspec/elements/divs_spec.rb +2 -2
  58. data/spec/watirspec/elements/element_spec.rb +38 -84
  59. data/spec/watirspec/elements/form_spec.rb +2 -4
  60. data/spec/watirspec/elements/links_spec.rb +4 -4
  61. data/spec/watirspec/elements/select_list_spec.rb +7 -108
  62. data/spec/watirspec/elements/span_spec.rb +2 -2
  63. data/spec/watirspec/elements/spans_spec.rb +1 -1
  64. data/spec/watirspec/elements/strong_spec.rb +1 -1
  65. data/spec/watirspec/html/non_control_elements.html +8 -3
  66. data/spec/watirspec/support/rspec_matchers.rb +1 -32
  67. data/spec/watirspec/window_switching_spec.rb +2 -49
  68. data/spec/watirspec_helper.rb +6 -1
  69. data/watir.gemspec +3 -4
  70. metadata +11 -32
  71. data/.github/workflows/linux.yml +0 -61
  72. data/.github/workflows/mac.yml +0 -55
  73. data/.github/workflows/unit.yml +0 -37
  74. data/.github/workflows/windows.yml +0 -39
  75. data/lib/watir/legacy_wait.rb +0 -123
  76. data/spec/unit/container_spec.rb +0 -35
  77. data/spec/watirspec/legacy_wait_spec.rb +0 -216
@@ -6,8 +6,8 @@ module Watir
6
6
  # @return [Cell]
7
7
  #
8
8
 
9
- def cell(*args)
10
- Cell.new(self, extract_selector(args))
9
+ def cell(opts = {})
10
+ Cell.new(self, opts)
11
11
  end
12
12
 
13
13
  #
@@ -16,8 +16,8 @@ module Watir
16
16
  # @return [Cell]
17
17
  #
18
18
 
19
- def cells(*args)
20
- CellCollection.new(self, extract_selector(args))
19
+ def cells(opts = {})
20
+ CellCollection.new(self, opts)
21
21
  end
22
22
  end # CellContainer
23
23
  end # Watir
@@ -11,8 +11,8 @@ module Watir
11
11
  # @return [HTMLElement]
12
12
  #
13
13
 
14
- def element(*args)
15
- HTMLElement.new(self, extract_selector(args))
14
+ def element(opts = {})
15
+ HTMLElement.new(self, opts)
16
16
  end
17
17
 
18
18
  #
@@ -24,30 +24,8 @@ module Watir
24
24
  # @return [HTMLElementCollection]
25
25
  #
26
26
 
27
- def elements(*args)
28
- HTMLElementCollection.new(self, extract_selector(args))
29
- end
30
-
31
- #
32
- # @api private
33
- #
34
-
35
- def extract_selector(selector)
36
- case selector.size
37
- when 2
38
- msg = "Using ordered parameters to locate elements (:#{selector.first}, #{selector.last.inspect})"
39
- Watir.logger.deprecate msg,
40
- "{#{selector.first}: #{selector.last.inspect}}",
41
- ids: [:selector_parameters]
42
- return {selector[0] => selector[1]}
43
- when 1
44
- obj = selector.first
45
- return obj if obj.is_a? Hash
46
- when 0
47
- return {}
48
- end
49
-
50
- raise ArgumentError, "expected Hash, got #{selector.inspect}"
27
+ def elements(opts = {})
28
+ HTMLElementCollection.new(self, opts)
51
29
  end
52
30
  end # Container
53
31
  end # Watir
@@ -40,12 +40,12 @@ module Watir
40
40
  end # CheckBox
41
41
 
42
42
  module Container
43
- def checkbox(*args)
44
- CheckBox.new(self, extract_selector(args).merge(tag_name: 'input', type: 'checkbox'))
43
+ def checkbox(opts = {})
44
+ CheckBox.new(self, opts.merge(tag_name: 'input', type: 'checkbox'))
45
45
  end
46
46
 
47
- def checkboxes(*args)
48
- CheckBoxCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'checkbox'))
47
+ def checkboxes(opts = {})
48
+ CheckBoxCollection.new(self, opts.merge(tag_name: 'input', type: 'checkbox'))
49
49
  end
50
50
  end # Container
51
51
 
@@ -18,12 +18,12 @@ module Watir
18
18
  end # DateField
19
19
 
20
20
  module Container
21
- def date_field(*args)
22
- DateField.new(self, extract_selector(args).merge(tag_name: 'input', type: 'date'))
21
+ def date_field(opts = {})
22
+ DateField.new(self, opts.merge(tag_name: 'input', type: 'date'))
23
23
  end
24
24
 
25
- def date_fields(*args)
26
- DateFieldCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'date'))
25
+ def date_fields(opts = {})
26
+ DateFieldCollection.new(self, opts.merge(tag_name: 'input', type: 'date'))
27
27
  end
28
28
  end # Container
29
29
 
@@ -18,12 +18,12 @@ module Watir
18
18
  end # DateTimeField
19
19
 
20
20
  module Container
21
- def date_time_field(*args)
22
- DateTimeField.new(self, extract_selector(args).merge(tag_name: 'input', type: 'datetime-local'))
21
+ def date_time_field(opts = {})
22
+ DateTimeField.new(self, opts.merge(tag_name: 'input', type: 'datetime-local'))
23
23
  end
24
24
 
25
- def date_time_fields(*args)
26
- DateTimeFieldCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'datetime-local'))
25
+ def date_time_fields(opts = {})
26
+ DateTimeFieldCollection.new(self, opts.merge(tag_name: 'input', type: 'datetime-local'))
27
27
  end
28
28
  end # Container
29
29
 
@@ -8,7 +8,6 @@ module Watir
8
8
 
9
9
  include Exception
10
10
  include Container
11
- include EventuallyPresent
12
11
  include Waitable
13
12
  include Adjacent
14
13
  include JSExecution
@@ -45,11 +44,10 @@ module Watir
45
44
 
46
45
  raise ArgumentError, "invalid argument: #{selector.inspect}" unless selector.is_a? Hash
47
46
 
47
+ selector[:index] = 0 if selector.empty?
48
48
  @element = selector.delete(:element)
49
49
 
50
- if @element && !(selector.keys - %i[tag_name]).empty?
51
- Watir.logger.deprecate(':element locator to initialize a relocatable Element', '#cache=', ids: [:element_cache])
52
- end
50
+ selector = {} if @element && !(selector.keys - [:tag_name]).empty?
53
51
 
54
52
  @selector = selector
55
53
 
@@ -375,21 +373,6 @@ module Watir
375
373
  element_call { @element == driver.switch_to.active_element }
376
374
  end
377
375
 
378
- #
379
- # Scroll until the element is in the view screen
380
- #
381
- # @example
382
- # browser.button(name: "new_user_button").scroll_into_view
383
- #
384
- # @return [Selenium::WebDriver::Point]
385
- #
386
-
387
- def scroll_into_view
388
- Watir.logger.deprecate 'Element#scroll_into_view', 'Element#scroll methods', ids: [:scroll_into_view]
389
-
390
- element_call { @element.location_once_scrolled_into_view }
391
- end
392
-
393
376
  #
394
377
  # location of element (x, y)
395
378
  #
@@ -478,20 +461,6 @@ module Watir
478
461
  @element
479
462
  end
480
463
 
481
- #
482
- # Returns true if this element is visible on the page.
483
- # Raises exception if element does not exist
484
- #
485
- # @return [Boolean]
486
- #
487
-
488
- def visible?
489
- msg = '#visible? behavior will be changing slightly, consider switching to #present? ' \
490
- '(more details: http://watir.com/element-existentialism/)'
491
- Watir.logger.warn msg, ids: [:visible_element]
492
- display_check
493
- end
494
-
495
464
  #
496
465
  # Returns true if this element is present and enabled on the page.
497
466
  #
@@ -512,10 +481,15 @@ module Watir
512
481
  #
513
482
 
514
483
  def present?
515
- display_check
484
+ assert_exists
485
+ @element.displayed?
516
486
  rescue UnknownObjectException, UnknownFrameException
517
487
  false
488
+ rescue Selenium::WebDriver::Error::StaleElementReferenceError
489
+ reset!
490
+ retry
518
491
  end
492
+ alias visible? present?
519
493
 
520
494
  #
521
495
  # Returns true if the element's center point is covered by a non-descendant element.
@@ -621,6 +595,9 @@ module Watir
621
595
  #
622
596
 
623
597
  def locate
598
+ msg = 'Can not relocate a Watir element initialized by a Selenium element'
599
+ raise LocatorException, msg if @selector.empty?
600
+
624
601
  ensure_context
625
602
  locate_in_context
626
603
  self
@@ -669,7 +646,6 @@ module Watir
669
646
  protected
670
647
 
671
648
  def wait_for_exists
672
- return assert_exists unless Watir.relaxed_locate?
673
649
  return if located? # Performance shortcut
674
650
 
675
651
  begin
@@ -682,8 +658,7 @@ module Watir
682
658
  end
683
659
 
684
660
  def wait_for_present
685
- p = present?
686
- return p if !Watir.relaxed_locate? || p
661
+ return true if present?
687
662
 
688
663
  begin
689
664
  @query_scope.wait_for_present unless @query_scope.is_a? Browser
@@ -696,8 +671,6 @@ module Watir
696
671
  end
697
672
 
698
673
  def wait_for_enabled
699
- return assert_enabled unless Watir.relaxed_locate?
700
-
701
674
  wait_for_exists
702
675
  return unless [Input, Button, Select, Option].any? { |c| is_a? c } || content_editable
703
676
  return if enabled?
@@ -711,7 +684,6 @@ module Watir
711
684
 
712
685
  def wait_for_writable
713
686
  wait_for_enabled
714
- raise_writable unless Watir.relaxed_locate? || (!respond_to?(:readonly?) || !readonly?)
715
687
 
716
688
  return if !respond_to?(:readonly?) || !readonly?
717
689
 
@@ -779,15 +751,6 @@ module Watir
779
751
  raise TypeError, "expected Watir::Element, got #{obj.inspect}:#{obj.class}" unless obj.is_a? Element
780
752
  end
781
753
 
782
- # Removes duplication in #present? & #visible? and makes setting deprecation notice easier
783
- def display_check
784
- assert_exists
785
- @element.displayed?
786
- rescue Selenium::WebDriver::Error::StaleElementReferenceError
787
- reset!
788
- retry
789
- end
790
-
791
754
  # TODO: - this will get addressed with Watir::Executor implementation
792
755
  # rubocop:disable Metrics/AbcSize
793
756
  # rubocop:disable Metrics/MethodLength
@@ -27,12 +27,12 @@ module Watir
27
27
  end # FileField
28
28
 
29
29
  module Container
30
- def file_field(*args)
31
- FileField.new(self, extract_selector(args).merge(tag_name: 'input', type: 'file'))
30
+ def file_field(opts = {})
31
+ FileField.new(self, opts.merge(tag_name: 'input', type: 'file'))
32
32
  end
33
33
 
34
- def file_fields(*args)
35
- FileFieldCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'file'))
34
+ def file_fields(opts = {})
35
+ FileFieldCollection.new(self, opts.merge(tag_name: 'input', type: 'file'))
36
36
  end
37
37
  end # Container
38
38
 
@@ -12,12 +12,12 @@ module Watir
12
12
  end # Font
13
13
 
14
14
  module Container
15
- def font(*args)
16
- Font.new(self, extract_selector(args).merge(tag_name: 'font'))
15
+ def font(opts = {})
16
+ Font.new(self, opts.merge(tag_name: 'font'))
17
17
  end
18
18
 
19
- def fonts(*args)
20
- FontCollection.new(self, extract_selector(args).merge(tag_name: 'font'))
19
+ def fonts(opts = {})
20
+ FontCollection.new(self, opts.merge(tag_name: 'font'))
21
21
  end
22
22
  end # Container
23
23
  end # Watir
@@ -10,12 +10,12 @@ module Watir
10
10
  end
11
11
 
12
12
  module Container
13
- def hidden(*args)
14
- Hidden.new(self, extract_selector(args).merge(tag_name: 'input', type: 'hidden'))
13
+ def hidden(opts = {})
14
+ Hidden.new(self, opts.merge(tag_name: 'input', type: 'hidden'))
15
15
  end
16
16
 
17
- def hiddens(*args)
18
- HiddenCollection.new(self, extract_selector(args).merge(tag_name: 'input', type: 'hidden'))
17
+ def hiddens(opts = {})
18
+ HiddenCollection.new(self, opts.merge(tag_name: 'input', type: 'hidden'))
19
19
  end
20
20
  end # Container
21
21
 
@@ -467,7 +467,6 @@ module Watir
467
467
  end
468
468
 
469
469
  class Table < HTMLElement
470
- attribute(String, :caption, :caption)
471
470
  attribute(String, :tbodies, :tBodies)
472
471
  attribute(String, :align, :align)
473
472
  attribute(String, :border, :border)
@@ -870,1112 +869,1112 @@ module Watir
870
869
  module Container
871
870
 
872
871
  # @return [Anchor]
873
- def a(*args)
874
- Anchor.new(self, extract_selector(args).merge(tag_name: "a"))
872
+ def a(opts = {})
873
+ Anchor.new(self, opts.merge(tag_name: "a"))
875
874
  end
876
875
  # @return [AnchorCollection]
877
- def as(*args)
878
- AnchorCollection.new(self, extract_selector(args).merge(tag_name: "a"))
876
+ def as(opts = {})
877
+ AnchorCollection.new(self, opts.merge(tag_name: "a"))
879
878
  end
880
879
  Watir.tag_to_class[:a] = Anchor
881
880
 
882
881
  # @return [HTMLElement]
883
- def abbr(*args)
884
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "abbr"))
882
+ def abbr(opts = {})
883
+ HTMLElement.new(self, opts.merge(tag_name: "abbr"))
885
884
  end
886
885
  # @return [HTMLElementCollection]
887
- def abbrs(*args)
888
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "abbr"))
886
+ def abbrs(opts = {})
887
+ HTMLElementCollection.new(self, opts.merge(tag_name: "abbr"))
889
888
  end
890
889
  Watir.tag_to_class[:abbr] = HTMLElement
891
890
 
892
891
  # @return [HTMLElement]
893
- def address(*args)
894
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "address"))
892
+ def address(opts = {})
893
+ HTMLElement.new(self, opts.merge(tag_name: "address"))
895
894
  end
896
895
  # @return [HTMLElementCollection]
897
- def addresses(*args)
898
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "address"))
896
+ def addresses(opts = {})
897
+ HTMLElementCollection.new(self, opts.merge(tag_name: "address"))
899
898
  end
900
899
  Watir.tag_to_class[:address] = HTMLElement
901
900
 
902
901
  # @return [Area]
903
- def area(*args)
904
- Area.new(self, extract_selector(args).merge(tag_name: "area"))
902
+ def area(opts = {})
903
+ Area.new(self, opts.merge(tag_name: "area"))
905
904
  end
906
905
  # @return [AreaCollection]
907
- def areas(*args)
908
- AreaCollection.new(self, extract_selector(args).merge(tag_name: "area"))
906
+ def areas(opts = {})
907
+ AreaCollection.new(self, opts.merge(tag_name: "area"))
909
908
  end
910
909
  Watir.tag_to_class[:area] = Area
911
910
 
912
911
  # @return [HTMLElement]
913
- def article(*args)
914
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "article"))
912
+ def article(opts = {})
913
+ HTMLElement.new(self, opts.merge(tag_name: "article"))
915
914
  end
916
915
  # @return [HTMLElementCollection]
917
- def articles(*args)
918
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "article"))
916
+ def articles(opts = {})
917
+ HTMLElementCollection.new(self, opts.merge(tag_name: "article"))
919
918
  end
920
919
  Watir.tag_to_class[:article] = HTMLElement
921
920
 
922
921
  # @return [HTMLElement]
923
- def aside(*args)
924
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "aside"))
922
+ def aside(opts = {})
923
+ HTMLElement.new(self, opts.merge(tag_name: "aside"))
925
924
  end
926
925
  # @return [HTMLElementCollection]
927
- def asides(*args)
928
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "aside"))
926
+ def asides(opts = {})
927
+ HTMLElementCollection.new(self, opts.merge(tag_name: "aside"))
929
928
  end
930
929
  Watir.tag_to_class[:aside] = HTMLElement
931
930
 
932
931
  # @return [Audio]
933
- def audio(*args)
934
- Audio.new(self, extract_selector(args).merge(tag_name: "audio"))
932
+ def audio(opts = {})
933
+ Audio.new(self, opts.merge(tag_name: "audio"))
935
934
  end
936
935
  # @return [AudioCollection]
937
- def audios(*args)
938
- AudioCollection.new(self, extract_selector(args).merge(tag_name: "audio"))
936
+ def audios(opts = {})
937
+ AudioCollection.new(self, opts.merge(tag_name: "audio"))
939
938
  end
940
939
  Watir.tag_to_class[:audio] = Audio
941
940
 
942
941
  # @return [HTMLElement]
943
- def b(*args)
944
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "b"))
942
+ def b(opts = {})
943
+ HTMLElement.new(self, opts.merge(tag_name: "b"))
945
944
  end
946
945
  # @return [HTMLElementCollection]
947
- def bs(*args)
948
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "b"))
946
+ def bs(opts = {})
947
+ HTMLElementCollection.new(self, opts.merge(tag_name: "b"))
949
948
  end
950
949
  Watir.tag_to_class[:b] = HTMLElement
951
950
 
952
951
  # @return [Base]
953
- def base(*args)
954
- Base.new(self, extract_selector(args).merge(tag_name: "base"))
952
+ def base(opts = {})
953
+ Base.new(self, opts.merge(tag_name: "base"))
955
954
  end
956
955
  # @return [BaseCollection]
957
- def bases(*args)
958
- BaseCollection.new(self, extract_selector(args).merge(tag_name: "base"))
956
+ def bases(opts = {})
957
+ BaseCollection.new(self, opts.merge(tag_name: "base"))
959
958
  end
960
959
  Watir.tag_to_class[:base] = Base
961
960
 
962
961
  # @return [HTMLElement]
963
- def bdi(*args)
964
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "bdi"))
962
+ def bdi(opts = {})
963
+ HTMLElement.new(self, opts.merge(tag_name: "bdi"))
965
964
  end
966
965
  # @return [HTMLElementCollection]
967
- def bdis(*args)
968
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "bdi"))
966
+ def bdis(opts = {})
967
+ HTMLElementCollection.new(self, opts.merge(tag_name: "bdi"))
969
968
  end
970
969
  Watir.tag_to_class[:bdi] = HTMLElement
971
970
 
972
971
  # @return [HTMLElement]
973
- def bdo(*args)
974
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "bdo"))
972
+ def bdo(opts = {})
973
+ HTMLElement.new(self, opts.merge(tag_name: "bdo"))
975
974
  end
976
975
  # @return [HTMLElementCollection]
977
- def bdos(*args)
978
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "bdo"))
976
+ def bdos(opts = {})
977
+ HTMLElementCollection.new(self, opts.merge(tag_name: "bdo"))
979
978
  end
980
979
  Watir.tag_to_class[:bdo] = HTMLElement
981
980
 
982
981
  # @return [Quote]
983
- def blockquote(*args)
984
- Quote.new(self, extract_selector(args).merge(tag_name: "blockquote"))
982
+ def blockquote(opts = {})
983
+ Quote.new(self, opts.merge(tag_name: "blockquote"))
985
984
  end
986
985
  # @return [QuoteCollection]
987
- def blockquotes(*args)
988
- QuoteCollection.new(self, extract_selector(args).merge(tag_name: "blockquote"))
986
+ def blockquotes(opts = {})
987
+ QuoteCollection.new(self, opts.merge(tag_name: "blockquote"))
989
988
  end
990
989
  Watir.tag_to_class[:blockquote] = Quote
991
990
 
992
991
  # @return [Body]
993
- def body(*args)
994
- Body.new(self, extract_selector(args).merge(tag_name: "body"))
992
+ def body(opts = {})
993
+ Body.new(self, opts.merge(tag_name: "body"))
995
994
  end
996
995
  # @return [BodyCollection]
997
- def bodys(*args)
998
- BodyCollection.new(self, extract_selector(args).merge(tag_name: "body"))
996
+ def bodys(opts = {})
997
+ BodyCollection.new(self, opts.merge(tag_name: "body"))
999
998
  end
1000
999
  Watir.tag_to_class[:body] = Body
1001
1000
 
1002
1001
  # @return [BR]
1003
- def br(*args)
1004
- BR.new(self, extract_selector(args).merge(tag_name: "br"))
1002
+ def br(opts = {})
1003
+ BR.new(self, opts.merge(tag_name: "br"))
1005
1004
  end
1006
1005
  # @return [BRCollection]
1007
- def brs(*args)
1008
- BRCollection.new(self, extract_selector(args).merge(tag_name: "br"))
1006
+ def brs(opts = {})
1007
+ BRCollection.new(self, opts.merge(tag_name: "br"))
1009
1008
  end
1010
1009
  Watir.tag_to_class[:br] = BR
1011
1010
 
1012
1011
  # @return [Button]
1013
- def button(*args)
1014
- Button.new(self, extract_selector(args).merge(tag_name: "button"))
1012
+ def button(opts = {})
1013
+ Button.new(self, opts.merge(tag_name: "button"))
1015
1014
  end
1016
1015
  # @return [ButtonCollection]
1017
- def buttons(*args)
1018
- ButtonCollection.new(self, extract_selector(args).merge(tag_name: "button"))
1016
+ def buttons(opts = {})
1017
+ ButtonCollection.new(self, opts.merge(tag_name: "button"))
1019
1018
  end
1020
1019
  Watir.tag_to_class[:button] = Button
1021
1020
 
1022
1021
  # @return [Canvas]
1023
- def canvas(*args)
1024
- Canvas.new(self, extract_selector(args).merge(tag_name: "canvas"))
1022
+ def canvas(opts = {})
1023
+ Canvas.new(self, opts.merge(tag_name: "canvas"))
1025
1024
  end
1026
1025
  # @return [CanvasCollection]
1027
- def canvases(*args)
1028
- CanvasCollection.new(self, extract_selector(args).merge(tag_name: "canvas"))
1026
+ def canvases(opts = {})
1027
+ CanvasCollection.new(self, opts.merge(tag_name: "canvas"))
1029
1028
  end
1030
1029
  Watir.tag_to_class[:canvas] = Canvas
1031
1030
 
1032
1031
  # @return [TableCaption]
1033
- def caption(*args)
1034
- TableCaption.new(self, extract_selector(args).merge(tag_name: "caption"))
1032
+ def caption(opts = {})
1033
+ TableCaption.new(self, opts.merge(tag_name: "caption"))
1035
1034
  end
1036
1035
  # @return [TableCaptionCollection]
1037
- def captions(*args)
1038
- TableCaptionCollection.new(self, extract_selector(args).merge(tag_name: "caption"))
1036
+ def captions(opts = {})
1037
+ TableCaptionCollection.new(self, opts.merge(tag_name: "caption"))
1039
1038
  end
1040
1039
  Watir.tag_to_class[:caption] = TableCaption
1041
1040
 
1042
1041
  # @return [HTMLElement]
1043
- def cite(*args)
1044
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "cite"))
1042
+ def cite(opts = {})
1043
+ HTMLElement.new(self, opts.merge(tag_name: "cite"))
1045
1044
  end
1046
1045
  # @return [HTMLElementCollection]
1047
- def cites(*args)
1048
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "cite"))
1046
+ def cites(opts = {})
1047
+ HTMLElementCollection.new(self, opts.merge(tag_name: "cite"))
1049
1048
  end
1050
1049
  Watir.tag_to_class[:cite] = HTMLElement
1051
1050
 
1052
1051
  # @return [HTMLElement]
1053
- def code(*args)
1054
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "code"))
1052
+ def code(opts = {})
1053
+ HTMLElement.new(self, opts.merge(tag_name: "code"))
1055
1054
  end
1056
1055
  # @return [HTMLElementCollection]
1057
- def codes(*args)
1058
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "code"))
1056
+ def codes(opts = {})
1057
+ HTMLElementCollection.new(self, opts.merge(tag_name: "code"))
1059
1058
  end
1060
1059
  Watir.tag_to_class[:code] = HTMLElement
1061
1060
 
1062
1061
  # @return [TableCol]
1063
- def col(*args)
1064
- TableCol.new(self, extract_selector(args).merge(tag_name: "col"))
1062
+ def col(opts = {})
1063
+ TableCol.new(self, opts.merge(tag_name: "col"))
1065
1064
  end
1066
1065
  # @return [TableColCollection]
1067
- def cols(*args)
1068
- TableColCollection.new(self, extract_selector(args).merge(tag_name: "col"))
1066
+ def cols(opts = {})
1067
+ TableColCollection.new(self, opts.merge(tag_name: "col"))
1069
1068
  end
1070
1069
  Watir.tag_to_class[:col] = TableCol
1071
1070
 
1072
1071
  # @return [TableCol]
1073
- def colgroup(*args)
1074
- TableCol.new(self, extract_selector(args).merge(tag_name: "colgroup"))
1072
+ def colgroup(opts = {})
1073
+ TableCol.new(self, opts.merge(tag_name: "colgroup"))
1075
1074
  end
1076
1075
  # @return [TableColCollection]
1077
- def colgroups(*args)
1078
- TableColCollection.new(self, extract_selector(args).merge(tag_name: "colgroup"))
1076
+ def colgroups(opts = {})
1077
+ TableColCollection.new(self, opts.merge(tag_name: "colgroup"))
1079
1078
  end
1080
1079
  Watir.tag_to_class[:colgroup] = TableCol
1081
1080
 
1082
1081
  # @return [Data]
1083
- def data(*args)
1084
- Data.new(self, extract_selector(args).merge(tag_name: "data"))
1082
+ def data(opts = {})
1083
+ Data.new(self, opts.merge(tag_name: "data"))
1085
1084
  end
1086
1085
  # @return [DataCollection]
1087
- def datas(*args)
1088
- DataCollection.new(self, extract_selector(args).merge(tag_name: "data"))
1086
+ def datas(opts = {})
1087
+ DataCollection.new(self, opts.merge(tag_name: "data"))
1089
1088
  end
1090
1089
  Watir.tag_to_class[:data] = Data
1091
1090
 
1092
1091
  # @return [DataList]
1093
- def datalist(*args)
1094
- DataList.new(self, extract_selector(args).merge(tag_name: "datalist"))
1092
+ def datalist(opts = {})
1093
+ DataList.new(self, opts.merge(tag_name: "datalist"))
1095
1094
  end
1096
1095
  # @return [DataListCollection]
1097
- def datalists(*args)
1098
- DataListCollection.new(self, extract_selector(args).merge(tag_name: "datalist"))
1096
+ def datalists(opts = {})
1097
+ DataListCollection.new(self, opts.merge(tag_name: "datalist"))
1099
1098
  end
1100
1099
  Watir.tag_to_class[:datalist] = DataList
1101
1100
 
1102
1101
  # @return [HTMLElement]
1103
- def dd(*args)
1104
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "dd"))
1102
+ def dd(opts = {})
1103
+ HTMLElement.new(self, opts.merge(tag_name: "dd"))
1105
1104
  end
1106
1105
  # @return [HTMLElementCollection]
1107
- def dds(*args)
1108
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "dd"))
1106
+ def dds(opts = {})
1107
+ HTMLElementCollection.new(self, opts.merge(tag_name: "dd"))
1109
1108
  end
1110
1109
  Watir.tag_to_class[:dd] = HTMLElement
1111
1110
 
1112
1111
  # @return [Mod]
1113
- def del(*args)
1114
- Mod.new(self, extract_selector(args).merge(tag_name: "del"))
1112
+ def del(opts = {})
1113
+ Mod.new(self, opts.merge(tag_name: "del"))
1115
1114
  end
1116
1115
  # @return [ModCollection]
1117
- def dels(*args)
1118
- ModCollection.new(self, extract_selector(args).merge(tag_name: "del"))
1116
+ def dels(opts = {})
1117
+ ModCollection.new(self, opts.merge(tag_name: "del"))
1119
1118
  end
1120
1119
  Watir.tag_to_class[:del] = Mod
1121
1120
 
1122
1121
  # @return [Details]
1123
- def details(*args)
1124
- Details.new(self, extract_selector(args).merge(tag_name: "details"))
1122
+ def details(opts = {})
1123
+ Details.new(self, opts.merge(tag_name: "details"))
1125
1124
  end
1126
1125
  # @return [DetailsCollection]
1127
- def detailses(*args)
1128
- DetailsCollection.new(self, extract_selector(args).merge(tag_name: "details"))
1126
+ def detailses(opts = {})
1127
+ DetailsCollection.new(self, opts.merge(tag_name: "details"))
1129
1128
  end
1130
1129
  Watir.tag_to_class[:details] = Details
1131
1130
 
1132
1131
  # @return [HTMLElement]
1133
- def dfn(*args)
1134
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "dfn"))
1132
+ def dfn(opts = {})
1133
+ HTMLElement.new(self, opts.merge(tag_name: "dfn"))
1135
1134
  end
1136
1135
  # @return [HTMLElementCollection]
1137
- def dfns(*args)
1138
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "dfn"))
1136
+ def dfns(opts = {})
1137
+ HTMLElementCollection.new(self, opts.merge(tag_name: "dfn"))
1139
1138
  end
1140
1139
  Watir.tag_to_class[:dfn] = HTMLElement
1141
1140
 
1142
1141
  # @return [Dialog]
1143
- def dialog(*args)
1144
- Dialog.new(self, extract_selector(args).merge(tag_name: "dialog"))
1142
+ def dialog(opts = {})
1143
+ Dialog.new(self, opts.merge(tag_name: "dialog"))
1145
1144
  end
1146
1145
  # @return [DialogCollection]
1147
- def dialogs(*args)
1148
- DialogCollection.new(self, extract_selector(args).merge(tag_name: "dialog"))
1146
+ def dialogs(opts = {})
1147
+ DialogCollection.new(self, opts.merge(tag_name: "dialog"))
1149
1148
  end
1150
1149
  Watir.tag_to_class[:dialog] = Dialog
1151
1150
 
1152
1151
  # @return [Div]
1153
- def div(*args)
1154
- Div.new(self, extract_selector(args).merge(tag_name: "div"))
1152
+ def div(opts = {})
1153
+ Div.new(self, opts.merge(tag_name: "div"))
1155
1154
  end
1156
1155
  # @return [DivCollection]
1157
- def divs(*args)
1158
- DivCollection.new(self, extract_selector(args).merge(tag_name: "div"))
1156
+ def divs(opts = {})
1157
+ DivCollection.new(self, opts.merge(tag_name: "div"))
1159
1158
  end
1160
1159
  Watir.tag_to_class[:div] = Div
1161
1160
 
1162
1161
  # @return [DList]
1163
- def dl(*args)
1164
- DList.new(self, extract_selector(args).merge(tag_name: "dl"))
1162
+ def dl(opts = {})
1163
+ DList.new(self, opts.merge(tag_name: "dl"))
1165
1164
  end
1166
1165
  # @return [DListCollection]
1167
- def dls(*args)
1168
- DListCollection.new(self, extract_selector(args).merge(tag_name: "dl"))
1166
+ def dls(opts = {})
1167
+ DListCollection.new(self, opts.merge(tag_name: "dl"))
1169
1168
  end
1170
1169
  Watir.tag_to_class[:dl] = DList
1171
1170
 
1172
1171
  # @return [HTMLElement]
1173
- def dt(*args)
1174
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "dt"))
1172
+ def dt(opts = {})
1173
+ HTMLElement.new(self, opts.merge(tag_name: "dt"))
1175
1174
  end
1176
1175
  # @return [HTMLElementCollection]
1177
- def dts(*args)
1178
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "dt"))
1176
+ def dts(opts = {})
1177
+ HTMLElementCollection.new(self, opts.merge(tag_name: "dt"))
1179
1178
  end
1180
1179
  Watir.tag_to_class[:dt] = HTMLElement
1181
1180
 
1182
1181
  # @return [HTMLElement]
1183
- def em(*args)
1184
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "em"))
1182
+ def em(opts = {})
1183
+ HTMLElement.new(self, opts.merge(tag_name: "em"))
1185
1184
  end
1186
1185
  # @return [HTMLElementCollection]
1187
- def ems(*args)
1188
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "em"))
1186
+ def ems(opts = {})
1187
+ HTMLElementCollection.new(self, opts.merge(tag_name: "em"))
1189
1188
  end
1190
1189
  Watir.tag_to_class[:em] = HTMLElement
1191
1190
 
1192
1191
  # @return [Embed]
1193
- def embed(*args)
1194
- Embed.new(self, extract_selector(args).merge(tag_name: "embed"))
1192
+ def embed(opts = {})
1193
+ Embed.new(self, opts.merge(tag_name: "embed"))
1195
1194
  end
1196
1195
  # @return [EmbedCollection]
1197
- def embeds(*args)
1198
- EmbedCollection.new(self, extract_selector(args).merge(tag_name: "embed"))
1196
+ def embeds(opts = {})
1197
+ EmbedCollection.new(self, opts.merge(tag_name: "embed"))
1199
1198
  end
1200
1199
  Watir.tag_to_class[:embed] = Embed
1201
1200
 
1202
1201
  # @return [FieldSet]
1203
- def fieldset(*args)
1204
- FieldSet.new(self, extract_selector(args).merge(tag_name: "fieldset"))
1202
+ def fieldset(opts = {})
1203
+ FieldSet.new(self, opts.merge(tag_name: "fieldset"))
1205
1204
  end
1206
1205
  # @return [FieldSetCollection]
1207
- def fieldsets(*args)
1208
- FieldSetCollection.new(self, extract_selector(args).merge(tag_name: "fieldset"))
1206
+ def fieldsets(opts = {})
1207
+ FieldSetCollection.new(self, opts.merge(tag_name: "fieldset"))
1209
1208
  end
1210
1209
  Watir.tag_to_class[:fieldset] = FieldSet
1211
1210
 
1212
1211
  # @return [HTMLElement]
1213
- def figcaption(*args)
1214
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "figcaption"))
1212
+ def figcaption(opts = {})
1213
+ HTMLElement.new(self, opts.merge(tag_name: "figcaption"))
1215
1214
  end
1216
1215
  # @return [HTMLElementCollection]
1217
- def figcaptions(*args)
1218
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "figcaption"))
1216
+ def figcaptions(opts = {})
1217
+ HTMLElementCollection.new(self, opts.merge(tag_name: "figcaption"))
1219
1218
  end
1220
1219
  Watir.tag_to_class[:figcaption] = HTMLElement
1221
1220
 
1222
1221
  # @return [HTMLElement]
1223
- def figure(*args)
1224
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "figure"))
1222
+ def figure(opts = {})
1223
+ HTMLElement.new(self, opts.merge(tag_name: "figure"))
1225
1224
  end
1226
1225
  # @return [HTMLElementCollection]
1227
- def figures(*args)
1228
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "figure"))
1226
+ def figures(opts = {})
1227
+ HTMLElementCollection.new(self, opts.merge(tag_name: "figure"))
1229
1228
  end
1230
1229
  Watir.tag_to_class[:figure] = HTMLElement
1231
1230
 
1232
1231
  # @return [HTMLElement]
1233
- def footer(*args)
1234
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "footer"))
1232
+ def footer(opts = {})
1233
+ HTMLElement.new(self, opts.merge(tag_name: "footer"))
1235
1234
  end
1236
1235
  # @return [HTMLElementCollection]
1237
- def footers(*args)
1238
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "footer"))
1236
+ def footers(opts = {})
1237
+ HTMLElementCollection.new(self, opts.merge(tag_name: "footer"))
1239
1238
  end
1240
1239
  Watir.tag_to_class[:footer] = HTMLElement
1241
1240
 
1242
1241
  # @return [Form]
1243
- def form(*args)
1244
- Form.new(self, extract_selector(args).merge(tag_name: "form"))
1242
+ def form(opts = {})
1243
+ Form.new(self, opts.merge(tag_name: "form"))
1245
1244
  end
1246
1245
  # @return [FormCollection]
1247
- def forms(*args)
1248
- FormCollection.new(self, extract_selector(args).merge(tag_name: "form"))
1246
+ def forms(opts = {})
1247
+ FormCollection.new(self, opts.merge(tag_name: "form"))
1249
1248
  end
1250
1249
  Watir.tag_to_class[:form] = Form
1251
1250
 
1252
1251
  # @return [FrameSet]
1253
- def frameset(*args)
1254
- FrameSet.new(self, extract_selector(args).merge(tag_name: "frameset"))
1252
+ def frameset(opts = {})
1253
+ FrameSet.new(self, opts.merge(tag_name: "frameset"))
1255
1254
  end
1256
1255
  # @return [FrameSetCollection]
1257
- def framesets(*args)
1258
- FrameSetCollection.new(self, extract_selector(args).merge(tag_name: "frameset"))
1256
+ def framesets(opts = {})
1257
+ FrameSetCollection.new(self, opts.merge(tag_name: "frameset"))
1259
1258
  end
1260
1259
  Watir.tag_to_class[:frameset] = FrameSet
1261
1260
 
1262
1261
  # @return [Heading]
1263
- def h1(*args)
1264
- Heading.new(self, extract_selector(args).merge(tag_name: "h1"))
1262
+ def h1(opts = {})
1263
+ Heading.new(self, opts.merge(tag_name: "h1"))
1265
1264
  end
1266
1265
  # @return [HeadingCollection]
1267
- def h1s(*args)
1268
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h1"))
1266
+ def h1s(opts = {})
1267
+ HeadingCollection.new(self, opts.merge(tag_name: "h1"))
1269
1268
  end
1270
1269
  Watir.tag_to_class[:h1] = Heading
1271
1270
 
1272
1271
  # @return [Heading]
1273
- def h2(*args)
1274
- Heading.new(self, extract_selector(args).merge(tag_name: "h2"))
1272
+ def h2(opts = {})
1273
+ Heading.new(self, opts.merge(tag_name: "h2"))
1275
1274
  end
1276
1275
  # @return [HeadingCollection]
1277
- def h2s(*args)
1278
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h2"))
1276
+ def h2s(opts = {})
1277
+ HeadingCollection.new(self, opts.merge(tag_name: "h2"))
1279
1278
  end
1280
1279
  Watir.tag_to_class[:h2] = Heading
1281
1280
 
1282
1281
  # @return [Heading]
1283
- def h3(*args)
1284
- Heading.new(self, extract_selector(args).merge(tag_name: "h3"))
1282
+ def h3(opts = {})
1283
+ Heading.new(self, opts.merge(tag_name: "h3"))
1285
1284
  end
1286
1285
  # @return [HeadingCollection]
1287
- def h3s(*args)
1288
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h3"))
1286
+ def h3s(opts = {})
1287
+ HeadingCollection.new(self, opts.merge(tag_name: "h3"))
1289
1288
  end
1290
1289
  Watir.tag_to_class[:h3] = Heading
1291
1290
 
1292
1291
  # @return [Heading]
1293
- def h4(*args)
1294
- Heading.new(self, extract_selector(args).merge(tag_name: "h4"))
1292
+ def h4(opts = {})
1293
+ Heading.new(self, opts.merge(tag_name: "h4"))
1295
1294
  end
1296
1295
  # @return [HeadingCollection]
1297
- def h4s(*args)
1298
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h4"))
1296
+ def h4s(opts = {})
1297
+ HeadingCollection.new(self, opts.merge(tag_name: "h4"))
1299
1298
  end
1300
1299
  Watir.tag_to_class[:h4] = Heading
1301
1300
 
1302
1301
  # @return [Heading]
1303
- def h5(*args)
1304
- Heading.new(self, extract_selector(args).merge(tag_name: "h5"))
1302
+ def h5(opts = {})
1303
+ Heading.new(self, opts.merge(tag_name: "h5"))
1305
1304
  end
1306
1305
  # @return [HeadingCollection]
1307
- def h5s(*args)
1308
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h5"))
1306
+ def h5s(opts = {})
1307
+ HeadingCollection.new(self, opts.merge(tag_name: "h5"))
1309
1308
  end
1310
1309
  Watir.tag_to_class[:h5] = Heading
1311
1310
 
1312
1311
  # @return [Heading]
1313
- def h6(*args)
1314
- Heading.new(self, extract_selector(args).merge(tag_name: "h6"))
1312
+ def h6(opts = {})
1313
+ Heading.new(self, opts.merge(tag_name: "h6"))
1315
1314
  end
1316
1315
  # @return [HeadingCollection]
1317
- def h6s(*args)
1318
- HeadingCollection.new(self, extract_selector(args).merge(tag_name: "h6"))
1316
+ def h6s(opts = {})
1317
+ HeadingCollection.new(self, opts.merge(tag_name: "h6"))
1319
1318
  end
1320
1319
  Watir.tag_to_class[:h6] = Heading
1321
1320
 
1322
1321
  # @return [Head]
1323
- def head(*args)
1324
- Head.new(self, extract_selector(args).merge(tag_name: "head"))
1322
+ def head(opts = {})
1323
+ Head.new(self, opts.merge(tag_name: "head"))
1325
1324
  end
1326
1325
  # @return [HeadCollection]
1327
- def heads(*args)
1328
- HeadCollection.new(self, extract_selector(args).merge(tag_name: "head"))
1326
+ def heads(opts = {})
1327
+ HeadCollection.new(self, opts.merge(tag_name: "head"))
1329
1328
  end
1330
1329
  Watir.tag_to_class[:head] = Head
1331
1330
 
1332
1331
  # @return [HTMLElement]
1333
- def header(*args)
1334
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "header"))
1332
+ def header(opts = {})
1333
+ HTMLElement.new(self, opts.merge(tag_name: "header"))
1335
1334
  end
1336
1335
  # @return [HTMLElementCollection]
1337
- def headers(*args)
1338
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "header"))
1336
+ def headers(opts = {})
1337
+ HTMLElementCollection.new(self, opts.merge(tag_name: "header"))
1339
1338
  end
1340
1339
  Watir.tag_to_class[:header] = HTMLElement
1341
1340
 
1342
1341
  # @return [HR]
1343
- def hr(*args)
1344
- HR.new(self, extract_selector(args).merge(tag_name: "hr"))
1342
+ def hr(opts = {})
1343
+ HR.new(self, opts.merge(tag_name: "hr"))
1345
1344
  end
1346
1345
  # @return [HRCollection]
1347
- def hrs(*args)
1348
- HRCollection.new(self, extract_selector(args).merge(tag_name: "hr"))
1346
+ def hrs(opts = {})
1347
+ HRCollection.new(self, opts.merge(tag_name: "hr"))
1349
1348
  end
1350
1349
  Watir.tag_to_class[:hr] = HR
1351
1350
 
1352
1351
  # @return [Html]
1353
- def html(*args)
1354
- Html.new(self, extract_selector(args).merge(tag_name: "html"))
1352
+ def html(opts = {})
1353
+ Html.new(self, opts.merge(tag_name: "html"))
1355
1354
  end
1356
1355
  # @return [HtmlCollection]
1357
- def htmls(*args)
1358
- HtmlCollection.new(self, extract_selector(args).merge(tag_name: "html"))
1356
+ def htmls(opts = {})
1357
+ HtmlCollection.new(self, opts.merge(tag_name: "html"))
1359
1358
  end
1360
1359
  Watir.tag_to_class[:html] = Html
1361
1360
 
1362
1361
  # @return [HTMLElement]
1363
- def i(*args)
1364
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "i"))
1362
+ def i(opts = {})
1363
+ HTMLElement.new(self, opts.merge(tag_name: "i"))
1365
1364
  end
1366
1365
  # @return [HTMLElementCollection]
1367
- def is(*args)
1368
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "i"))
1366
+ def is(opts = {})
1367
+ HTMLElementCollection.new(self, opts.merge(tag_name: "i"))
1369
1368
  end
1370
1369
  Watir.tag_to_class[:i] = HTMLElement
1371
1370
 
1372
1371
  # @return [IFrame]
1373
- def iframe(*args)
1374
- IFrame.new(self, extract_selector(args).merge(tag_name: "iframe"))
1372
+ def iframe(opts = {})
1373
+ IFrame.new(self, opts.merge(tag_name: "iframe"))
1375
1374
  end
1376
1375
  # @return [IFrameCollection]
1377
- def iframes(*args)
1378
- IFrameCollection.new(self, extract_selector(args).merge(tag_name: "iframe"))
1376
+ def iframes(opts = {})
1377
+ IFrameCollection.new(self, opts.merge(tag_name: "iframe"))
1379
1378
  end
1380
1379
  Watir.tag_to_class[:iframe] = IFrame
1381
1380
 
1382
1381
  # @return [Image]
1383
- def img(*args)
1384
- Image.new(self, extract_selector(args).merge(tag_name: "img"))
1382
+ def img(opts = {})
1383
+ Image.new(self, opts.merge(tag_name: "img"))
1385
1384
  end
1386
1385
  # @return [ImageCollection]
1387
- def imgs(*args)
1388
- ImageCollection.new(self, extract_selector(args).merge(tag_name: "img"))
1386
+ def imgs(opts = {})
1387
+ ImageCollection.new(self, opts.merge(tag_name: "img"))
1389
1388
  end
1390
1389
  Watir.tag_to_class[:img] = Image
1391
1390
 
1392
1391
  # @return [Input]
1393
- def input(*args)
1394
- Input.new(self, extract_selector(args).merge(tag_name: "input"))
1392
+ def input(opts = {})
1393
+ Input.new(self, opts.merge(tag_name: "input"))
1395
1394
  end
1396
1395
  # @return [InputCollection]
1397
- def inputs(*args)
1398
- InputCollection.new(self, extract_selector(args).merge(tag_name: "input"))
1396
+ def inputs(opts = {})
1397
+ InputCollection.new(self, opts.merge(tag_name: "input"))
1399
1398
  end
1400
1399
  Watir.tag_to_class[:input] = Input
1401
1400
 
1402
1401
  # @return [Mod]
1403
- def ins(*args)
1404
- Mod.new(self, extract_selector(args).merge(tag_name: "ins"))
1402
+ def ins(opts = {})
1403
+ Mod.new(self, opts.merge(tag_name: "ins"))
1405
1404
  end
1406
1405
  # @return [ModCollection]
1407
- def inses(*args)
1408
- ModCollection.new(self, extract_selector(args).merge(tag_name: "ins"))
1406
+ def inses(opts = {})
1407
+ ModCollection.new(self, opts.merge(tag_name: "ins"))
1409
1408
  end
1410
1409
  Watir.tag_to_class[:ins] = Mod
1411
1410
 
1412
1411
  # @return [HTMLElement]
1413
- def kbd(*args)
1414
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "kbd"))
1412
+ def kbd(opts = {})
1413
+ HTMLElement.new(self, opts.merge(tag_name: "kbd"))
1415
1414
  end
1416
1415
  # @return [HTMLElementCollection]
1417
- def kbds(*args)
1418
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "kbd"))
1416
+ def kbds(opts = {})
1417
+ HTMLElementCollection.new(self, opts.merge(tag_name: "kbd"))
1419
1418
  end
1420
1419
  Watir.tag_to_class[:kbd] = HTMLElement
1421
1420
 
1422
1421
  # @return [Label]
1423
- def label(*args)
1424
- Label.new(self, extract_selector(args).merge(tag_name: "label"))
1422
+ def label(opts = {})
1423
+ Label.new(self, opts.merge(tag_name: "label"))
1425
1424
  end
1426
1425
  # @return [LabelCollection]
1427
- def labels(*args)
1428
- LabelCollection.new(self, extract_selector(args).merge(tag_name: "label"))
1426
+ def labels(opts = {})
1427
+ LabelCollection.new(self, opts.merge(tag_name: "label"))
1429
1428
  end
1430
1429
  Watir.tag_to_class[:label] = Label
1431
1430
 
1432
1431
  # @return [Legend]
1433
- def legend(*args)
1434
- Legend.new(self, extract_selector(args).merge(tag_name: "legend"))
1432
+ def legend(opts = {})
1433
+ Legend.new(self, opts.merge(tag_name: "legend"))
1435
1434
  end
1436
1435
  # @return [LegendCollection]
1437
- def legends(*args)
1438
- LegendCollection.new(self, extract_selector(args).merge(tag_name: "legend"))
1436
+ def legends(opts = {})
1437
+ LegendCollection.new(self, opts.merge(tag_name: "legend"))
1439
1438
  end
1440
1439
  Watir.tag_to_class[:legend] = Legend
1441
1440
 
1442
1441
  # @return [LI]
1443
- def li(*args)
1444
- LI.new(self, extract_selector(args).merge(tag_name: "li"))
1442
+ def li(opts = {})
1443
+ LI.new(self, opts.merge(tag_name: "li"))
1445
1444
  end
1446
1445
  # @return [LICollection]
1447
- def lis(*args)
1448
- LICollection.new(self, extract_selector(args).merge(tag_name: "li"))
1446
+ def lis(opts = {})
1447
+ LICollection.new(self, opts.merge(tag_name: "li"))
1449
1448
  end
1450
1449
  Watir.tag_to_class[:li] = LI
1451
1450
 
1452
1451
  # @return [HTMLElement]
1453
- def main(*args)
1454
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "main"))
1452
+ def main(opts = {})
1453
+ HTMLElement.new(self, opts.merge(tag_name: "main"))
1455
1454
  end
1456
1455
  # @return [HTMLElementCollection]
1457
- def mains(*args)
1458
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "main"))
1456
+ def mains(opts = {})
1457
+ HTMLElementCollection.new(self, opts.merge(tag_name: "main"))
1459
1458
  end
1460
1459
  Watir.tag_to_class[:main] = HTMLElement
1461
1460
 
1462
1461
  # @return [Map]
1463
- def map(*args)
1464
- Map.new(self, extract_selector(args).merge(tag_name: "map"))
1462
+ def map(opts = {})
1463
+ Map.new(self, opts.merge(tag_name: "map"))
1465
1464
  end
1466
1465
  # @return [MapCollection]
1467
- def maps(*args)
1468
- MapCollection.new(self, extract_selector(args).merge(tag_name: "map"))
1466
+ def maps(opts = {})
1467
+ MapCollection.new(self, opts.merge(tag_name: "map"))
1469
1468
  end
1470
1469
  Watir.tag_to_class[:map] = Map
1471
1470
 
1472
1471
  # @return [HTMLElement]
1473
- def mark(*args)
1474
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "mark"))
1472
+ def mark(opts = {})
1473
+ HTMLElement.new(self, opts.merge(tag_name: "mark"))
1475
1474
  end
1476
1475
  # @return [HTMLElementCollection]
1477
- def marks(*args)
1478
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "mark"))
1476
+ def marks(opts = {})
1477
+ HTMLElementCollection.new(self, opts.merge(tag_name: "mark"))
1479
1478
  end
1480
1479
  Watir.tag_to_class[:mark] = HTMLElement
1481
1480
 
1482
1481
  # @return [Meta]
1483
- def meta(*args)
1484
- Meta.new(self, extract_selector(args).merge(tag_name: "meta"))
1482
+ def meta(opts = {})
1483
+ Meta.new(self, opts.merge(tag_name: "meta"))
1485
1484
  end
1486
1485
  # @return [MetaCollection]
1487
- def metas(*args)
1488
- MetaCollection.new(self, extract_selector(args).merge(tag_name: "meta"))
1486
+ def metas(opts = {})
1487
+ MetaCollection.new(self, opts.merge(tag_name: "meta"))
1489
1488
  end
1490
1489
  Watir.tag_to_class[:meta] = Meta
1491
1490
 
1492
1491
  # @return [Meter]
1493
- def meter(*args)
1494
- Meter.new(self, extract_selector(args).merge(tag_name: "meter"))
1492
+ def meter(opts = {})
1493
+ Meter.new(self, opts.merge(tag_name: "meter"))
1495
1494
  end
1496
1495
  # @return [MeterCollection]
1497
- def meters(*args)
1498
- MeterCollection.new(self, extract_selector(args).merge(tag_name: "meter"))
1496
+ def meters(opts = {})
1497
+ MeterCollection.new(self, opts.merge(tag_name: "meter"))
1499
1498
  end
1500
1499
  Watir.tag_to_class[:meter] = Meter
1501
1500
 
1502
1501
  # @return [HTMLElement]
1503
- def nav(*args)
1504
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "nav"))
1502
+ def nav(opts = {})
1503
+ HTMLElement.new(self, opts.merge(tag_name: "nav"))
1505
1504
  end
1506
1505
  # @return [HTMLElementCollection]
1507
- def navs(*args)
1508
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "nav"))
1506
+ def navs(opts = {})
1507
+ HTMLElementCollection.new(self, opts.merge(tag_name: "nav"))
1509
1508
  end
1510
1509
  Watir.tag_to_class[:nav] = HTMLElement
1511
1510
 
1512
1511
  # @return [HTMLElement]
1513
- def noscript(*args)
1514
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "noscript"))
1512
+ def noscript(opts = {})
1513
+ HTMLElement.new(self, opts.merge(tag_name: "noscript"))
1515
1514
  end
1516
1515
  # @return [HTMLElementCollection]
1517
- def noscripts(*args)
1518
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "noscript"))
1516
+ def noscripts(opts = {})
1517
+ HTMLElementCollection.new(self, opts.merge(tag_name: "noscript"))
1519
1518
  end
1520
1519
  Watir.tag_to_class[:noscript] = HTMLElement
1521
1520
 
1522
1521
  # @return [Object]
1523
- def object(*args)
1524
- Object.new(self, extract_selector(args).merge(tag_name: "object"))
1522
+ def object(opts = {})
1523
+ Object.new(self, opts.merge(tag_name: "object"))
1525
1524
  end
1526
1525
  # @return [ObjectCollection]
1527
- def objects(*args)
1528
- ObjectCollection.new(self, extract_selector(args).merge(tag_name: "object"))
1526
+ def objects(opts = {})
1527
+ ObjectCollection.new(self, opts.merge(tag_name: "object"))
1529
1528
  end
1530
1529
  Watir.tag_to_class[:object] = Object
1531
1530
 
1532
1531
  # @return [OList]
1533
- def ol(*args)
1534
- OList.new(self, extract_selector(args).merge(tag_name: "ol"))
1532
+ def ol(opts = {})
1533
+ OList.new(self, opts.merge(tag_name: "ol"))
1535
1534
  end
1536
1535
  # @return [OListCollection]
1537
- def ols(*args)
1538
- OListCollection.new(self, extract_selector(args).merge(tag_name: "ol"))
1536
+ def ols(opts = {})
1537
+ OListCollection.new(self, opts.merge(tag_name: "ol"))
1539
1538
  end
1540
1539
  Watir.tag_to_class[:ol] = OList
1541
1540
 
1542
1541
  # @return [OptGroup]
1543
- def optgroup(*args)
1544
- OptGroup.new(self, extract_selector(args).merge(tag_name: "optgroup"))
1542
+ def optgroup(opts = {})
1543
+ OptGroup.new(self, opts.merge(tag_name: "optgroup"))
1545
1544
  end
1546
1545
  # @return [OptGroupCollection]
1547
- def optgroups(*args)
1548
- OptGroupCollection.new(self, extract_selector(args).merge(tag_name: "optgroup"))
1546
+ def optgroups(opts = {})
1547
+ OptGroupCollection.new(self, opts.merge(tag_name: "optgroup"))
1549
1548
  end
1550
1549
  Watir.tag_to_class[:optgroup] = OptGroup
1551
1550
 
1552
1551
  # @return [Option]
1553
- def option(*args)
1554
- Option.new(self, extract_selector(args).merge(tag_name: "option"))
1552
+ def option(opts = {})
1553
+ Option.new(self, opts.merge(tag_name: "option"))
1555
1554
  end
1556
1555
  # @return [OptionCollection]
1557
- def options(*args)
1558
- OptionCollection.new(self, extract_selector(args).merge(tag_name: "option"))
1556
+ def options(opts = {})
1557
+ OptionCollection.new(self, opts.merge(tag_name: "option"))
1559
1558
  end
1560
1559
  Watir.tag_to_class[:option] = Option
1561
1560
 
1562
1561
  # @return [Output]
1563
- def output(*args)
1564
- Output.new(self, extract_selector(args).merge(tag_name: "output"))
1562
+ def output(opts = {})
1563
+ Output.new(self, opts.merge(tag_name: "output"))
1565
1564
  end
1566
1565
  # @return [OutputCollection]
1567
- def outputs(*args)
1568
- OutputCollection.new(self, extract_selector(args).merge(tag_name: "output"))
1566
+ def outputs(opts = {})
1567
+ OutputCollection.new(self, opts.merge(tag_name: "output"))
1569
1568
  end
1570
1569
  Watir.tag_to_class[:output] = Output
1571
1570
 
1572
1571
  # @return [Paragraph]
1573
- def p(*args)
1574
- Paragraph.new(self, extract_selector(args).merge(tag_name: "p"))
1572
+ def p(opts = {})
1573
+ Paragraph.new(self, opts.merge(tag_name: "p"))
1575
1574
  end
1576
1575
  # @return [ParagraphCollection]
1577
- def ps(*args)
1578
- ParagraphCollection.new(self, extract_selector(args).merge(tag_name: "p"))
1576
+ def ps(opts = {})
1577
+ ParagraphCollection.new(self, opts.merge(tag_name: "p"))
1579
1578
  end
1580
1579
  Watir.tag_to_class[:p] = Paragraph
1581
1580
 
1582
1581
  # @return [Param]
1583
- def param(*args)
1584
- Param.new(self, extract_selector(args).merge(tag_name: "param"))
1582
+ def param(opts = {})
1583
+ Param.new(self, opts.merge(tag_name: "param"))
1585
1584
  end
1586
1585
  # @return [ParamCollection]
1587
- def params(*args)
1588
- ParamCollection.new(self, extract_selector(args).merge(tag_name: "param"))
1586
+ def params(opts = {})
1587
+ ParamCollection.new(self, opts.merge(tag_name: "param"))
1589
1588
  end
1590
1589
  Watir.tag_to_class[:param] = Param
1591
1590
 
1592
1591
  # @return [Picture]
1593
- def picture(*args)
1594
- Picture.new(self, extract_selector(args).merge(tag_name: "picture"))
1592
+ def picture(opts = {})
1593
+ Picture.new(self, opts.merge(tag_name: "picture"))
1595
1594
  end
1596
1595
  # @return [PictureCollection]
1597
- def pictures(*args)
1598
- PictureCollection.new(self, extract_selector(args).merge(tag_name: "picture"))
1596
+ def pictures(opts = {})
1597
+ PictureCollection.new(self, opts.merge(tag_name: "picture"))
1599
1598
  end
1600
1599
  Watir.tag_to_class[:picture] = Picture
1601
1600
 
1602
1601
  # @return [Pre]
1603
- def pre(*args)
1604
- Pre.new(self, extract_selector(args).merge(tag_name: "pre"))
1602
+ def pre(opts = {})
1603
+ Pre.new(self, opts.merge(tag_name: "pre"))
1605
1604
  end
1606
1605
  # @return [PreCollection]
1607
- def pres(*args)
1608
- PreCollection.new(self, extract_selector(args).merge(tag_name: "pre"))
1606
+ def pres(opts = {})
1607
+ PreCollection.new(self, opts.merge(tag_name: "pre"))
1609
1608
  end
1610
1609
  Watir.tag_to_class[:pre] = Pre
1611
1610
 
1612
1611
  # @return [Progress]
1613
- def progress(*args)
1614
- Progress.new(self, extract_selector(args).merge(tag_name: "progress"))
1612
+ def progress(opts = {})
1613
+ Progress.new(self, opts.merge(tag_name: "progress"))
1615
1614
  end
1616
1615
  # @return [ProgressCollection]
1617
- def progresses(*args)
1618
- ProgressCollection.new(self, extract_selector(args).merge(tag_name: "progress"))
1616
+ def progresses(opts = {})
1617
+ ProgressCollection.new(self, opts.merge(tag_name: "progress"))
1619
1618
  end
1620
1619
  Watir.tag_to_class[:progress] = Progress
1621
1620
 
1622
1621
  # @return [Quote]
1623
- def q(*args)
1624
- Quote.new(self, extract_selector(args).merge(tag_name: "q"))
1622
+ def q(opts = {})
1623
+ Quote.new(self, opts.merge(tag_name: "q"))
1625
1624
  end
1626
1625
  # @return [QuoteCollection]
1627
- def qs(*args)
1628
- QuoteCollection.new(self, extract_selector(args).merge(tag_name: "q"))
1626
+ def qs(opts = {})
1627
+ QuoteCollection.new(self, opts.merge(tag_name: "q"))
1629
1628
  end
1630
1629
  Watir.tag_to_class[:q] = Quote
1631
1630
 
1632
1631
  # @return [HTMLElement]
1633
- def rb(*args)
1634
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "rb"))
1632
+ def rb(opts = {})
1633
+ HTMLElement.new(self, opts.merge(tag_name: "rb"))
1635
1634
  end
1636
1635
  # @return [HTMLElementCollection]
1637
- def rbs(*args)
1638
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "rb"))
1636
+ def rbs(opts = {})
1637
+ HTMLElementCollection.new(self, opts.merge(tag_name: "rb"))
1639
1638
  end
1640
1639
  Watir.tag_to_class[:rb] = HTMLElement
1641
1640
 
1642
1641
  # @return [HTMLElement]
1643
- def rp(*args)
1644
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "rp"))
1642
+ def rp(opts = {})
1643
+ HTMLElement.new(self, opts.merge(tag_name: "rp"))
1645
1644
  end
1646
1645
  # @return [HTMLElementCollection]
1647
- def rps(*args)
1648
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "rp"))
1646
+ def rps(opts = {})
1647
+ HTMLElementCollection.new(self, opts.merge(tag_name: "rp"))
1649
1648
  end
1650
1649
  Watir.tag_to_class[:rp] = HTMLElement
1651
1650
 
1652
1651
  # @return [HTMLElement]
1653
- def rt(*args)
1654
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "rt"))
1652
+ def rt(opts = {})
1653
+ HTMLElement.new(self, opts.merge(tag_name: "rt"))
1655
1654
  end
1656
1655
  # @return [HTMLElementCollection]
1657
- def rts(*args)
1658
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "rt"))
1656
+ def rts(opts = {})
1657
+ HTMLElementCollection.new(self, opts.merge(tag_name: "rt"))
1659
1658
  end
1660
1659
  Watir.tag_to_class[:rt] = HTMLElement
1661
1660
 
1662
1661
  # @return [HTMLElement]
1663
- def rtc(*args)
1664
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "rtc"))
1662
+ def rtc(opts = {})
1663
+ HTMLElement.new(self, opts.merge(tag_name: "rtc"))
1665
1664
  end
1666
1665
  # @return [HTMLElementCollection]
1667
- def rtcs(*args)
1668
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "rtc"))
1666
+ def rtcs(opts = {})
1667
+ HTMLElementCollection.new(self, opts.merge(tag_name: "rtc"))
1669
1668
  end
1670
1669
  Watir.tag_to_class[:rtc] = HTMLElement
1671
1670
 
1672
1671
  # @return [HTMLElement]
1673
- def ruby(*args)
1674
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "ruby"))
1672
+ def ruby(opts = {})
1673
+ HTMLElement.new(self, opts.merge(tag_name: "ruby"))
1675
1674
  end
1676
1675
  # @return [HTMLElementCollection]
1677
- def rubies(*args)
1678
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "ruby"))
1676
+ def rubies(opts = {})
1677
+ HTMLElementCollection.new(self, opts.merge(tag_name: "ruby"))
1679
1678
  end
1680
1679
  Watir.tag_to_class[:ruby] = HTMLElement
1681
1680
 
1682
1681
  # @return [HTMLElement]
1683
- def s(*args)
1684
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "s"))
1682
+ def s(opts = {})
1683
+ HTMLElement.new(self, opts.merge(tag_name: "s"))
1685
1684
  end
1686
1685
  # @return [HTMLElementCollection]
1687
- def ss(*args)
1688
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "s"))
1686
+ def ss(opts = {})
1687
+ HTMLElementCollection.new(self, opts.merge(tag_name: "s"))
1689
1688
  end
1690
1689
  Watir.tag_to_class[:s] = HTMLElement
1691
1690
 
1692
1691
  # @return [HTMLElement]
1693
- def samp(*args)
1694
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "samp"))
1692
+ def samp(opts = {})
1693
+ HTMLElement.new(self, opts.merge(tag_name: "samp"))
1695
1694
  end
1696
1695
  # @return [HTMLElementCollection]
1697
- def samps(*args)
1698
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "samp"))
1696
+ def samps(opts = {})
1697
+ HTMLElementCollection.new(self, opts.merge(tag_name: "samp"))
1699
1698
  end
1700
1699
  Watir.tag_to_class[:samp] = HTMLElement
1701
1700
 
1702
1701
  # @return [Script]
1703
- def script(*args)
1704
- Script.new(self, extract_selector(args).merge(tag_name: "script"))
1702
+ def script(opts = {})
1703
+ Script.new(self, opts.merge(tag_name: "script"))
1705
1704
  end
1706
1705
  # @return [ScriptCollection]
1707
- def scripts(*args)
1708
- ScriptCollection.new(self, extract_selector(args).merge(tag_name: "script"))
1706
+ def scripts(opts = {})
1707
+ ScriptCollection.new(self, opts.merge(tag_name: "script"))
1709
1708
  end
1710
1709
  Watir.tag_to_class[:script] = Script
1711
1710
 
1712
1711
  # @return [HTMLElement]
1713
- def section(*args)
1714
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "section"))
1712
+ def section(opts = {})
1713
+ HTMLElement.new(self, opts.merge(tag_name: "section"))
1715
1714
  end
1716
1715
  # @return [HTMLElementCollection]
1717
- def sections(*args)
1718
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "section"))
1716
+ def sections(opts = {})
1717
+ HTMLElementCollection.new(self, opts.merge(tag_name: "section"))
1719
1718
  end
1720
1719
  Watir.tag_to_class[:section] = HTMLElement
1721
1720
 
1722
1721
  # @return [Select]
1723
- def select(*args)
1724
- Select.new(self, extract_selector(args).merge(tag_name: "select"))
1722
+ def select(opts = {})
1723
+ Select.new(self, opts.merge(tag_name: "select"))
1725
1724
  end
1726
1725
  # @return [SelectCollection]
1727
- def selects(*args)
1728
- SelectCollection.new(self, extract_selector(args).merge(tag_name: "select"))
1726
+ def selects(opts = {})
1727
+ SelectCollection.new(self, opts.merge(tag_name: "select"))
1729
1728
  end
1730
1729
  Watir.tag_to_class[:select] = Select
1731
1730
 
1732
1731
  # @return [HTMLElement]
1733
- def small(*args)
1734
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "small"))
1732
+ def small(opts = {})
1733
+ HTMLElement.new(self, opts.merge(tag_name: "small"))
1735
1734
  end
1736
1735
  # @return [HTMLElementCollection]
1737
- def smalls(*args)
1738
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "small"))
1736
+ def smalls(opts = {})
1737
+ HTMLElementCollection.new(self, opts.merge(tag_name: "small"))
1739
1738
  end
1740
1739
  Watir.tag_to_class[:small] = HTMLElement
1741
1740
 
1742
1741
  # @return [Source]
1743
- def source(*args)
1744
- Source.new(self, extract_selector(args).merge(tag_name: "source"))
1742
+ def source(opts = {})
1743
+ Source.new(self, opts.merge(tag_name: "source"))
1745
1744
  end
1746
1745
  # @return [SourceCollection]
1747
- def sources(*args)
1748
- SourceCollection.new(self, extract_selector(args).merge(tag_name: "source"))
1746
+ def sources(opts = {})
1747
+ SourceCollection.new(self, opts.merge(tag_name: "source"))
1749
1748
  end
1750
1749
  Watir.tag_to_class[:source] = Source
1751
1750
 
1752
1751
  # @return [Span]
1753
- def span(*args)
1754
- Span.new(self, extract_selector(args).merge(tag_name: "span"))
1752
+ def span(opts = {})
1753
+ Span.new(self, opts.merge(tag_name: "span"))
1755
1754
  end
1756
1755
  # @return [SpanCollection]
1757
- def spans(*args)
1758
- SpanCollection.new(self, extract_selector(args).merge(tag_name: "span"))
1756
+ def spans(opts = {})
1757
+ SpanCollection.new(self, opts.merge(tag_name: "span"))
1759
1758
  end
1760
1759
  Watir.tag_to_class[:span] = Span
1761
1760
 
1762
1761
  # @return [HTMLElement]
1763
- def strong(*args)
1764
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "strong"))
1762
+ def strong(opts = {})
1763
+ HTMLElement.new(self, opts.merge(tag_name: "strong"))
1765
1764
  end
1766
1765
  # @return [HTMLElementCollection]
1767
- def strongs(*args)
1768
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "strong"))
1766
+ def strongs(opts = {})
1767
+ HTMLElementCollection.new(self, opts.merge(tag_name: "strong"))
1769
1768
  end
1770
1769
  Watir.tag_to_class[:strong] = HTMLElement
1771
1770
 
1772
1771
  # @return [Style]
1773
- def style(*args)
1774
- Style.new(self, extract_selector(args).merge(tag_name: "style"))
1772
+ def style(opts = {})
1773
+ Style.new(self, opts.merge(tag_name: "style"))
1775
1774
  end
1776
1775
  # @return [StyleCollection]
1777
- def styles(*args)
1778
- StyleCollection.new(self, extract_selector(args).merge(tag_name: "style"))
1776
+ def styles(opts = {})
1777
+ StyleCollection.new(self, opts.merge(tag_name: "style"))
1779
1778
  end
1780
1779
  Watir.tag_to_class[:style] = Style
1781
1780
 
1782
1781
  # @return [HTMLElement]
1783
- def sub(*args)
1784
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "sub"))
1782
+ def sub(opts = {})
1783
+ HTMLElement.new(self, opts.merge(tag_name: "sub"))
1785
1784
  end
1786
1785
  # @return [HTMLElementCollection]
1787
- def subs(*args)
1788
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "sub"))
1786
+ def subs(opts = {})
1787
+ HTMLElementCollection.new(self, opts.merge(tag_name: "sub"))
1789
1788
  end
1790
1789
  Watir.tag_to_class[:sub] = HTMLElement
1791
1790
 
1792
1791
  # @return [HTMLElement]
1793
- def summary(*args)
1794
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "summary"))
1792
+ def summary(opts = {})
1793
+ HTMLElement.new(self, opts.merge(tag_name: "summary"))
1795
1794
  end
1796
1795
  # @return [HTMLElementCollection]
1797
- def summaries(*args)
1798
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "summary"))
1796
+ def summaries(opts = {})
1797
+ HTMLElementCollection.new(self, opts.merge(tag_name: "summary"))
1799
1798
  end
1800
1799
  Watir.tag_to_class[:summary] = HTMLElement
1801
1800
 
1802
1801
  # @return [HTMLElement]
1803
- def sup(*args)
1804
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "sup"))
1802
+ def sup(opts = {})
1803
+ HTMLElement.new(self, opts.merge(tag_name: "sup"))
1805
1804
  end
1806
1805
  # @return [HTMLElementCollection]
1807
- def sups(*args)
1808
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "sup"))
1806
+ def sups(opts = {})
1807
+ HTMLElementCollection.new(self, opts.merge(tag_name: "sup"))
1809
1808
  end
1810
1809
  Watir.tag_to_class[:sup] = HTMLElement
1811
1810
 
1812
1811
  # @return [Table]
1813
- def table(*args)
1814
- Table.new(self, extract_selector(args).merge(tag_name: "table"))
1812
+ def table(opts = {})
1813
+ Table.new(self, opts.merge(tag_name: "table"))
1815
1814
  end
1816
1815
  # @return [TableCollection]
1817
- def tables(*args)
1818
- TableCollection.new(self, extract_selector(args).merge(tag_name: "table"))
1816
+ def tables(opts = {})
1817
+ TableCollection.new(self, opts.merge(tag_name: "table"))
1819
1818
  end
1820
1819
  Watir.tag_to_class[:table] = Table
1821
1820
 
1822
1821
  # @return [TableSection]
1823
- def tbody(*args)
1824
- TableSection.new(self, extract_selector(args).merge(tag_name: "tbody"))
1822
+ def tbody(opts = {})
1823
+ TableSection.new(self, opts.merge(tag_name: "tbody"))
1825
1824
  end
1826
1825
  # @return [TableSectionCollection]
1827
- def tbodys(*args)
1828
- TableSectionCollection.new(self, extract_selector(args).merge(tag_name: "tbody"))
1826
+ def tbodys(opts = {})
1827
+ TableSectionCollection.new(self, opts.merge(tag_name: "tbody"))
1829
1828
  end
1830
1829
  Watir.tag_to_class[:tbody] = TableSection
1831
1830
 
1832
1831
  # @return [TableDataCell]
1833
- def td(*args)
1834
- TableDataCell.new(self, extract_selector(args).merge(tag_name: "td"))
1832
+ def td(opts = {})
1833
+ TableDataCell.new(self, opts.merge(tag_name: "td"))
1835
1834
  end
1836
1835
  # @return [TableDataCellCollection]
1837
- def tds(*args)
1838
- TableDataCellCollection.new(self, extract_selector(args).merge(tag_name: "td"))
1836
+ def tds(opts = {})
1837
+ TableDataCellCollection.new(self, opts.merge(tag_name: "td"))
1839
1838
  end
1840
1839
  Watir.tag_to_class[:td] = TableDataCell
1841
1840
 
1842
1841
  # @return [Template]
1843
- def template(*args)
1844
- Template.new(self, extract_selector(args).merge(tag_name: "template"))
1842
+ def template(opts = {})
1843
+ Template.new(self, opts.merge(tag_name: "template"))
1845
1844
  end
1846
1845
  # @return [TemplateCollection]
1847
- def templates(*args)
1848
- TemplateCollection.new(self, extract_selector(args).merge(tag_name: "template"))
1846
+ def templates(opts = {})
1847
+ TemplateCollection.new(self, opts.merge(tag_name: "template"))
1849
1848
  end
1850
1849
  Watir.tag_to_class[:template] = Template
1851
1850
 
1852
1851
  # @return [TextArea]
1853
- def textarea(*args)
1854
- TextArea.new(self, extract_selector(args).merge(tag_name: "textarea"))
1852
+ def textarea(opts = {})
1853
+ TextArea.new(self, opts.merge(tag_name: "textarea"))
1855
1854
  end
1856
1855
  # @return [TextAreaCollection]
1857
- def textareas(*args)
1858
- TextAreaCollection.new(self, extract_selector(args).merge(tag_name: "textarea"))
1856
+ def textareas(opts = {})
1857
+ TextAreaCollection.new(self, opts.merge(tag_name: "textarea"))
1859
1858
  end
1860
1859
  Watir.tag_to_class[:textarea] = TextArea
1861
1860
 
1862
1861
  # @return [TableSection]
1863
- def tfoot(*args)
1864
- TableSection.new(self, extract_selector(args).merge(tag_name: "tfoot"))
1862
+ def tfoot(opts = {})
1863
+ TableSection.new(self, opts.merge(tag_name: "tfoot"))
1865
1864
  end
1866
1865
  # @return [TableSectionCollection]
1867
- def tfoots(*args)
1868
- TableSectionCollection.new(self, extract_selector(args).merge(tag_name: "tfoot"))
1866
+ def tfoots(opts = {})
1867
+ TableSectionCollection.new(self, opts.merge(tag_name: "tfoot"))
1869
1868
  end
1870
1869
  Watir.tag_to_class[:tfoot] = TableSection
1871
1870
 
1872
1871
  # @return [TableHeaderCell]
1873
- def th(*args)
1874
- TableHeaderCell.new(self, extract_selector(args).merge(tag_name: "th"))
1872
+ def th(opts = {})
1873
+ TableHeaderCell.new(self, opts.merge(tag_name: "th"))
1875
1874
  end
1876
1875
  # @return [TableHeaderCellCollection]
1877
- def ths(*args)
1878
- TableHeaderCellCollection.new(self, extract_selector(args).merge(tag_name: "th"))
1876
+ def ths(opts = {})
1877
+ TableHeaderCellCollection.new(self, opts.merge(tag_name: "th"))
1879
1878
  end
1880
1879
  Watir.tag_to_class[:th] = TableHeaderCell
1881
1880
 
1882
1881
  # @return [TableSection]
1883
- def thead(*args)
1884
- TableSection.new(self, extract_selector(args).merge(tag_name: "thead"))
1882
+ def thead(opts = {})
1883
+ TableSection.new(self, opts.merge(tag_name: "thead"))
1885
1884
  end
1886
1885
  # @return [TableSectionCollection]
1887
- def theads(*args)
1888
- TableSectionCollection.new(self, extract_selector(args).merge(tag_name: "thead"))
1886
+ def theads(opts = {})
1887
+ TableSectionCollection.new(self, opts.merge(tag_name: "thead"))
1889
1888
  end
1890
1889
  Watir.tag_to_class[:thead] = TableSection
1891
1890
 
1892
1891
  # @return [Time]
1893
- def time(*args)
1894
- Time.new(self, extract_selector(args).merge(tag_name: "time"))
1892
+ def time(opts = {})
1893
+ Time.new(self, opts.merge(tag_name: "time"))
1895
1894
  end
1896
1895
  # @return [TimeCollection]
1897
- def times(*args)
1898
- TimeCollection.new(self, extract_selector(args).merge(tag_name: "time"))
1896
+ def times(opts = {})
1897
+ TimeCollection.new(self, opts.merge(tag_name: "time"))
1899
1898
  end
1900
1899
  Watir.tag_to_class[:time] = Time
1901
1900
 
1902
1901
  # @return [Title]
1903
- def title(*args)
1904
- Title.new(self, extract_selector(args).merge(tag_name: "title"))
1902
+ def title(opts = {})
1903
+ Title.new(self, opts.merge(tag_name: "title"))
1905
1904
  end
1906
1905
  # @return [TitleCollection]
1907
- def titles(*args)
1908
- TitleCollection.new(self, extract_selector(args).merge(tag_name: "title"))
1906
+ def titles(opts = {})
1907
+ TitleCollection.new(self, opts.merge(tag_name: "title"))
1909
1908
  end
1910
1909
  Watir.tag_to_class[:title] = Title
1911
1910
 
1912
1911
  # @return [TableRow]
1913
- def tr(*args)
1914
- TableRow.new(self, extract_selector(args).merge(tag_name: "tr"))
1912
+ def tr(opts = {})
1913
+ TableRow.new(self, opts.merge(tag_name: "tr"))
1915
1914
  end
1916
1915
  # @return [TableRowCollection]
1917
- def trs(*args)
1918
- TableRowCollection.new(self, extract_selector(args).merge(tag_name: "tr"))
1916
+ def trs(opts = {})
1917
+ TableRowCollection.new(self, opts.merge(tag_name: "tr"))
1919
1918
  end
1920
1919
  Watir.tag_to_class[:tr] = TableRow
1921
1920
 
1922
1921
  # @return [Track]
1923
- def track(*args)
1924
- Track.new(self, extract_selector(args).merge(tag_name: "track"))
1922
+ def track(opts = {})
1923
+ Track.new(self, opts.merge(tag_name: "track"))
1925
1924
  end
1926
1925
  # @return [TrackCollection]
1927
- def tracks(*args)
1928
- TrackCollection.new(self, extract_selector(args).merge(tag_name: "track"))
1926
+ def tracks(opts = {})
1927
+ TrackCollection.new(self, opts.merge(tag_name: "track"))
1929
1928
  end
1930
1929
  Watir.tag_to_class[:track] = Track
1931
1930
 
1932
1931
  # @return [HTMLElement]
1933
- def u(*args)
1934
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "u"))
1932
+ def u(opts = {})
1933
+ HTMLElement.new(self, opts.merge(tag_name: "u"))
1935
1934
  end
1936
1935
  # @return [HTMLElementCollection]
1937
- def us(*args)
1938
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "u"))
1936
+ def us(opts = {})
1937
+ HTMLElementCollection.new(self, opts.merge(tag_name: "u"))
1939
1938
  end
1940
1939
  Watir.tag_to_class[:u] = HTMLElement
1941
1940
 
1942
1941
  # @return [UList]
1943
- def ul(*args)
1944
- UList.new(self, extract_selector(args).merge(tag_name: "ul"))
1942
+ def ul(opts = {})
1943
+ UList.new(self, opts.merge(tag_name: "ul"))
1945
1944
  end
1946
1945
  # @return [UListCollection]
1947
- def uls(*args)
1948
- UListCollection.new(self, extract_selector(args).merge(tag_name: "ul"))
1946
+ def uls(opts = {})
1947
+ UListCollection.new(self, opts.merge(tag_name: "ul"))
1949
1948
  end
1950
1949
  Watir.tag_to_class[:ul] = UList
1951
1950
 
1952
1951
  # @return [HTMLElement]
1953
- def var(*args)
1954
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "var"))
1952
+ def var(opts = {})
1953
+ HTMLElement.new(self, opts.merge(tag_name: "var"))
1955
1954
  end
1956
1955
  # @return [HTMLElementCollection]
1957
- def vars(*args)
1958
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "var"))
1956
+ def vars(opts = {})
1957
+ HTMLElementCollection.new(self, opts.merge(tag_name: "var"))
1959
1958
  end
1960
1959
  Watir.tag_to_class[:var] = HTMLElement
1961
1960
 
1962
1961
  # @return [Video]
1963
- def video(*args)
1964
- Video.new(self, extract_selector(args).merge(tag_name: "video"))
1962
+ def video(opts = {})
1963
+ Video.new(self, opts.merge(tag_name: "video"))
1965
1964
  end
1966
1965
  # @return [VideoCollection]
1967
- def videos(*args)
1968
- VideoCollection.new(self, extract_selector(args).merge(tag_name: "video"))
1966
+ def videos(opts = {})
1967
+ VideoCollection.new(self, opts.merge(tag_name: "video"))
1969
1968
  end
1970
1969
  Watir.tag_to_class[:video] = Video
1971
1970
 
1972
1971
  # @return [HTMLElement]
1973
- def wbr(*args)
1974
- HTMLElement.new(self, extract_selector(args).merge(tag_name: "wbr"))
1972
+ def wbr(opts = {})
1973
+ HTMLElement.new(self, opts.merge(tag_name: "wbr"))
1975
1974
  end
1976
1975
  # @return [HTMLElementCollection]
1977
- def wbrs(*args)
1978
- HTMLElementCollection.new(self, extract_selector(args).merge(tag_name: "wbr"))
1976
+ def wbrs(opts = {})
1977
+ HTMLElementCollection.new(self, opts.merge(tag_name: "wbr"))
1979
1978
  end
1980
1979
  Watir.tag_to_class[:wbr] = HTMLElement
1981
1980
  end # Container