page-object 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -0
  4. data/ChangeLog +10 -0
  5. data/README.md +1 -1
  6. data/features/bold.feature +21 -0
  7. data/features/html/indexed_property.html +14 -0
  8. data/features/html/multi_elements.html +1 -1
  9. data/features/html/static_elements.html +1 -2
  10. data/features/indexed_property.feature +15 -0
  11. data/features/multi_elements.feature +6 -0
  12. data/features/step_definitions/async_steps.rb +1 -1
  13. data/features/step_definitions/bold_steps.rb +12 -0
  14. data/features/step_definitions/check_box_steps.rb +2 -2
  15. data/features/step_definitions/indexed_property_steps.rb +47 -1
  16. data/features/step_definitions/label_steps.rb +1 -1
  17. data/features/step_definitions/multi_elements_steps.rb +13 -0
  18. data/features/step_definitions/select_list_steps.rb +1 -1
  19. data/features/step_definitions/table_steps.rb +4 -0
  20. data/features/support/page.rb +9 -0
  21. data/features/table.feature +12 -4
  22. data/lib/page-object.rb +6 -5
  23. data/lib/page-object/accessors.rb +78 -58
  24. data/lib/page-object/elements.rb +1 -0
  25. data/lib/page-object/elements/bold.rb +11 -0
  26. data/lib/page-object/elements/element.rb +12 -1
  27. data/lib/page-object/elements/table.rb +12 -1
  28. data/lib/page-object/indexed_properties.rb +20 -21
  29. data/lib/page-object/javascript/angularjs.rb +14 -0
  30. data/lib/page-object/javascript_framework_facade.rb +4 -2
  31. data/lib/page-object/locator_generator.rb +1 -0
  32. data/lib/page-object/page_populator.rb +0 -1
  33. data/lib/page-object/platforms/selenium_webdriver/button.rb +1 -1
  34. data/lib/page-object/platforms/selenium_webdriver/element.rb +1 -1
  35. data/lib/page-object/platforms/selenium_webdriver/page_object.rb +26 -10
  36. data/lib/page-object/platforms/selenium_webdriver/radio_button.rb +0 -7
  37. data/lib/page-object/platforms/watir_webdriver/element.rb +1 -1
  38. data/lib/page-object/platforms/watir_webdriver/page_object.rb +23 -8
  39. data/lib/page-object/platforms/watir_webdriver/radio_button.rb +0 -7
  40. data/lib/page-object/version.rb +1 -1
  41. data/lib/page-object/widgets.rb +7 -0
  42. data/page-object.gemspec +3 -3
  43. data/spec/page-object/accessors_spec.rb +40 -0
  44. data/spec/page-object/element_locators_spec.rb +340 -305
  45. data/spec/page-object/elements/area_spec.rb +8 -8
  46. data/spec/page-object/elements/bold_spec.rb +29 -0
  47. data/spec/page-object/elements/button_spec.rb +7 -7
  48. data/spec/page-object/elements/canvas_spec.rb +6 -6
  49. data/spec/page-object/elements/check_box_spec.rb +9 -9
  50. data/spec/page-object/elements/div_spec.rb +3 -3
  51. data/spec/page-object/elements/element_spec.rb +21 -21
  52. data/spec/page-object/elements/file_field_spec.rb +4 -4
  53. data/spec/page-object/elements/form_spec.rb +3 -3
  54. data/spec/page-object/elements/heading_spec.rb +8 -8
  55. data/spec/page-object/elements/hidden_field_spec.rb +3 -3
  56. data/spec/page-object/elements/image_spec.rb +14 -14
  57. data/spec/page-object/elements/label_spec.rb +3 -3
  58. data/spec/page-object/elements/link_spec.rb +6 -6
  59. data/spec/page-object/elements/list_item_spec.rb +4 -3
  60. data/spec/page-object/elements/nested_element_spec.rb +47 -47
  61. data/spec/page-object/elements/option_spec.rb +1 -1
  62. data/spec/page-object/elements/ordered_list_spec.rb +33 -33
  63. data/spec/page-object/elements/paragraph_spec.rb +3 -4
  64. data/spec/page-object/elements/select_list_spec.rb +52 -52
  65. data/spec/page-object/elements/selenium/radio_button_spec.rb +7 -13
  66. data/spec/page-object/elements/selenium/text_field_spec.rb +7 -7
  67. data/spec/page-object/elements/selenium_element_spec.rb +53 -53
  68. data/spec/page-object/elements/span_spec.rb +3 -3
  69. data/spec/page-object/elements/table_cell_spec.rb +3 -3
  70. data/spec/page-object/elements/table_row_spec.rb +22 -22
  71. data/spec/page-object/elements/table_spec.rb +28 -28
  72. data/spec/page-object/elements/text_area_spec.rb +5 -5
  73. data/spec/page-object/elements/unordered_list_spec.rb +33 -34
  74. data/spec/page-object/elements/watir_element_spec.rb +47 -48
  75. data/spec/page-object/javascript_framework_facade_spec.rb +6 -6
  76. data/spec/page-object/loads_platform_spec.rb +4 -4
  77. data/spec/page-object/page-object_spec.rb +103 -102
  78. data/spec/page-object/page_factory_spec.rb +43 -61
  79. data/spec/page-object/page_populator_spec.rb +44 -50
  80. data/spec/page-object/platforms/selenium_webdriver/selenium_page_object_spec.rb +15 -15
  81. data/spec/page-object/platforms/selenium_webdriver_spec.rb +6 -6
  82. data/spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb +4 -4
  83. data/spec/page-object/platforms/watir_webdriver_spec.rb +1 -1
  84. data/spec/page-object/selenium_accessors_spec.rb +166 -153
  85. data/spec/page-object/watir_accessors_spec.rb +265 -245
  86. data/spec/page-object/widget_spec.rb +62 -30
  87. data/spec/spec_helper.rb +8 -8
  88. metadata +20 -10
@@ -8,21 +8,21 @@ describe PageObject::Elements::HiddenField do
8
8
  it "should map watir types to same" do
9
9
  [:class, :id, :index, :name, :text, :xpath, :value].each do |t|
10
10
  identifier = hiddenfield.watir_identifier_for t => 'value'
11
- identifier.keys.first.should == t
11
+ expect(identifier.keys.first).to eql t
12
12
  end
13
13
  end
14
14
 
15
15
  it "should map selenium types to same" do
16
16
  [:class, :id, :name, :xpath, :index, :value].each do |t|
17
17
  key, value = hiddenfield.selenium_identifier_for t => 'value'
18
- key.should == t
18
+ expect(key).to eql t
19
19
  end
20
20
  end
21
21
  end
22
22
 
23
23
  describe "interface" do
24
24
  it "should register with type :hidden" do
25
- ::PageObject::Elements.element_class_for(:input, :hidden).should == ::PageObject::Elements::HiddenField
25
+ expect(::PageObject::Elements.element_class_for(:input, :hidden)).to eql ::PageObject::Elements::HiddenField
26
26
  end
27
27
  end
28
28
  end
@@ -8,14 +8,14 @@ describe PageObject::Elements::Image do
8
8
  it "should map watir types to same" do
9
9
  [:class, :id, :index, :name, :xpath, :alt, :src].each do |t|
10
10
  identifier = image.watir_identifier_for t => 'value'
11
- identifier.keys.first.should == t
11
+ expect(identifier.keys.first).to eql t
12
12
  end
13
13
  end
14
14
 
15
15
  it "should map selenium types to same" do
16
16
  [:class, :id, :index, :name, :xpath, :alt, :src].each do |t|
17
17
  key, value = image.selenium_identifier_for t => 'value'
18
- key.should == t
18
+ expect(key).to eql t
19
19
  end
20
20
  end
21
21
  end
@@ -24,24 +24,24 @@ describe PageObject::Elements::Image do
24
24
  let(:image_element) { double('image_element') }
25
25
 
26
26
  before(:each) do
27
- image_element.stub(:size).and_return(image_element)
27
+ allow(image_element).to receive(:size).and_return(image_element)
28
28
  end
29
29
 
30
30
  it "should register with tag_name :img" do
31
- ::PageObject::Elements.element_class_for(:img).should == ::PageObject::Elements::Image
31
+ expect(::PageObject::Elements.element_class_for(:img)).to eql ::PageObject::Elements::Image
32
32
  end
33
33
 
34
34
  context "for watir" do
35
35
  it "should know the images width" do
36
36
  image = PageObject::Elements::Image.new(image_element, :platform => :watir_webdriver)
37
- image_element.should_receive(:width).and_return(100)
38
- image.width.should == 100
37
+ expect(image_element).to receive(:width).and_return(100)
38
+ expect(image.width).to eql 100
39
39
  end
40
40
 
41
41
  it "should know the images height" do
42
42
  image = PageObject::Elements::Image.new(image_element, :platform => :watir_webdriver)
43
- image_element.should_receive(:height).and_return(120)
44
- image.height.should == 120
43
+ expect(image_element).to receive(:height).and_return(120)
44
+ expect(image.height).to eql 120
45
45
  end
46
46
  end
47
47
 
@@ -49,17 +49,17 @@ describe PageObject::Elements::Image do
49
49
  it "should know the images width" do
50
50
  dim = double('dimension')
51
51
  image = PageObject::Elements::Image.new(image_element, :platform => :selenium_webdriver)
52
- image_element.should_receive(:size).and_return(dim)
53
- dim.should_receive(:width).and_return(100)
54
- image.width.should == 100
52
+ expect(image_element).to receive(:size).and_return(dim)
53
+ expect(dim).to receive(:width).and_return(100)
54
+ expect(image.width).to eql 100
55
55
  end
56
56
 
57
57
  it "should know the images height" do
58
58
  dim = double('dimension')
59
59
  image = PageObject::Elements::Image.new(image_element, :platform => :selenium_webdriver)
60
- image_element.should_receive(:size).and_return(dim)
61
- dim.should_receive(:height).and_return(120)
62
- image.height.should == 120
60
+ expect(image_element).to receive(:size).and_return(dim)
61
+ expect(dim).to receive(:height).and_return(120)
62
+ expect(image.height).to eql 120
63
63
  end
64
64
  end
65
65
  end
@@ -8,20 +8,20 @@ describe PageObject::Elements::Label do
8
8
  it "should map watir types to same" do
9
9
  [:class, :id, :text, :index, :xpath].each do |t|
10
10
  identifier = label.watir_identifier_for t => 'value'
11
- identifier.keys.first.should == t
11
+ expect(identifier.keys.first).to eql t
12
12
  end
13
13
  end
14
14
 
15
15
  it "should map selenium types to same" do
16
16
  [:class, :id, :text, :index, :xpath].each do |t|
17
17
  key, value = label.selenium_identifier_for t => 'value'
18
- key.should == t
18
+ expect(key).to eql t
19
19
  end
20
20
  end
21
21
 
22
22
  describe "interface" do
23
23
  it "should register with tag :label" do
24
- ::PageObject::Elements.element_class_for(:label).should == ::PageObject::Elements::Label
24
+ expect(::PageObject::Elements.element_class_for(:label)).to eql ::PageObject::Elements::Label
25
25
  end
26
26
  end
27
27
  end
@@ -8,27 +8,27 @@ describe PageObject::Elements::Link do
8
8
  it "should map watir types to same" do
9
9
  [:class, :href, :id, :index, :name, :text, :xpath, :css, :title].each do |t|
10
10
  identifier = link.watir_identifier_for t => 'value'
11
- identifier.keys.first.should == t
11
+ expect(identifier.keys.first).to eql t
12
12
  end
13
13
  end
14
14
 
15
15
  it "should map selenium types to watir" do
16
16
  [:link, :link_text].each do |t|
17
17
  identifier = link.watir_identifier_for t => 'value'
18
- identifier.keys.first.should == :text
18
+ expect(identifier.keys.first).to eql :text
19
19
  end
20
20
  end
21
21
 
22
22
  it "should map selenium types to same" do
23
23
  [:class, :id, :link, :link_text, :name, :xpath, :index, :css, :title].each do |t|
24
24
  key, value = link.selenium_identifier_for t => 'value'
25
- key.should == t
25
+ expect(key).to eql t
26
26
  end
27
27
  end
28
28
 
29
29
  it "should map watir types to selenium" do
30
30
  key, value = link.selenium_identifier_for :text => 'value'
31
- key.should == :link_text
31
+ expect(key).to eql :link_text
32
32
  end
33
33
  end
34
34
 
@@ -36,13 +36,13 @@ describe PageObject::Elements::Link do
36
36
  let(:link_element) { double('link_element') }
37
37
 
38
38
  it "should register with tag :a" do
39
- ::PageObject::Elements.element_class_for(:a).should == ::PageObject::Elements::Link
39
+ expect(::PageObject::Elements.element_class_for(:a)).to eql ::PageObject::Elements::Link
40
40
  end
41
41
 
42
42
  context "for selenium" do
43
43
  it "should return error when asked for its' value" do
44
44
  link = PageObject::Elements::Link.new(link_element, :platform => :selenium_webdriver)
45
- lambda { link.value }.should raise_error
45
+ expect(lambda { link.value }).to raise_error
46
46
  end
47
47
  end
48
48
  end
@@ -8,21 +8,22 @@ describe PageObject::Elements::ListItem do
8
8
  it "should map watir types to same" do
9
9
  [:class, :id, :index, :text, :xpath].each do |t|
10
10
  identifier = list_item.watir_identifier_for t => 'value'
11
- identifier.keys.first.should == t
11
+ expect(identifier.keys.first).to eql t
12
12
  end
13
13
  end
14
14
 
15
15
  it "should map selenium types to same" do
16
16
  [:class, :id, :index, :name, :text, :xpath].each do |t|
17
17
  key, value = list_item.selenium_identifier_for t => 'value'
18
- key.should == t
18
+ expect(key).to eql t
19
19
  end
20
20
  end
21
21
 
22
22
  describe "interface" do
23
23
  it "should register as tag_name :li" do
24
- ::PageObject::Elements.element_class_for(:li).should == ::PageObject::Elements::ListItem
24
+ expect(::PageObject::Elements.element_class_for(:li)).to eql ::PageObject::Elements::ListItem
25
25
  end
26
26
  end
27
27
  end
28
28
  end
29
+
@@ -10,117 +10,117 @@ describe "Element with nested elements" do
10
10
  end
11
11
 
12
12
  it "should find nested links" do
13
- @watir_driver.should_receive(:link).with(:id => 'blah').and_return(@watir_driver)
13
+ expect(@watir_driver).to receive(:link).with(:id => 'blah').and_return(@watir_driver)
14
14
  @watir_element.link_element(:id => 'blah')
15
15
  end
16
16
 
17
17
  it "should find nested buttons" do
18
- @watir_driver.should_receive(:button).with(:id => 'blah').and_return(@watir_driver)
18
+ expect(@watir_driver).to receive(:button).with(:id => 'blah').and_return(@watir_driver)
19
19
  @watir_element.button_element(:id => 'blah')
20
20
  end
21
21
 
22
22
  it "should find nested text fields" do
23
- @watir_driver.should_receive(:text_field).with(:id => 'blah').and_return(@watir_driver)
23
+ expect(@watir_driver).to receive(:text_field).with(:id => 'blah').and_return(@watir_driver)
24
24
  @watir_element.text_field_element(:id => 'blah')
25
25
  end
26
26
 
27
27
  it "should find nested hidden fields" do
28
- @watir_driver.should_receive(:hidden).and_return(@watir_driver)
28
+ expect(@watir_driver).to receive(:hidden).and_return(@watir_driver)
29
29
  @watir_element.hidden_field_element
30
30
  end
31
31
 
32
32
  it "should find nested text areas" do
33
- @watir_driver.should_receive(:textarea).and_return(@watir_driver)
33
+ expect(@watir_driver).to receive(:textarea).and_return(@watir_driver)
34
34
  @watir_element.text_area_element
35
35
  end
36
36
 
37
37
  it "should find a nested select list" do
38
- @watir_driver.should_receive(:select_list).and_return(@watir_driver)
38
+ expect(@watir_driver).to receive(:select_list).and_return(@watir_driver)
39
39
  @watir_element.select_list_element
40
40
  end
41
41
 
42
42
  it "should find a nested checkbox" do
43
- @watir_driver.should_receive(:checkbox).and_return(@watir_driver)
43
+ expect(@watir_driver).to receive(:checkbox).and_return(@watir_driver)
44
44
  @watir_element.checkbox_element
45
45
  end
46
46
 
47
47
  it "should find a nested radio button" do
48
- @watir_driver.should_receive(:radio).and_return(@watir_driver)
48
+ expect(@watir_driver).to receive(:radio).and_return(@watir_driver)
49
49
  @watir_element.radio_button_element
50
50
  end
51
51
 
52
52
  it "should find a nested div" do
53
- @watir_driver.should_receive(:div).and_return(@watir_driver)
53
+ expect(@watir_driver).to receive(:div).and_return(@watir_driver)
54
54
  @watir_element.div_element
55
55
  end
56
56
 
57
57
  it "should find a nested span" do
58
- @watir_driver.should_receive(:span).and_return(@watir_driver)
58
+ expect(@watir_driver).to receive(:span).and_return(@watir_driver)
59
59
  @watir_element.span_element
60
60
  end
61
61
 
62
62
  it "should find a nested table" do
63
- @watir_driver.should_receive(:table).and_return(@watir_driver)
63
+ expect(@watir_driver).to receive(:table).and_return(@watir_driver)
64
64
  @watir_element.table_element
65
65
  end
66
66
 
67
67
  it "should find a nested cell" do
68
- @watir_driver.should_receive(:td).and_return(@watir_driver)
68
+ expect(@watir_driver).to receive(:td).and_return(@watir_driver)
69
69
  @watir_element.cell_element
70
70
  end
71
71
 
72
72
  it "should find a nested image" do
73
- @watir_driver.should_receive(:image).and_return(@watir_driver)
73
+ expect(@watir_driver).to receive(:image).and_return(@watir_driver)
74
74
  @watir_element.image_element
75
75
  end
76
76
 
77
77
  it "should find a nested form" do
78
- @watir_driver.should_receive(:form).and_return(@watir_driver)
78
+ expect(@watir_driver).to receive(:form).and_return(@watir_driver)
79
79
  @watir_element.form_element
80
80
  end
81
81
 
82
82
  it "should find a nested ordered list" do
83
- @watir_driver.should_receive(:ol).and_return(@watir_driver)
83
+ expect(@watir_driver).to receive(:ol).and_return(@watir_driver)
84
84
  @watir_element.ordered_list_element
85
85
  end
86
86
 
87
87
  it "should find a nested unordered list" do
88
- @watir_driver.should_receive(:ul).and_return(@watir_driver)
88
+ expect(@watir_driver).to receive(:ul).and_return(@watir_driver)
89
89
  @watir_element.unordered_list_element
90
90
  end
91
91
 
92
92
  it "should find a nested list item" do
93
- @watir_driver.should_receive(:li).and_return(@watir_driver)
93
+ expect(@watir_driver).to receive(:li).and_return(@watir_driver)
94
94
  @watir_element.list_item_element
95
95
  end
96
96
 
97
97
  it "should find a nested h1" do
98
- @watir_driver.should_receive(:h1).and_return(@watir_driver)
98
+ expect(@watir_driver).to receive(:h1).and_return(@watir_driver)
99
99
  @watir_element.h1_element
100
100
  end
101
101
 
102
102
  it "should find a nested h2" do
103
- @watir_driver.should_receive(:h2).and_return(@watir_driver)
103
+ expect(@watir_driver).to receive(:h2).and_return(@watir_driver)
104
104
  @watir_element.h2_element
105
105
  end
106
106
 
107
107
  it "should find a nested h3" do
108
- @watir_driver.should_receive(:h3).and_return(@watir_driver)
108
+ expect(@watir_driver).to receive(:h3).and_return(@watir_driver)
109
109
  @watir_element.h3_element
110
110
  end
111
111
 
112
112
  it "should find a nested h4" do
113
- @watir_driver.should_receive(:h4).and_return(@watir_driver)
113
+ expect(@watir_driver).to receive(:h4).and_return(@watir_driver)
114
114
  @watir_element.h4_element
115
115
  end
116
116
 
117
117
  it "should find a nested h5" do
118
- @watir_driver.should_receive(:h5).and_return(@watir_driver)
118
+ expect(@watir_driver).to receive(:h5).and_return(@watir_driver)
119
119
  @watir_element.h5_element
120
120
  end
121
121
 
122
122
  it "should find a nested h6" do
123
- @watir_driver.should_receive(:h6).and_return(@watir_driver)
123
+ expect(@watir_driver).to receive(:h6).and_return(@watir_driver)
124
124
  @watir_element.h6_element
125
125
  end
126
126
  end
@@ -132,122 +132,122 @@ describe "Element with nested elements" do
132
132
  end
133
133
 
134
134
  it "should find nested links" do
135
- @selenium_driver.should_receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
135
+ expect(@selenium_driver).to receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
136
136
  @selenium_element.link_element(:id => 'blah')
137
137
  end
138
138
 
139
139
  it "should find nested buttons" do
140
- @selenium_driver.should_receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
140
+ expect(@selenium_driver).to receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
141
141
  @selenium_element.button_element(:id => 'blah')
142
142
  end
143
143
 
144
144
  it "should find nested text fields" do
145
- @selenium_driver.should_receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
145
+ expect(@selenium_driver).to receive(:find_element).with(:id, 'blah').and_return(@selenium_driver)
146
146
  @selenium_element.text_field_element(:id => 'blah')
147
147
  end
148
148
 
149
149
  it "should find nested hidden fields" do
150
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
150
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
151
151
  @selenium_element.hidden_field_element
152
152
  end
153
153
 
154
154
  it "should find nested text areas" do
155
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
155
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
156
156
  @selenium_element.text_area_element
157
157
  end
158
158
 
159
159
  it "should find a nested select list" do
160
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
160
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
161
161
  @selenium_element.select_list_element
162
162
  end
163
163
 
164
164
  it "should find a nested checkbox" do
165
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
165
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
166
166
  @selenium_element.checkbox_element
167
167
  end
168
168
 
169
169
  it "should find a nested radio button" do
170
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
170
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
171
171
  @selenium_element.radio_button_element
172
172
  end
173
173
 
174
174
  it "should find a nested div" do
175
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
175
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
176
176
  @selenium_element.div_element
177
177
  end
178
178
 
179
179
  it "should find a nested span" do
180
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
180
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
181
181
  @selenium_element.span_element
182
182
  end
183
183
 
184
184
  it "should find a nested table" do
185
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
185
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
186
186
  @selenium_element.table_element
187
187
  end
188
188
 
189
189
  it "should find a nested cell" do
190
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
190
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
191
191
  @selenium_element.cell_element
192
192
  end
193
193
 
194
194
  it "should find a nested image" do
195
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
195
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
196
196
  @selenium_element.image_element
197
197
  end
198
198
 
199
199
  it "should find a nested form" do
200
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
200
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
201
201
  @selenium_element.form_element
202
202
  end
203
203
 
204
204
  it "should find an ordered list" do
205
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
205
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
206
206
  @selenium_element.ordered_list_element
207
207
  end
208
208
 
209
209
  it "should find an unordered list" do
210
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
210
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
211
211
  @selenium_element.unordered_list_element
212
212
  end
213
213
 
214
214
  it "should find a nested list item" do
215
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
215
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
216
216
  @selenium_element.list_item_element
217
217
  end
218
218
 
219
219
  it "should find a nested h1" do
220
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
220
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
221
221
  @selenium_element.h1_element
222
222
  end
223
223
 
224
224
  it "should find a nested h2" do
225
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
225
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
226
226
  @selenium_element.h2_element
227
227
  end
228
228
 
229
229
  it "should find a nested h3" do
230
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
230
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
231
231
  @selenium_element.h3_element
232
232
  end
233
233
 
234
234
  it "should find a nested h4" do
235
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
235
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
236
236
  @selenium_element.h4_element
237
237
  end
238
238
 
239
239
  it "should find a nested h5" do
240
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
240
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
241
241
  @selenium_element.h5_element
242
242
  end
243
243
 
244
244
  it "should find a nested h6" do
245
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
245
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
246
246
  @selenium_element.h6_element
247
247
  end
248
248
 
249
249
  it "should find a nested paragraph" do
250
- @selenium_driver.should_receive(:find_element).and_return(@selenium_driver)
250
+ expect(@selenium_driver).to receive(:find_element).and_return(@selenium_driver)
251
251
  @selenium_element.paragraph_element
252
252
  end
253
253
  end