watir 7.0.0.beta1 → 7.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +7 -3
  3. data/.rubocop.yml +2 -7
  4. data/CHANGES.md +16 -0
  5. data/lib/watir/browser.rb +18 -4
  6. data/lib/watir/capabilities.rb +1 -1
  7. data/lib/watir/elements/element.rb +32 -3
  8. data/lib/watir/elements/font.rb +1 -0
  9. data/lib/watir/elements/iframe.rb +0 -1
  10. data/lib/watir/elements/radio.rb +2 -2
  11. data/lib/watir/elements/select.rb +63 -40
  12. data/lib/watir/has_window.rb +2 -0
  13. data/lib/watir/locators.rb +4 -0
  14. data/lib/watir/locators/element/matcher.rb +1 -1
  15. data/lib/watir/locators/element/selector_builder.rb +0 -3
  16. data/lib/watir/locators/option/matcher.rb +24 -0
  17. data/lib/watir/locators/option/selector_builder.rb +8 -0
  18. data/lib/watir/locators/option/selector_builder/xpath.rb +37 -0
  19. data/lib/watir/logger.rb +3 -74
  20. data/lib/watir/radio_set.rb +1 -0
  21. data/lib/watir/screenshot.rb +2 -8
  22. data/lib/watir/user_editable.rb +10 -3
  23. data/lib/watir/version.rb +1 -1
  24. data/lib/watir/window.rb +15 -4
  25. data/lib/watir/window_collection.rb +9 -0
  26. data/lib/watirspec.rb +4 -2
  27. data/lib/watirspec/guards.rb +1 -1
  28. data/lib/watirspec/server.rb +1 -1
  29. data/spec/spec_helper.rb +0 -10
  30. data/spec/unit/capabilities_spec.rb +1 -1
  31. data/spec/unit/match_elements/element_spec.rb +11 -0
  32. data/spec/watirspec/after_hooks_spec.rb +22 -45
  33. data/spec/watirspec/browser_spec.rb +185 -206
  34. data/spec/watirspec/cookies_spec.rb +47 -52
  35. data/spec/watirspec/drag_and_drop_spec.rb +5 -7
  36. data/spec/watirspec/elements/area_spec.rb +1 -5
  37. data/spec/watirspec/elements/button_spec.rb +4 -8
  38. data/spec/watirspec/elements/checkbox_spec.rb +2 -4
  39. data/spec/watirspec/elements/date_field_spec.rb +13 -16
  40. data/spec/watirspec/elements/date_time_field_spec.rb +14 -13
  41. data/spec/watirspec/elements/dd_spec.rb +3 -4
  42. data/spec/watirspec/elements/del_spec.rb +10 -12
  43. data/spec/watirspec/elements/div_spec.rb +41 -50
  44. data/spec/watirspec/elements/dl_spec.rb +4 -12
  45. data/spec/watirspec/elements/element_spec.rb +155 -89
  46. data/spec/watirspec/elements/elements_spec.rb +8 -9
  47. data/spec/watirspec/elements/filefield_spec.rb +5 -7
  48. data/spec/watirspec/elements/form_spec.rb +1 -1
  49. data/spec/watirspec/elements/forms_spec.rb +3 -5
  50. data/spec/watirspec/elements/frame_spec.rb +17 -22
  51. data/spec/watirspec/elements/iframe_spec.rb +21 -27
  52. data/spec/watirspec/elements/ins_spec.rb +10 -12
  53. data/spec/watirspec/elements/link_spec.rb +24 -26
  54. data/spec/watirspec/elements/links_spec.rb +8 -9
  55. data/spec/watirspec/elements/radio_spec.rb +11 -14
  56. data/spec/watirspec/elements/select_list_spec.rb +248 -117
  57. data/spec/watirspec/elements/span_spec.rb +10 -12
  58. data/spec/watirspec/elements/table_nesting_spec.rb +31 -34
  59. data/spec/watirspec/elements/table_spec.rb +11 -13
  60. data/spec/watirspec/elements/tbody_spec.rb +10 -12
  61. data/spec/watirspec/elements/td_spec.rb +4 -6
  62. data/spec/watirspec/elements/text_field_spec.rb +10 -12
  63. data/spec/watirspec/elements/tr_spec.rb +5 -7
  64. data/spec/watirspec/user_editable_spec.rb +26 -28
  65. data/spec/watirspec/wait_spec.rb +255 -258
  66. data/spec/watirspec/window_switching_spec.rb +199 -200
  67. data/spec/watirspec_helper.rb +34 -31
  68. metadata +5 -6
  69. data/spec/implementation_spec.rb +0 -24
  70. data/spec/unit/logger_spec.rb +0 -81
@@ -55,10 +55,9 @@ describe 'Dl' do
55
55
  expect(browser.dl(id: 'experience-list').text).to include('11 years')
56
56
  end
57
57
 
58
- bug 'Safari does not strip text', :safari do
59
- it 'returns an empty string if the element exists but contains no text' do
60
- expect(browser.dl(id: 'noop').text).to eq ''
61
- end
58
+ it 'returns an empty string if the element exists but contains no text',
59
+ except: {browser: :safari, reason: 'Safari does not strip text'} do
60
+ expect(browser.dl(id: 'noop').text).to eq ''
62
61
  end
63
62
 
64
63
  it 'raises UnknownObjectException if the element does not exist' do
@@ -98,14 +97,7 @@ describe 'Dl' do
98
97
  describe '#html' do
99
98
  it 'returns the HTML of the element' do
100
99
  html = browser.dl(id: 'experience-list').html.downcase
101
- not_compliant_on :internet_explorer do
102
- expect(html).to include('<dt class="current-industry">')
103
- end
104
-
105
- deviates_on :internet_explorer do
106
- expect(html).to include('<dt class=current-industry>')
107
- end
108
-
100
+ expect(html).to match(/<dt class=?"current-industry?">/)
109
101
  expect(html).to_not include('</body>')
110
102
  end
111
103
  end
@@ -2,6 +2,7 @@ require 'watirspec_helper'
2
2
 
3
3
  describe 'Element' do
4
4
  before :each do
5
+ @c = Selenium::WebDriver::Platform.mac? ? :command : :control
5
6
  browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
6
7
  end
7
8
 
@@ -101,14 +102,13 @@ describe 'Element' do
101
102
  expect(browser.element(visible_text: /Link 2/, class: 'external')).to exist
102
103
  end
103
104
 
104
- bug 'Safari is not filtering out hidden text', :safari do
105
- it 'finds elements by visible text in spite of hidden text' do
106
- browser.goto WatirSpec.url_for('non_control_elements.html')
105
+ it 'finds elements by visible text in spite of hidden text',
106
+ except: {browser: :safari, reason: 'Safari is not filtering out hidden text'} do
107
+ browser.goto WatirSpec.url_for('non_control_elements.html')
107
108
 
108
- expect(browser.element(visible_text: 'some visible')).to exist
109
- expect(browser.element(visible_text: 'none visible')).not_to exist
110
- expect(browser.element(visible_text: /none visible/)).not_to exist
111
- end
109
+ expect(browser.element(visible_text: 'some visible')).to exist
110
+ expect(browser.element(visible_text: 'none visible')).not_to exist
111
+ expect(browser.element(visible_text: /none visible/)).not_to exist
112
112
  end
113
113
 
114
114
  it 'raises exception unless value is a String or a RegExp' do
@@ -202,14 +202,13 @@ describe 'Element' do
202
202
  end
203
203
  end
204
204
 
205
- bug 'https://github.com/SeleniumHQ/selenium/issues/2555', %i[remote firefox] do
206
- bug 'https://github.com/SeleniumHQ/selenium/issues/1795', %i[remote edge] do
207
- describe '#focused?' do
208
- it 'knows if the element is focused' do
209
- expect(browser.element(id: 'new_user_first_name')).to be_focused
210
- expect(browser.element(id: 'new_user_last_name')).to_not be_focused
211
- end
212
- end
205
+ describe '#focused?',
206
+ except: {browser: :firefox,
207
+ remote: true,
208
+ reason: 'https://github.com/SeleniumHQ/selenium/issues/2555'} do
209
+ it 'knows if the element is focused' do
210
+ expect(browser.element(id: 'new_user_first_name')).to be_focused
211
+ expect(browser.element(id: 'new_user_last_name')).to_not be_focused
213
212
  end
214
213
  end
215
214
 
@@ -249,7 +248,8 @@ describe 'Element' do
249
248
  browser.goto WatirSpec.url_for('removed_element.html')
250
249
  end
251
250
 
252
- it 'element from a collection is re-looked up after it becomes stale' do
251
+ it 'element from a collection is re-looked up after it becomes stale',
252
+ except: {browser: :ie, reason: 'throwing NoSuchElement instead'} do
253
253
  element = browser.divs(id: 'text').first.locate
254
254
 
255
255
  browser.refresh
@@ -258,7 +258,8 @@ describe 'Element' do
258
258
  expect(element).to exist
259
259
  end
260
260
 
261
- it 'element from a selenium element throws an exception when relocated' do
261
+ it 'element from a selenium element throws an exception when relocated',
262
+ except: {browser: :ie, reason: 'throwing NoSuchElement instead'} do
262
263
  div = browser.div.locate
263
264
  element = browser.element(element: div.wd)
264
265
 
@@ -338,7 +339,8 @@ describe 'Element' do
338
339
  expect(element).to be_stale
339
340
  end
340
341
 
341
- it 'returns true the second time if the element is stale' do
342
+ it 'returns true the second time if the element is stale',
343
+ except: {browser: :ie, reason: 'throwing NoSuchElement instead'} do
342
344
  element = browser.div.locate
343
345
 
344
346
  browser.refresh
@@ -462,7 +464,6 @@ describe 'Element' do
462
464
 
463
465
  describe '#send_keys' do
464
466
  before(:each) do
465
- @c = Selenium::WebDriver::Platform.mac? ? :command : :control
466
467
  browser.goto(WatirSpec.url_for('keylogger.html'))
467
468
  end
468
469
 
@@ -481,43 +482,122 @@ describe 'Element' do
481
482
  expect(events).to eq 10
482
483
  end
483
484
 
484
- bug 'http://code.google.com/p/chromium/issues/detail?id=93879', %i[chrome macosx] do
485
- bug 'special keys are not working correctly', :safari, :firefox do
486
- it 'performs key combinations' do
487
- receiver.send_keys 'foo'
488
- receiver.send_keys [@c, 'a']
489
- receiver.send_keys :backspace
490
- expect(receiver.value).to be_empty
491
- expect(events).to eq 6
492
- end
485
+ context 'with key combinations',
486
+ except: [{browser: :firefox, reason: 'https://github.com/mozilla/geckodriver/issues/245'},
487
+ {browser: :safari}] do
488
+ it 'performs from array' do
489
+ receiver.send_keys 'foo'
490
+ receiver.send_keys [@c, 'a']
491
+ receiver.send_keys :backspace
492
+ expect(receiver.value).to be_empty
493
+ expect(events).to eq 6
494
+ end
493
495
 
494
- it 'performs arbitrary list of key combinations' do
495
- receiver.send_keys 'foo'
496
- receiver.send_keys [@c, 'a'], [@c, 'x']
497
- expect(receiver.value).to be_empty
498
- expect(events).to eq 7
499
- end
496
+ it 'performs from multiple arrays' do
497
+ receiver.send_keys 'foo'
498
+ receiver.send_keys [@c, 'a'], [@c, 'x']
499
+ expect(receiver.value).to be_empty
500
+ expect(events).to eq 7
501
+ end
500
502
 
501
- it 'supports combination of strings and arrays' do
502
- receiver.send_keys 'foo', [@c, 'a'], :backspace
503
- expect(receiver.value).to be_empty
504
- expect(events).to eq 6
505
- end
503
+ it 'supports combination of strings and arrays' do
504
+ receiver.send_keys 'foo', [@c, 'a'], :backspace
505
+ expect(receiver.value).to be_empty
506
+ expect(events).to eq 6
506
507
  end
507
508
  end
508
509
  end
509
510
 
510
511
  describe '#click' do
511
- bug 'Element has been located but Safari does not recognize it', :safari do
512
- bug 'https://bugs.chromium.org/p/chromedriver/issues/detail?id=2732', :w3c do
513
- it 'accepts modifiers' do
514
- browser.a.click(:shift)
515
- browser.wait_until { |b| b.windows.size > 1 }
516
- expect(browser.windows.size).to eq 2
517
- ensure
518
- browser.windows.reject(&:current?).each(&:close)
519
- end
520
- end
512
+ it 'accepts modifiers', except: {browser: :ie} do
513
+ browser.a.click(@c)
514
+ expect { browser.windows.wait_until(size: 2) }.to_not raise_exception
515
+ ensure
516
+ browser.windows.restore!
517
+ end
518
+ end
519
+
520
+ describe '#set' do
521
+ it 'clicks an element by default that does not define #set' do
522
+ browser.goto(WatirSpec.url_for('non_control_elements.html'))
523
+ browser.element(id: 'best_language').set
524
+ expect(browser.div(id: 'best_language').text).to eq 'Ruby!'
525
+ end
526
+
527
+ it 'clicks an element that does not define #set with provided modifiers', except: {browser: :ie} do
528
+ browser.a.set(@c)
529
+ browser.wait_until { |b| b.windows.size > 1 }
530
+ expect(browser.windows.size).to eq 2
531
+ ensure
532
+ browser.windows.restore!
533
+ end
534
+
535
+ it 'does not click an element that does not define #set when passed false' do
536
+ browser.goto(WatirSpec.url_for('non_control_elements.html'))
537
+ browser.element(id: 'best_language').set(false)
538
+ expect(browser.div(id: 'best_language').text).not_to eq 'Ruby!'
539
+ end
540
+
541
+ it 'clicks a Button' do
542
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
543
+ browser.button(id: 'delete_user_submit').set
544
+ browser.wait_until { |b| !b.url.include? 'forms_with_input_elements.html' }
545
+ expect(browser.text).to include('Semantic table')
546
+ end
547
+
548
+ it 'sends keys to text element' do
549
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
550
+ browser.element(id: 'new_user_email').set('Bye Cruel World')
551
+ expect(browser.text_field(id: 'new_user_email').value).to eq 'Bye Cruel World'
552
+ end
553
+
554
+ it 'sends keys to text area' do
555
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
556
+ browser.element(id: 'delete_user_comment').set('Hello Cruel World')
557
+ expect(browser.textarea(id: 'delete_user_comment').value).to eq 'Hello Cruel World'
558
+ end
559
+
560
+ it 'checks a checkbox' do
561
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
562
+ browser.element(id: 'new_user_interests_cars').set
563
+ expect(browser.checkbox(id: 'new_user_interests_cars')).to be_set
564
+ end
565
+
566
+ it 'unchecks a checkbox' do
567
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
568
+ browser.element(id: 'new_user_interests_books').set(false)
569
+ expect(browser.checkbox(id: 'new_user_interests_books')).to_not be_set
570
+ end
571
+
572
+ it 'clicks a Radio' do
573
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
574
+ browser.radio(id: 'new_user_newsletter_no').set
575
+ expect(browser.radio(id: 'new_user_newsletter_no')).to be_set
576
+ expect(messages.size).to eq 1
577
+ end
578
+
579
+ it 'does not click a Radio when false or already clicked' do
580
+ browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
581
+ browser.element(id: 'new_user_newsletter_no').set(false)
582
+ browser.element(id: 'new_user_newsletter_yes').set(true)
583
+ expect(messages.size).to eq 0
584
+ end
585
+
586
+ it 'uploads a file' do
587
+ browser.element(name: 'new_user_portrait').set __FILE__
588
+
589
+ expect(browser.file_field(name: 'new_user_portrait').value).to include(File.basename(__FILE__))
590
+ end
591
+
592
+ it 'selects an option' do
593
+ browser.select_list(name: 'new_user_languages').clear
594
+ browser.element(name: 'new_user_languages').set('2')
595
+ expect(browser.select_list(name: 'new_user_languages').selected_options.map(&:text)).to eq %w[EN]
596
+ end
597
+
598
+ it 'sends keys to content editable element' do
599
+ browser.element(id: 'contenteditable').set('Bar')
600
+ expect(browser.div(id: 'contenteditable').text).to eq 'Bar'
521
601
  end
522
602
  end
523
603
 
@@ -543,17 +623,15 @@ describe 'Element' do
543
623
  end
544
624
 
545
625
  describe '#hover' do
546
- not_compliant_on :internet_explorer do
547
- it 'should hover over the element' do
548
- browser.goto WatirSpec.url_for('hover.html')
549
- link = browser.a
550
-
551
- expect(link.style('font-size')).to eq '10px'
552
- link.scroll.to
553
- link.hover
554
- link.wait_until { |l| l.style('font-size') == '20px' }
555
- expect(link.style('font-size')).to eq '20px'
556
- end
626
+ it 'should hover over the element', except: {browser: :ie} do
627
+ browser.goto WatirSpec.url_for('hover.html')
628
+ link = browser.a
629
+
630
+ expect(link.style('font-size')).to eq '10px'
631
+ link.scroll.to
632
+ link.hover
633
+ link.wait_until { |l| l.style('font-size') == '20px' }
634
+ expect(link.style('font-size')).to eq '20px'
557
635
  end
558
636
  end
559
637
 
@@ -616,7 +694,8 @@ describe 'Element' do
616
694
  end
617
695
 
618
696
  describe '#inner_text' do
619
- it 'returns inner HTML code of element' do
697
+ it 'returns inner HTML code of element',
698
+ except: {browser: :ie, reason: 'also returning explicitly hidden results'} do
620
699
  browser.goto WatirSpec.url_for('non_control_elements.html')
621
700
  div = browser.div(id: 'shown')
622
701
  expect(div.inner_text).to eq('Not hidden')
@@ -642,7 +721,8 @@ describe 'Element' do
642
721
  end
643
722
 
644
723
  describe '#select_text and #selected_text' do
645
- it 'selects text and returns selected text' do
724
+ it 'selects text and returns selected text',
725
+ except: {browser: :ie, reason: 'Select Text atom appears broken in IE 11'} do
646
726
  browser.goto WatirSpec.url_for('non_control_elements.html')
647
727
  element = browser.element(visible_text: 'all visible')
648
728
  element.select_text('all visible')
@@ -779,28 +859,22 @@ describe 'Element' do
779
859
  end
780
860
  end
781
861
 
782
- describe 'Float Attribute' do
783
- it 'returns Float value of applicable element' do
862
+ describe 'Numeric Attribute' do
863
+ it 'returns Float value',
864
+ except: {browser: :ie, reason: 'not recognizing the value of the element'} do
784
865
  element = browser.text_field(id: 'number')
785
866
  expect(element.valueasnumber).to be_a Float
786
867
  end
787
868
 
788
- it 'returns nil value for an inapplicable Element' do
869
+ it 'returns nil for unspecified value' do
789
870
  element = browser.input
790
871
  expect(element.valueasnumber).to be_nil
791
872
  end
792
- end
793
873
 
794
- describe 'Integer Attribute' do
795
- it 'returns Float value of applicable element' do
874
+ it 'returns Integer value' do
796
875
  element = browser.form
797
876
  expect(element.length).to be_a Integer
798
877
  end
799
-
800
- it 'returns -1 for an inapplicable Element' do
801
- element = browser.input
802
- expect(element.maxlength).to eq(-1)
803
- end
804
878
  end
805
879
 
806
880
  describe '#class_name' do
@@ -850,18 +924,12 @@ describe 'Element' do
850
924
  expect { btn.click }.not_to raise_exception
851
925
  end
852
926
 
853
- it 'returns true if element center is covered by a non-descendant' do
927
+ it 'returns true if element center is covered by a non-descendant',
928
+ except: {browser: :safari, reason: 'not getting element click intercepted'} do
854
929
  btn = browser.button(id: 'obscured')
855
930
  expect(btn).to be_obscured
856
- not_compliant_on :chrome, :safari do
857
- expect { btn.click }.to raise_exception(Selenium::WebDriver::Error::ElementClickInterceptedError)
858
- end
859
- compliant_on :chrome do
860
- expect { btn.click }.to raise_exception(Selenium::WebDriver::Error::ElementClickInterceptedError)
861
- end
862
- compliant_on :safari do
863
- expect { btn.click }.to raise_exception(Selenium::WebDriver::Error::WebDriverError)
864
- end
931
+
932
+ expect { btn.click }.to raise_exception(Selenium::WebDriver::Error::ElementClickInterceptedError)
865
933
  end
866
934
 
867
935
  it 'returns false if element center is surrounded by non-descendants' do
@@ -882,12 +950,10 @@ describe 'Element' do
882
950
  expect { div.click }.not_to raise_exception
883
951
  end
884
952
 
885
- bug 'Safari is throwing click intercepted here', :safari do
886
- it 'returns true if element cannot be scrolled into view' do
887
- btn = browser.button(id: 'off_screen')
888
- expect(btn).to be_obscured
889
- expect { btn.click }.to raise_unknown_object_exception
890
- end
953
+ it 'returns true if element cannot be scrolled into view' do
954
+ btn = browser.button(id: 'off_screen')
955
+ expect(btn).to be_obscured
956
+ expect { btn.click }.to raise_unknown_object_exception
891
957
  end
892
958
 
893
959
  it 'returns true if element is hidden' do
@@ -43,15 +43,14 @@ describe 'Elements' do
43
43
  expect(container.elements(visible_text: /some visible/).count).to eq(1)
44
44
  end
45
45
 
46
- bug 'Safari is not filtering out hidden text', :safari do
47
- it 'finds elements in spite of hidden text' do
48
- browser.goto WatirSpec.url_for('non_control_elements.html')
49
- container = browser.div(id: 'visible_text')
50
-
51
- expect(container.elements(visible_text: 'some visible').count).to eq(1)
52
- expect(container.elements(visible_text: 'none visible').count).to eq(0)
53
- expect(container.elements(visible_text: /none visible/).count).to eq(0)
54
- end
46
+ it 'finds elements in spite of hidden text',
47
+ except: {browser: :safari, reason: 'Safari is not filtering out hidden text'} do
48
+ browser.goto WatirSpec.url_for('non_control_elements.html')
49
+ container = browser.div(id: 'visible_text')
50
+
51
+ expect(container.elements(visible_text: 'some visible').count).to eq(1)
52
+ expect(container.elements(visible_text: 'none visible').count).to eq(0)
53
+ expect(container.elements(visible_text: /none visible/).count).to eq(0)
55
54
  end
56
55
  end
57
56
  end
@@ -111,7 +111,7 @@ describe 'FileField' do
111
111
  end
112
112
  end
113
113
 
114
- describe '#value=' do
114
+ describe '#value=', exclude: {browser: :ie} do
115
115
  it 'is able to set a file path in the field and click the upload button and fire the onchange event' do
116
116
  browser.goto WatirSpec.url_for('forms_with_input_elements.html')
117
117
 
@@ -122,12 +122,10 @@ describe 'FileField' do
122
122
  expect(element.value).to include(File.basename(path)) # only some browser will return the full path
123
123
  end
124
124
 
125
- not_compliant_on :internet_explorer, %i[chrome windows] do
126
- it 'does not alter its argument' do
127
- value = File.expand_path '.rubocop.yml'
128
- browser.file_field.value = value
129
- expect(value).to match(/\.rubocop\.yml$/)
130
- end
125
+ it 'does not alter its argument' do
126
+ value = File.expand_path '.rubocop.yml'
127
+ browser.file_field.value = value
128
+ expect(value).to match(/\.rubocop\.yml$/)
131
129
  end
132
130
  end
133
131
  end
@@ -47,7 +47,7 @@ describe 'Form' do
47
47
  describe '#submit' do
48
48
  it 'submits the form' do
49
49
  browser.form(id: 'delete_user').submit
50
- Watir::Wait.until { !browser.url.include? 'forms_with_input_elements.html' }
50
+ browser.wait_while(url: /forms_with_input_elements\.html$/)
51
51
  expect(browser.text).to include('Semantic table')
52
52
  end
53
53
 
@@ -5,11 +5,9 @@ describe 'Forms' do
5
5
  browser.goto(WatirSpec.url_for('forms_with_input_elements.html'))
6
6
  end
7
7
 
8
- bug 'https://github.com/watir/watir/issues/507' do
9
- describe 'with selectors' do
10
- it 'returns the matching elements' do
11
- expect(browser.forms(method: 'post').to_a).to eq [browser.form(method: 'post')]
12
- end
8
+ describe 'with selectors' do
9
+ it 'returns the matching elements' do
10
+ expect(browser.forms(method: 'post').to_a).to eq [browser.form(method: 'post')]
13
11
  end
14
12
  end
15
13