druid-s 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.rspec +1 -0
  4. data/.rvmrc +1 -0
  5. data/.travis.yml +27 -0
  6. data/ChangeLog +541 -0
  7. data/Gemfile +8 -0
  8. data/README.md +78 -0
  9. data/Rakefile +33 -0
  10. data/cucumber.yml +6 -0
  11. data/druid.gemspec +30 -0
  12. data/features/area.feature +33 -0
  13. data/features/async.feature +16 -0
  14. data/features/audio.feature +61 -0
  15. data/features/bold.feature +20 -0
  16. data/features/button.feature +81 -0
  17. data/features/canvas.feature +34 -0
  18. data/features/checkbox.feature +48 -0
  19. data/features/div.feature +45 -0
  20. data/features/element.feature +281 -0
  21. data/features/file_field.feature +38 -0
  22. data/features/form.feature +37 -0
  23. data/features/frames.feature +76 -0
  24. data/features/generic_elements.feature +29 -0
  25. data/features/heading.feature +160 -0
  26. data/features/hidden_field.feature +39 -0
  27. data/features/html/async.html +31 -0
  28. data/features/html/frame_1.html +18 -0
  29. data/features/html/frame_2.html +16 -0
  30. data/features/html/frame_3.html +14 -0
  31. data/features/html/frames.html +12 -0
  32. data/features/html/hover.html +11 -0
  33. data/features/html/iframes.html +12 -0
  34. data/features/html/images/circle.png +0 -0
  35. data/features/html/images/img_pulpit.jpg +0 -0
  36. data/features/html/modal.html +17 -0
  37. data/features/html/modal_1.html +38 -0
  38. data/features/html/modal_2.html +27 -0
  39. data/features/html/multi_elements.html +145 -0
  40. data/features/html/nested_elements.html +75 -0
  41. data/features/html/nested_frame_1.html +1 -0
  42. data/features/html/nested_frame_2.html +11 -0
  43. data/features/html/nested_frame_3.html +14 -0
  44. data/features/html/nested_frames.html +10 -0
  45. data/features/html/planets.gif +0 -0
  46. data/features/html/static_elements.html +203 -0
  47. data/features/html/success.html +8 -0
  48. data/features/html/sun.gif +0 -0
  49. data/features/html/sun.html +7 -0
  50. data/features/image.feature +47 -0
  51. data/features/italic.feature +20 -0
  52. data/features/javascript.feature +28 -0
  53. data/features/label.feature +43 -0
  54. data/features/link.feature +56 -0
  55. data/features/list_item.feature +37 -0
  56. data/features/modal_dialog.feature +9 -0
  57. data/features/multi_elements.feature +498 -0
  58. data/features/nested_elements.feature +121 -0
  59. data/features/ordered_list.feature +46 -0
  60. data/features/page_level_actions.feature +116 -0
  61. data/features/paragraph.feature +33 -0
  62. data/features/populate_page_with.feature +25 -0
  63. data/features/radio_button.feature +51 -0
  64. data/features/radio_button_group.feature +28 -0
  65. data/features/sample-app/public/04-Death_Becomes_Fur.mp4 +0 -0
  66. data/features/sample-app/public/04-Death_Becomes_Fur.oga +0 -0
  67. data/features/sample-app/public/audio_video.html +19 -0
  68. data/features/sample-app/public/jquery-1.3.2.js +4376 -0
  69. data/features/sample-app/public/jquery.html +28 -0
  70. data/features/sample-app/public/movie.mp4 +0 -0
  71. data/features/sample-app/public/movie.ogg +0 -0
  72. data/features/sample-app/public/prototype-1.6.0.3.js +4320 -0
  73. data/features/sample-app/public/prototype.html +32 -0
  74. data/features/sample-app/sample_app.rb +35 -0
  75. data/features/section.feature +132 -0
  76. data/features/select_list.feature +84 -0
  77. data/features/span.feature +43 -0
  78. data/features/step_definations/area_steps.rb +23 -0
  79. data/features/step_definations/async_steps.rb +80 -0
  80. data/features/step_definations/audio_steps.rb +47 -0
  81. data/features/step_definations/bold_steps.rb +11 -0
  82. data/features/step_definations/button_steps.rb +52 -0
  83. data/features/step_definations/canvas_steps.rb +19 -0
  84. data/features/step_definations/checkbox_steps.rb +39 -0
  85. data/features/step_definations/div_steps.rb +28 -0
  86. data/features/step_definations/element_steps.rb +217 -0
  87. data/features/step_definations/file_field_steps.rb +31 -0
  88. data/features/step_definations/form_steps.rb +23 -0
  89. data/features/step_definations/frame_steps.rb +189 -0
  90. data/features/step_definations/generic_element_steps.rb +31 -0
  91. data/features/step_definations/heading_steps.rb +39 -0
  92. data/features/step_definations/hidden_field_steps.rb +27 -0
  93. data/features/step_definations/image_steps.rb +35 -0
  94. data/features/step_definations/italic_steps.rb +11 -0
  95. data/features/step_definations/javasript_steps.rb +52 -0
  96. data/features/step_definations/label_steps.rb +19 -0
  97. data/features/step_definations/link_steps.rb +42 -0
  98. data/features/step_definations/list_item_steps.rb +24 -0
  99. data/features/step_definations/modal_dialog_steps.rb +38 -0
  100. data/features/step_definations/multi_elements_steps.rb +557 -0
  101. data/features/step_definations/nested_elements_steps.rb +219 -0
  102. data/features/step_definations/ordered_list_steps.rb +49 -0
  103. data/features/step_definations/page_level_actions_steps.rb +172 -0
  104. data/features/step_definations/page_traversal_steps.rb +4 -0
  105. data/features/step_definations/paragraph_steps.rb +19 -0
  106. data/features/step_definations/populate_page_with_steps.rb +3 -0
  107. data/features/step_definations/radio_button_group_steps.rb +32 -0
  108. data/features/step_definations/radio_button_steps.rb +31 -0
  109. data/features/step_definations/section_steps.rb +271 -0
  110. data/features/step_definations/select_list_steps.rb +91 -0
  111. data/features/step_definations/span_steps.rb +23 -0
  112. data/features/step_definations/table_cell_steps.rb +27 -0
  113. data/features/step_definations/table_row_steps.rb +23 -0
  114. data/features/step_definations/table_steps.rb +109 -0
  115. data/features/step_definations/text_area_steps.rb +39 -0
  116. data/features/step_definations/text_field_steps.rb +39 -0
  117. data/features/step_definations/unordered_list_steps.rb +27 -0
  118. data/features/step_definations/video_steps.rb +27 -0
  119. data/features/support/ajax_test_environment.rb +26 -0
  120. data/features/support/audio_video_page.rb +23 -0
  121. data/features/support/env.rb +5 -0
  122. data/features/support/hooks.rb +3 -0
  123. data/features/support/page.rb +372 -0
  124. data/features/support/persistent_browser.rb +58 -0
  125. data/features/support/targets/firefox14_osx.rb +5 -0
  126. data/features/support/targets/firefox14_windows7.rb +5 -0
  127. data/features/support/url_helper.rb +50 -0
  128. data/features/table.feature +127 -0
  129. data/features/table_cell.feature +42 -0
  130. data/features/table_row.feature +30 -0
  131. data/features/text_area.feature +44 -0
  132. data/features/text_field.feature +53 -0
  133. data/features/unordered_list.feature +46 -0
  134. data/features/video.feature +66 -0
  135. data/lib/druid/accessors.rb +1082 -0
  136. data/lib/druid/assist.rb +653 -0
  137. data/lib/druid/element_locators.rb +21 -0
  138. data/lib/druid/elements/area.rb +9 -0
  139. data/lib/druid/elements/audio.rb +9 -0
  140. data/lib/druid/elements/bold.rb +8 -0
  141. data/lib/druid/elements/button.rb +12 -0
  142. data/lib/druid/elements/canvas.rb +9 -0
  143. data/lib/druid/elements/check_box.rb +9 -0
  144. data/lib/druid/elements/div.rb +9 -0
  145. data/lib/druid/elements/element.rb +187 -0
  146. data/lib/druid/elements/file_field.rb +9 -0
  147. data/lib/druid/elements/form.rb +9 -0
  148. data/lib/druid/elements/heading.rb +14 -0
  149. data/lib/druid/elements/hidden_field.rb +9 -0
  150. data/lib/druid/elements/image.rb +9 -0
  151. data/lib/druid/elements/italic.rb +9 -0
  152. data/lib/druid/elements/label.rb +8 -0
  153. data/lib/druid/elements/link.rb +9 -0
  154. data/lib/druid/elements/list_item.rb +9 -0
  155. data/lib/druid/elements/media.rb +11 -0
  156. data/lib/druid/elements/option.rb +9 -0
  157. data/lib/druid/elements/ordered_list.rb +29 -0
  158. data/lib/druid/elements/paragraph.rb +9 -0
  159. data/lib/druid/elements/radio_button.rb +9 -0
  160. data/lib/druid/elements/select_list.rb +30 -0
  161. data/lib/druid/elements/span.rb +9 -0
  162. data/lib/druid/elements/table.rb +92 -0
  163. data/lib/druid/elements/table_cell.rb +11 -0
  164. data/lib/druid/elements/table_row.rb +50 -0
  165. data/lib/druid/elements/text_area.rb +10 -0
  166. data/lib/druid/elements/text_field.rb +11 -0
  167. data/lib/druid/elements/unordered_list.rb +32 -0
  168. data/lib/druid/elements/video.rb +8 -0
  169. data/lib/druid/elements.rb +55 -0
  170. data/lib/druid/javascript/angularjs.rb +12 -0
  171. data/lib/druid/javascript/jquery.rb +12 -0
  172. data/lib/druid/javascript/prototype.rb +12 -0
  173. data/lib/druid/javascript/yui.rb +19 -0
  174. data/lib/druid/javascript_framework_facade.rb +76 -0
  175. data/lib/druid/locator_generator.rb +181 -0
  176. data/lib/druid/nested_elements.rb +56 -0
  177. data/lib/druid/page_factory.rb +115 -0
  178. data/lib/druid/page_populator.rb +104 -0
  179. data/lib/druid/section_collection.rb +17 -0
  180. data/lib/druid/version.rb +3 -0
  181. data/lib/druid.rb +452 -0
  182. data/spec/druid/accessors_spec.rb +1209 -0
  183. data/spec/druid/druid_spec.rb +295 -0
  184. data/spec/druid/element_locators_spec.rb +750 -0
  185. data/spec/druid/elements/bold_spec.rb +12 -0
  186. data/spec/druid/elements/button_spec.rb +23 -0
  187. data/spec/druid/elements/check_box_spec.rb +14 -0
  188. data/spec/druid/elements/div_spec.rb +10 -0
  189. data/spec/druid/elements/element_spec.rb +250 -0
  190. data/spec/druid/elements/file_field_spec.rb +13 -0
  191. data/spec/druid/elements/form_spec.rb +18 -0
  192. data/spec/druid/elements/heading_spec.rb +30 -0
  193. data/spec/druid/elements/hidden_field_spec.rb +10 -0
  194. data/spec/druid/elements/image_spec.rb +23 -0
  195. data/spec/druid/elements/itatic_spec.rb +11 -0
  196. data/spec/druid/elements/label_spec.rb +10 -0
  197. data/spec/druid/elements/link_spec.rb +10 -0
  198. data/spec/druid/elements/list_item_spec.rb +10 -0
  199. data/spec/druid/elements/media_spec.rb +12 -0
  200. data/spec/druid/elements/option_spec.rb +21 -0
  201. data/spec/druid/elements/ordered_list_spec.rb +38 -0
  202. data/spec/druid/elements/page_factory_spec.rb +40 -0
  203. data/spec/druid/elements/paragraph_spec.rb +12 -0
  204. data/spec/druid/elements/radio_button_spec.rb +14 -0
  205. data/spec/druid/elements/select_list_spec.rb +51 -0
  206. data/spec/druid/elements/span_spec.rb +10 -0
  207. data/spec/druid/elements/table_cell_spec.rb +14 -0
  208. data/spec/druid/elements/table_row_spec.rb +34 -0
  209. data/spec/druid/elements/table_spec.rb +47 -0
  210. data/spec/druid/elements/text_area_spec.rb +13 -0
  211. data/spec/druid/elements/text_field_spec.rb +22 -0
  212. data/spec/druid/elements/unordered_list_spec.rb +39 -0
  213. data/spec/druid/javascript_framework_facade_spec.rb +59 -0
  214. data/spec/druid/nested_element_spec.rb +128 -0
  215. data/spec/druid/page_factory_spec.rb +235 -0
  216. data/spec/druid/page_populator_spec.rb +173 -0
  217. data/spec/druid/page_section_spec.rb +70 -0
  218. data/spec/spec_helper.rb +9 -0
  219. metadata +517 -0
data/Rakefile ADDED
@@ -0,0 +1,33 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'rspec/core/rake_task'
4
+ require 'cucumber'
5
+ require 'cucumber/rake/task'
6
+
7
+ RSpec::Core::RakeTask.new(:spec) do |spec|
8
+ spec.ruby_opts = "-I lib:spec"
9
+ spec.pattern = 'spec/**/*_spec.rb'
10
+ end
11
+
12
+ namespace :spec do
13
+ RSpec::Core::RakeTask.new(:html) do |spec|
14
+ spec.ruby_opts = "-I lib:spec"
15
+ spec.pattern = 'spec/**/*_spec.rb'
16
+ spec.rspec_opts = "--format html --out #{ENV["SPEC_REPORT"] || "specs.html"}"
17
+ end
18
+ end
19
+
20
+ task :spec
21
+
22
+ task :lib do
23
+ $LOAD_PATH.unshift(File.expand_xpath("lib", File.dirname(__FILE__)))
24
+ end
25
+
26
+ task :default => :spec
27
+
28
+
29
+ namespace :features do
30
+ Cucumber::Rake::Task.new(:watir, "Run features with Watir webdriver") do |t|
31
+ t.profile = "watir"
32
+ end
33
+ end
data/cucumber.yml ADDED
@@ -0,0 +1,6 @@
1
+ <%
2
+ std_opts = "--no-source --color --format pretty"
3
+ %>
4
+
5
+ default: DRIVER=WATIR <%= std_opts %>
6
+ watir: DRIVER=WATIR <%= std_opts %>
data/druid.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "druid/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "druid-s"
7
+ s.platform = Gem::Platform::RUBY
8
+ s.version = Druid::VERSION
9
+ s.date = '2024-01-16'
10
+ s.authors = ["Amber Yuan"]
11
+ s.homepage = "https://github.com/amber-yuan/druid-s"
12
+ s.summary = %q{Druid DSL for browser testing}
13
+ s.description = %q{Druid DSL that works with Watir}
14
+ s.license = 'MIT'
15
+ s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(pkg|spec|features|coverage)/})}
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f)}
19
+ s.require_paths = ["lib"]
20
+ s.add_dependency "watir", "~> 7.3.0"
21
+
22
+ s.add_development_dependency "rspec", "~> 3.10"
23
+ s.add_development_dependency "cucumber", "~> 9.0"
24
+ s.add_development_dependency "net-http-persistent", "~> 4.0"
25
+ s.add_development_dependency 'rack', '~> 3.0'
26
+ s.add_development_dependency 'rackup', '~> 2.1'
27
+
28
+ s.add_runtime_dependency 'page_navigation', '~> 0.10'
29
+
30
+ end
@@ -0,0 +1,33 @@
1
+ Feature: Area
2
+
3
+ Background:
4
+ Given I am on the static elements page
5
+
6
+ Scenario: Retrieve an area element
7
+ When I retrieve the area element
8
+ Then I should know it exists
9
+ And I should know it is visible
10
+
11
+ Scenario Outline: Locating areas on the page
12
+ When I search for the area by "<search_by>"
13
+ Then I should be able to click the area
14
+
15
+ Examples:
16
+ | search_by |
17
+ | id |
18
+ | class |
19
+ | xpath |
20
+ | index |
21
+ | css |
22
+
23
+ Scenario: Getting the coordinates for the area
24
+ When I retrieve the area element
25
+ Then I should see the coordinates are "0,0,82,126"
26
+
27
+ Scenario: Getting the shape for the area
28
+ When I retrieve the area element
29
+ Then I should see the shape are "rect"
30
+
31
+ Scenario: Getting the href from the area
32
+ When I retrieve the area element
33
+ Then I should see the href is "sun.html"
@@ -0,0 +1,16 @@
1
+ Feature: Handling Asynch calls
2
+
3
+ Background:
4
+ Given I am on the async elements page
5
+
6
+ Scenario: Click a button when it is visible
7
+ When I make the button invisible
8
+ Then I should be able to click it when it becomes visible
9
+
10
+ Scenario: Wait until something is not visible
11
+ Then I should be able to wait until the button becomes invisible
12
+
13
+ Scenario: Wait for an element to disappear from the page
14
+ When I add a button a few seconds from now
15
+ And I remove a button a few seconds from now
16
+ Then I should not be able to find the button
@@ -0,0 +1,61 @@
1
+ Feature: Support for the audio element
2
+
3
+ Background:
4
+ Given I am on the audio video page
5
+
6
+ Scenario: Finding an audio element
7
+ When I retrieve the audio element from the page
8
+ Then I should know it exists
9
+ And I should know it is visible
10
+
11
+ Scenario Outline: Locating an audio element on the page
12
+ When I search for the audio element by "<search_by>"
13
+ Then I should know it is visible
14
+
15
+ Examples:
16
+ | search_by |
17
+ | id |
18
+ | class |
19
+ | xpath |
20
+ | index |
21
+ | css |
22
+
23
+ Scenario Outline: Locating audios using multiple parameters
24
+ When I search for the audio element by "<param1>" and "<param2>"
25
+ Then I should know it is visible
26
+
27
+ Examples:
28
+ | param1 | param2 |
29
+ | class | index |
30
+
31
+ Scenario: Should know if it is autoplay
32
+ When I retrieve the audio element from the page
33
+ Then I should know the audio is not autoplay
34
+
35
+ Scenario: Should know if the controls are displayed
36
+ When I retrieve the audio element from the page
37
+ Then I should know that the controls are displayed
38
+
39
+ Scenario: Should know if it is paused
40
+ When I retrieve the audio element from the page
41
+ Then I should know that the audio is paused
42
+
43
+ Scenario: Should know its volume
44
+ When I retrieve the audio element from the page
45
+ Then I should know that its volume is 1
46
+
47
+ Scenario: Should know if it has ended
48
+ When I retrieve the audio element from the page
49
+ Then I should know that it has not ended
50
+
51
+ Scenario: Should know if it is seeking
52
+ When I retrieve the audio element from the page
53
+ Then I should know that it is not seeking
54
+
55
+ Scenario: Should know if it is in a loop
56
+ When I retrieve the audio element from the page
57
+ Then I should know that it is not in a loop
58
+
59
+ Scenario: Should know if it is muted
60
+ When I retrieve the audio element from the page
61
+ Then I should know that it is muted
@@ -0,0 +1,20 @@
1
+ Feature: Bold
2
+
3
+ Background:
4
+ Given I am on the static elements page
5
+
6
+ Scenario: Getting the text of headings
7
+ When I get the bold text for the "b" element
8
+ Then I should see "some text in bold" in bold
9
+
10
+ Scenario Outline: Locating b on the page
11
+ When I search bold text for the b by "<search_by>"
12
+ Then I should see "some text in bold" in bold
13
+
14
+ Examples:
15
+ | search_by |
16
+ | id |
17
+ | class |
18
+ | xpath |
19
+ | index |
20
+ | css |
@@ -0,0 +1,81 @@
1
+ Feature: Button
2
+ In order to interact with buttons
3
+ Testers will need access and interrogation ability
4
+
5
+ Background:
6
+ Given I am on the static elements page
7
+
8
+ Scenario: Clicking a button (type=submit)
9
+ When I click the button
10
+ Then I should be on the success page
11
+
12
+ Scenario: Clicking a button (type=image)
13
+ When I click the button with type image
14
+ Then I should be on the success page
15
+
16
+ Scenario: Clicking an image button by src
17
+ When I click the image button using src
18
+ Then I should be on the success page
19
+
20
+ Scenario: Clicking an image button by alt
21
+ When I click the image button using alt
22
+ Then I should be on the success page
23
+
24
+ @name
25
+ Scenario Outline: Locating buttons on the page
26
+ When I locate the button by "<locate_by>"
27
+ Then I should be able to click the button
28
+
29
+ Examples:
30
+ | locate_by |
31
+ | id |
32
+ | class |
33
+ | name |
34
+ | xpath |
35
+ | index |
36
+ | text |
37
+ | value |
38
+ | css |
39
+
40
+ Scenario Outline: Locating real buttons on the page
41
+ When I locate the button by "<locate_by>"
42
+ Then I should be able to click the real button
43
+
44
+ Examples:
45
+ | locate_by |
46
+ | id |
47
+ | class |
48
+ | name |
49
+ | index |
50
+ | value |
51
+
52
+ Scenario: Retrieve a button element
53
+ When I retrieve a button element
54
+ Then I should know it exists
55
+ And I should know it is visible
56
+
57
+ @multi
58
+ Scenario Outline: Locating button using multiple parameters
59
+ When I search for the button by "<param1>" and "<param2>"
60
+ Then I should be able to click the button
61
+
62
+ Examples:
63
+ | param1 | param2 |
64
+ | class | index |
65
+ | name | index |
66
+
67
+ @multi
68
+ Scenario Outline: Locating real button using multiple parameters
69
+ When I search for the button by "<param1>" and "<param2>"
70
+ Then I should be able to click the real button
71
+
72
+ Examples:
73
+ | param1 | param2 |
74
+ | class | index |
75
+ | name | index |
76
+
77
+ @locator
78
+ Scenario: Finding a button dynamically
79
+ When I find a button while the script is executing
80
+ Then I should see that the button exists
81
+ And I should be able to click the button element
@@ -0,0 +1,34 @@
1
+ Feature: Support for the canvas element
2
+
3
+ Background:
4
+ Given I am on the static elements page
5
+
6
+ Scenario: Retrieve a canvas element
7
+ When I retrieve the canvas element
8
+ Then I should know it exists
9
+ And I should know it is visible
10
+
11
+ Scenario Outline: Locating a canvas on the page
12
+ When I search for the canvas by "<search_by>"
13
+ Then I should know it is visible
14
+
15
+ Examples:
16
+ | search_by |
17
+ | id |
18
+ | class |
19
+ | xpath |
20
+ | index |
21
+ | css |
22
+
23
+ Scenario: Determining the width and height of the canvas
24
+ When I retrieve the canvas element
25
+ Then I should see that the canvas width is "200"
26
+ And I should see that the canvas height is "100"
27
+
28
+ Scenario Outline: Locating canvases using multiple parameters
29
+ When I search for the canvas element by "<param1>" and "<param2>"
30
+ Then I should know it is visible
31
+
32
+ Examples:
33
+ | param1 | param2 |
34
+ | class | index |
@@ -0,0 +1,48 @@
1
+ Feature: Check Box
2
+ In order to interact with check boxes
3
+ Testers will need access and interrogation ability
4
+
5
+ Background:
6
+ Given I am on the static elements page
7
+
8
+ Scenario: Selecting a checkbox
9
+ When I select the First check box
10
+ Then the First check box should be selected
11
+ When I unselect the First check box
12
+ Then the First check box should not be selected
13
+
14
+ Scenario Outline: Locating check boxes on the page
15
+ When I locate the check box by "<locate_by>"
16
+ Then I should be able to check the check box
17
+
18
+ Examples:
19
+ | locate_by |
20
+ | id |
21
+ | class |
22
+ | name |
23
+ | xpath |
24
+ | index |
25
+ | value |
26
+ | label |
27
+ | css |
28
+
29
+ Scenario: Retrieve a CheckBox
30
+ When I retrieve a check box element
31
+ Then I should know it exists
32
+ And I should know it is visible
33
+
34
+ @multi
35
+ Scenario Outline: Locating check boxes using multiple paramters
36
+ When I search for the check box by "<param1>" and "<param2>"
37
+ Then I should be able to check the check box
38
+
39
+ Examples:
40
+ | param1 | param2 |
41
+ | class | index |
42
+ | name | index |
43
+
44
+ @locator
45
+ Scenario: Finding a check box dynamically
46
+ When I select the first check box while the script is executing
47
+ Then I should see that the checkbox exists
48
+ And the First check box should be selected
@@ -0,0 +1,45 @@
1
+ Feature: Div
2
+ In order to interact with divs
3
+ Testers will need access and interrogation ability
4
+
5
+ Background:
6
+ Given I am on the static elements page
7
+
8
+ Scenario: Getting the text from a div
9
+ When I get the text from the div
10
+ Then the text should be "page-object rocks!"
11
+
12
+ @name
13
+ Scenario Outline: Locating divs on the page
14
+ When I locate the div by "<locate_by>"
15
+ Then the text should be "page-object rocks!"
16
+
17
+ Examples:
18
+ | locate_by |
19
+ | id |
20
+ | class |
21
+ | xpath |
22
+ | index |
23
+ | text |
24
+ | title |
25
+ | css |
26
+
27
+ Scenario: Getting the div element
28
+ When I retrieve the div element
29
+ Then I should know it exists
30
+ And I should know it is visible
31
+
32
+ @multi
33
+ Scenario Outline: locating divs using multiple parameters
34
+ When I search for the div by "<param1>" and "<param2>"
35
+ Then the text should be "page-object rocks!"
36
+
37
+ Examples:
38
+ | param1 | param2 |
39
+ | class | index |
40
+
41
+ @locator
42
+ Scenario: Finding a div dynamically
43
+ When I get the text from a div while the script is executing
44
+ Then I should see that the div exists
45
+ And the text should be "page-object rocks!"