watir 6.9.1 → 6.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +8 -0
  3. data/lib/watir/capabilities.rb +2 -2
  4. data/lib/watir/elements/element.rb +5 -3
  5. data/lib/watir/elements/iframe.rb +2 -2
  6. data/lib/watir/exception.rb +0 -1
  7. data/lib/watir/locators/button/locator.rb +3 -10
  8. data/lib/watir/locators/button/validator.rb +1 -1
  9. data/lib/watir/locators/cell/locator.rb +3 -5
  10. data/lib/watir/locators/element/locator.rb +61 -105
  11. data/lib/watir/locators/element/selector_builder.rb +11 -4
  12. data/lib/watir/locators/row/locator.rb +3 -5
  13. data/lib/watir/locators/text_field/locator.rb +2 -13
  14. data/spec/browser_spec.rb +4 -3
  15. data/spec/element_locator_spec.rb +50 -19
  16. data/spec/locator_spec_helper.rb +1 -1
  17. data/spec/spec_helper.rb +1 -1
  18. data/spec/watirspec/elements/area_spec.rb +0 -4
  19. data/spec/watirspec/elements/button_spec.rb +0 -4
  20. data/spec/watirspec/elements/checkbox_spec.rb +0 -4
  21. data/spec/watirspec/elements/dd_spec.rb +0 -4
  22. data/spec/watirspec/elements/del_spec.rb +0 -4
  23. data/spec/watirspec/elements/div_spec.rb +30 -8
  24. data/spec/watirspec/elements/divs_spec.rb +1 -1
  25. data/spec/watirspec/elements/dl_spec.rb +0 -4
  26. data/spec/watirspec/elements/dt_spec.rb +0 -4
  27. data/spec/watirspec/elements/element_spec.rb +25 -12
  28. data/spec/watirspec/elements/elements_spec.rb +11 -0
  29. data/spec/watirspec/elements/em_spec.rb +0 -4
  30. data/spec/watirspec/elements/filefield_spec.rb +0 -4
  31. data/spec/watirspec/elements/form_spec.rb +0 -4
  32. data/spec/watirspec/elements/frame_spec.rb +0 -4
  33. data/spec/watirspec/elements/hidden_spec.rb +0 -4
  34. data/spec/watirspec/elements/hn_spec.rb +0 -4
  35. data/spec/watirspec/elements/iframe_spec.rb +0 -4
  36. data/spec/watirspec/elements/image_spec.rb +0 -4
  37. data/spec/watirspec/elements/ins_spec.rb +0 -4
  38. data/spec/watirspec/elements/label_spec.rb +0 -4
  39. data/spec/watirspec/elements/li_spec.rb +0 -4
  40. data/spec/watirspec/elements/link_spec.rb +2 -5
  41. data/spec/watirspec/elements/links_spec.rb +1 -1
  42. data/spec/watirspec/elements/map_spec.rb +0 -4
  43. data/spec/watirspec/elements/ol_spec.rb +4 -6
  44. data/spec/watirspec/elements/option_spec.rb +0 -13
  45. data/spec/watirspec/elements/p_spec.rb +0 -4
  46. data/spec/watirspec/elements/pre_spec.rb +0 -4
  47. data/spec/watirspec/elements/radio_spec.rb +0 -4
  48. data/spec/watirspec/elements/select_list_spec.rb +4 -6
  49. data/spec/watirspec/elements/span_spec.rb +2 -5
  50. data/spec/watirspec/elements/spans_spec.rb +1 -1
  51. data/spec/watirspec/elements/strong_spec.rb +0 -4
  52. data/spec/watirspec/elements/table_spec.rb +6 -6
  53. data/spec/watirspec/elements/tbody_spec.rb +0 -5
  54. data/spec/watirspec/elements/td_spec.rb +2 -5
  55. data/spec/watirspec/elements/text_field_spec.rb +0 -4
  56. data/spec/watirspec/elements/tfoot_spec.rb +0 -5
  57. data/spec/watirspec/elements/thead_spec.rb +0 -5
  58. data/spec/watirspec/elements/tr_spec.rb +0 -4
  59. data/spec/watirspec/elements/ul_spec.rb +2 -5
  60. data/spec/watirspec/html/multiple_ids.html +1 -0
  61. data/spec/watirspec/html/non_control_elements.html +6 -1
  62. data/spec/watirspec/radio_set_spec.rb +0 -4
  63. data/watir.gemspec +1 -1
  64. metadata +2 -4
  65. data/spec/watirspec/html/ng_attributes.html +0 -59
@@ -23,7 +23,8 @@ describe "Ul" do
23
23
  expect(browser.ul(id: "no_such_id")).to_not exist
24
24
  expect(browser.ul(id: /no_such_id/)).to_not exist
25
25
  expect(browser.ul(text: "no_such_text")).to_not exist
26
- expect(browser.ul(text: /no_such_text/)).to_not exist
26
+ msg = /:text locator with RegExp values to find elements based on only visible text is deprecated\. Use :visible_text instead/
27
+ expect { expect(browser.ul(text: /no_such_text/)).to_not exist }.to output(msg).to_stdout_from_any_process
27
28
  expect(browser.ul(class: "no_such_class")).to_not exist
28
29
  expect(browser.ul(class: /no_such_class/)).to_not exist
29
30
  expect(browser.ul(index: 1337)).to_not exist
@@ -33,10 +34,6 @@ describe "Ul" do
33
34
  it "raises TypeError when 'what' argument is invalid" do
34
35
  expect { browser.ul(id: 3.14).exists? }.to raise_error(TypeError)
35
36
  end
36
-
37
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
38
- expect { browser.ul(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
39
- end
40
37
  end
41
38
 
42
39
  # Attribute methods
@@ -8,6 +8,7 @@
8
8
 
9
9
  <body>
10
10
  <div id="multiple" class="foo"></div>
11
+ <span id="multiple" class="foobar"></span>
11
12
  <div id="multiple" class="bar"></div>
12
13
 
13
14
  </body>
@@ -130,6 +130,11 @@
130
130
  <del></del>
131
131
  <del class="footer" onclick="this.innerHTML = 'This is a del with text set by Javascript.'">This is a del.</del>
132
132
  </div>
133
-
133
+ <div custom-attribute=custom>Custom</div>
134
+ <div id="visible_text">
135
+ <a id="all_visible_text">all visible</a>
136
+ <a id="some_visible_text">some visible<span style="display:none;"> some hidden</span></a>
137
+ <a id="no_visible_text" style="display:none;">none visible</a>
138
+ </div>
134
139
  </body>
135
140
  </html>
@@ -43,10 +43,6 @@ describe "RadioSet" do
43
43
  it "raises TypeError when 'what' argument is invalid" do
44
44
  expect { browser.radio_set(id: 3.14).exists? }.to raise_error(TypeError)
45
45
  end
46
-
47
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
48
- expect { browser.radio_set(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
49
- end
50
46
  end
51
47
 
52
48
  # Attribute methods
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'watir'
5
- s.version = '6.9.1'
5
+ s.version = '6.10.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ['Alex Rodionov', 'Titus Fortner']
8
8
  s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.9.1
4
+ version: 6.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-20 00:00:00.000000000 Z
12
+ date: 2017-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver
@@ -477,7 +477,6 @@ files:
477
477
  - spec/watirspec/html/nested_iframe_2.html
478
478
  - spec/watirspec/html/nested_iframes.html
479
479
  - spec/watirspec/html/nested_tables.html
480
- - spec/watirspec/html/ng_attributes.html
481
480
  - spec/watirspec/html/non_control_elements.html
482
481
  - spec/watirspec/html/removed_element.html
483
482
  - spec/watirspec/html/right_click.html
@@ -674,7 +673,6 @@ test_files:
674
673
  - spec/watirspec/html/nested_iframe_2.html
675
674
  - spec/watirspec/html/nested_iframes.html
676
675
  - spec/watirspec/html/nested_tables.html
677
- - spec/watirspec/html/ng_attributes.html
678
676
  - spec/watirspec/html/non_control_elements.html
679
677
  - spec/watirspec/html/removed_element.html
680
678
  - spec/watirspec/html/right_click.html
@@ -1,59 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <script src="javascript/angular.min.js" type="text/javascript" charset="utf-8"></script>
4
-
5
- <style>
6
- .sky {
7
- color:white;
8
- background-color:lightblue;
9
- padding:20px;
10
- font-family:"Courier New";
11
- }
12
- .tomato {
13
- background-color:coral;
14
- padding:40px;
15
- font-family:Verdana;
16
- }
17
- </style>
18
-
19
- <body ng-app="">
20
-
21
- <div>
22
- <p>My first expression: {{ 5 + 5 }}</p>
23
- <p ng-bind="myText"></p>
24
- </div>
25
-
26
- <p>Choose a class:</p>
27
-
28
- <select ng-model="home">
29
- <option value="sky">Sky</option>
30
- <option value="tomato">Tomato</option>
31
- </select>
32
-
33
- <div ng-class="home">
34
- <h1>Welcome Home!</h1>
35
- <p>I like it!</p>
36
- </div>
37
-
38
- <p>Click the button:</p>
39
-
40
- <button ng-click="count = count + 1" ng-init="count=0">OK</button>
41
-
42
- <div>The button has been clicked {{count}} times.</div>
43
-
44
- <input ng-model="name">
45
-
46
- <p>The input field is bound to the "name" variable:</p>
47
- {{name}}
48
-
49
- </div>
50
-
51
- <script>
52
- var app = angular.module('myApp', []);
53
- app.controller('myCtrl', function($scope) {
54
- $scope.name = "John Doe";
55
- });
56
- </script>
57
-
58
- </body>
59
- </html>