page-object 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +22 -12
  3. data/ChangeLog +10 -0
  4. data/Gemfile +4 -2
  5. data/Guardfile +1 -1
  6. data/README.md +2 -2
  7. data/lib/page-object/accessors.rb +57 -35
  8. data/lib/page-object/elements/element.rb +26 -0
  9. data/lib/page-object/locator_generator.rb +46 -0
  10. data/lib/page-object/platforms/selenium_webdriver/element.rb +6 -6
  11. data/lib/page-object/platforms/selenium_webdriver/page_object.rb +14 -0
  12. data/lib/page-object/platforms/watir_webdriver/element.rb +0 -7
  13. data/lib/page-object/platforms/watir_webdriver/page_object.rb +16 -3
  14. data/lib/page-object/version.rb +1 -1
  15. data/page-object.gemspec +7 -10
  16. metadata +34 -375
  17. data/features/area.feature +0 -35
  18. data/features/async.feature +0 -21
  19. data/features/audio.feature +0 -64
  20. data/features/bold.feature +0 -21
  21. data/features/button.feature +0 -98
  22. data/features/canvas.feature +0 -37
  23. data/features/check_box.feature +0 -55
  24. data/features/div.feature +0 -45
  25. data/features/element.feature +0 -343
  26. data/features/file_field.feature +0 -40
  27. data/features/form.feature +0 -43
  28. data/features/frames.feature +0 -75
  29. data/features/generic_elements.feature +0 -29
  30. data/features/gxt_table_extension.feature +0 -23
  31. data/features/headings.feature +0 -97
  32. data/features/hidden_field.feature +0 -45
  33. data/features/html/04-Death_Becomes_Fur.mp4 +0 -0
  34. data/features/html/04-Death_Becomes_Fur.oga +0 -0
  35. data/features/html/async.html +0 -36
  36. data/features/html/double_click.html +0 -13
  37. data/features/html/failure.html +0 -8
  38. data/features/html/frame_1.html +0 -18
  39. data/features/html/frame_2.html +0 -16
  40. data/features/html/frame_3.html +0 -14
  41. data/features/html/frames.html +0 -12
  42. data/features/html/hover.html +0 -12
  43. data/features/html/iframes.html +0 -12
  44. data/features/html/images/circle.png +0 -0
  45. data/features/html/images/img_pulpit.jpg +0 -0
  46. data/features/html/images/submit.gif +0 -0
  47. data/features/html/indexed_property.html +0 -55
  48. data/features/html/modal.html +0 -17
  49. data/features/html/modal_1.html +0 -38
  50. data/features/html/modal_2.html +0 -27
  51. data/features/html/movie.mp4 +0 -0
  52. data/features/html/movie.ogg +0 -0
  53. data/features/html/multi_elements.html +0 -145
  54. data/features/html/nested_elements.html +0 -77
  55. data/features/html/nested_frame_1.html +0 -1
  56. data/features/html/nested_frame_2.html +0 -11
  57. data/features/html/nested_frame_3.html +0 -14
  58. data/features/html/nested_frames.html +0 -10
  59. data/features/html/planets.gif +0 -0
  60. data/features/html/static_elements.html +0 -194
  61. data/features/html/success.html +0 -8
  62. data/features/html/sun.gif +0 -0
  63. data/features/html/sun.html +0 -7
  64. data/features/html/widgets.html +0 -20
  65. data/features/image.feature +0 -50
  66. data/features/indexed_property.feature +0 -117
  67. data/features/italic.feature +0 -21
  68. data/features/javascript.feature +0 -28
  69. data/features/label.feature +0 -46
  70. data/features/link.feature +0 -52
  71. data/features/list_item.feature +0 -36
  72. data/features/modal_dialog.feature +0 -15
  73. data/features/multi_elements.feature +0 -498
  74. data/features/nested_elements.feature +0 -117
  75. data/features/ordered_list.feature +0 -56
  76. data/features/page_level_actions.feature +0 -90
  77. data/features/paragraph.feature +0 -35
  78. data/features/radio_button.feature +0 -58
  79. data/features/radio_button_group.feature +0 -29
  80. data/features/sample-app/public/audio_video.html +0 -23
  81. data/features/sample-app/public/jquery-1.3.2.js +0 -4376
  82. data/features/sample-app/public/jquery.html +0 -30
  83. data/features/sample-app/public/prototype-1.6.0.3.js +0 -4320
  84. data/features/sample-app/public/prototype.html +0 -35
  85. data/features/sample-app/sample_app.rb +0 -35
  86. data/features/section.feature +0 -136
  87. data/features/select_list.feature +0 -86
  88. data/features/span.feature +0 -37
  89. data/features/step_definitions/accessor_steps.rb +0 -64
  90. data/features/step_definitions/area_steps.rb +0 -19
  91. data/features/step_definitions/async_steps.rb +0 -83
  92. data/features/step_definitions/audio_steps.rb +0 -27
  93. data/features/step_definitions/bold_steps.rb +0 -12
  94. data/features/step_definitions/button_steps.rb +0 -48
  95. data/features/step_definitions/canvas_steps.rb +0 -15
  96. data/features/step_definitions/check_box_steps.rb +0 -35
  97. data/features/step_definitions/div_steps.rb +0 -19
  98. data/features/step_definitions/element_steps.rb +0 -294
  99. data/features/step_definitions/file_field_steps.rb +0 -19
  100. data/features/step_definitions/form_steps.rb +0 -19
  101. data/features/step_definitions/frames_steps.rb +0 -159
  102. data/features/step_definitions/generic_element_steps.rb +0 -31
  103. data/features/step_definitions/gxt_table_steps.rb +0 -53
  104. data/features/step_definitions/headings_steps.rb +0 -12
  105. data/features/step_definitions/hidden_field_steps.rb +0 -27
  106. data/features/step_definitions/image_steps.rb +0 -27
  107. data/features/step_definitions/indexed_property_steps.rb +0 -163
  108. data/features/step_definitions/italic_steps.rb +0 -12
  109. data/features/step_definitions/javascript_steps.rb +0 -53
  110. data/features/step_definitions/label_steps.rb +0 -19
  111. data/features/step_definitions/link_steps.rb +0 -40
  112. data/features/step_definitions/list_item_steps.rb +0 -19
  113. data/features/step_definitions/modal_dialog_steps.rb +0 -62
  114. data/features/step_definitions/multi_elements_steps.rb +0 -554
  115. data/features/step_definitions/nested_elements_steps.rb +0 -212
  116. data/features/step_definitions/ordered_list_steps.rb +0 -23
  117. data/features/step_definitions/page_level_actions_steps.rb +0 -135
  118. data/features/step_definitions/page_traversal_steps.rb +0 -8
  119. data/features/step_definitions/paragraph_steps.rb +0 -28
  120. data/features/step_definitions/radio_button_group_steps.rb +0 -36
  121. data/features/step_definitions/radio_button_steps.rb +0 -27
  122. data/features/step_definitions/section_steps.rb +0 -277
  123. data/features/step_definitions/select_list_steps.rb +0 -65
  124. data/features/step_definitions/span_steps.rb +0 -19
  125. data/features/step_definitions/table_cell_steps.rb +0 -15
  126. data/features/step_definitions/table_row_steps.rb +0 -23
  127. data/features/step_definitions/table_steps.rb +0 -70
  128. data/features/step_definitions/text_area_steps.rb +0 -35
  129. data/features/step_definitions/text_field_steps.rb +0 -35
  130. data/features/step_definitions/unordered_list_steps.rb +0 -23
  131. data/features/step_definitions/video_steps.rb +0 -45
  132. data/features/support/ajax_text_environment.rb +0 -26
  133. data/features/support/audio_video_page.rb +0 -24
  134. data/features/support/env.rb +0 -8
  135. data/features/support/hooks.rb +0 -8
  136. data/features/support/page.rb +0 -373
  137. data/features/support/persistent_browser.rb +0 -70
  138. data/features/support/targets/firefox14_osx.rb +0 -6
  139. data/features/support/targets/firefox14_windows7.rb +0 -6
  140. data/features/support/url_helper.rb +0 -61
  141. data/features/table.feature +0 -122
  142. data/features/table_cell.feature +0 -45
  143. data/features/table_row.feature +0 -43
  144. data/features/text_area.feature +0 -51
  145. data/features/text_field.feature +0 -70
  146. data/features/unordered_list.feature +0 -56
  147. data/features/video.feature +0 -69
  148. data/spec/page-object/accessors_spec.rb +0 -40
  149. data/spec/page-object/element_locators_spec.rb +0 -1144
  150. data/spec/page-object/elements/area_spec.rb +0 -45
  151. data/spec/page-object/elements/bold_spec.rb +0 -29
  152. data/spec/page-object/elements/button_spec.rb +0 -64
  153. data/spec/page-object/elements/canvas_spec.rb +0 -41
  154. data/spec/page-object/elements/check_box_spec.rb +0 -49
  155. data/spec/page-object/elements/div_spec.rb +0 -28
  156. data/spec/page-object/elements/element_spec.rb +0 -196
  157. data/spec/page-object/elements/file_field_spec.rb +0 -39
  158. data/spec/page-object/elements/form_spec.rb +0 -28
  159. data/spec/page-object/elements/heading_spec.rb +0 -48
  160. data/spec/page-object/elements/hidden_field_spec.rb +0 -28
  161. data/spec/page-object/elements/image_spec.rb +0 -66
  162. data/spec/page-object/elements/italic_spec.rb +0 -29
  163. data/spec/page-object/elements/label_spec.rb +0 -29
  164. data/spec/page-object/elements/link_spec.rb +0 -49
  165. data/spec/page-object/elements/list_item_spec.rb +0 -29
  166. data/spec/page-object/elements/media_spec.rb +0 -63
  167. data/spec/page-object/elements/nested_element_spec.rb +0 -254
  168. data/spec/page-object/elements/option_spec.rb +0 -11
  169. data/spec/page-object/elements/ordered_list_spec.rb +0 -78
  170. data/spec/page-object/elements/paragraph_spec.rb +0 -27
  171. data/spec/page-object/elements/select_list_spec.rb +0 -142
  172. data/spec/page-object/elements/selenium/radio_button_spec.rb +0 -44
  173. data/spec/page-object/elements/selenium/text_field_spec.rb +0 -49
  174. data/spec/page-object/elements/selenium_element_spec.rb +0 -218
  175. data/spec/page-object/elements/span_spec.rb +0 -26
  176. data/spec/page-object/elements/table_cell_spec.rb +0 -21
  177. data/spec/page-object/elements/table_row_spec.rb +0 -70
  178. data/spec/page-object/elements/table_spec.rb +0 -98
  179. data/spec/page-object/elements/text_area_spec.rb +0 -39
  180. data/spec/page-object/elements/unordered_list_spec.rb +0 -77
  181. data/spec/page-object/elements/video_spec.rb +0 -33
  182. data/spec/page-object/elements/watir_element_spec.rb +0 -193
  183. data/spec/page-object/javascript_framework_facade_spec.rb +0 -61
  184. data/spec/page-object/loads_platform_spec.rb +0 -53
  185. data/spec/page-object/page-object_spec.rb +0 -435
  186. data/spec/page-object/page_factory_spec.rb +0 -238
  187. data/spec/page-object/page_populator_spec.rb +0 -122
  188. data/spec/page-object/page_section_spec.rb +0 -80
  189. data/spec/page-object/platforms/selenium_webdriver/selenium_page_object_spec.rb +0 -68
  190. data/spec/page-object/platforms/selenium_webdriver_spec.rb +0 -29
  191. data/spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb +0 -29
  192. data/spec/page-object/platforms/watir_webdriver_spec.rb +0 -9
  193. data/spec/page-object/selenium_accessors_spec.rb +0 -628
  194. data/spec/page-object/watir_accessors_spec.rb +0 -1191
  195. data/spec/page-object/widget_spec.rb +0 -226
  196. data/spec/spec_helper.rb +0 -43
@@ -1,35 +0,0 @@
1
- When /^I type "([^\"]*)" into the text area$/ do |text|
2
- @page.text_area_id = text
3
- end
4
-
5
- Then /^the text area should contain "([^\"]*)"$/ do |expected_text|
6
- @page.text_area_id.should == expected_text
7
- end
8
-
9
- When /^I search for the text area by "([^\"]*)"$/ do |how|
10
- @how = how
11
- end
12
-
13
- When /^I search for the text area by "([^"]*)" and "([^"]*)"$/ do |param1, param2|
14
- @how = "#{param1}_#{param2}"
15
- end
16
-
17
- Then /^I should be able to type "([^\"]*)" into the area$/ do |value|
18
- @page.send "text_area_#{@how}=".to_sym, value
19
- end
20
-
21
- When /^I find a text area while the script is executing$/ do
22
- @text_area = @page.text_area_element(:id => 'text_area_id')
23
- end
24
-
25
- Then /^I should be able to type "([^"]*)" into the area element$/ do |value|
26
- @text_area.value = value
27
- end
28
-
29
- When /^I clear the text area$/ do
30
- @page.text_area_id_element.clear
31
- end
32
-
33
- Then /^I should see that the text area exists$/ do
34
- @page.text_area_id?.should == true
35
- end
@@ -1,35 +0,0 @@
1
- When /^I type "([^\"]*)" into the text field$/ do |text|
2
- @page.text_field_id = text
3
- end
4
-
5
- Then /^the text field should contain "([^\"]*)"$/ do |expected_text|
6
- @page.text_field_id.should == expected_text
7
- end
8
-
9
- When /^I search for the text field by "([^\"]*)"$/ do |how|
10
- @how = how
11
- end
12
-
13
- When /^I search for the text field by "([^"]*)" and "([^"]*)"$/ do |param1, param2|
14
- @how = "#{param1}_#{param2}"
15
- end
16
-
17
- Then /^I should be able to type "([^\"]*)" into the field$/ do |value|
18
- @page.send "text_field_#{@how}=".to_sym, value
19
- end
20
-
21
- When /^I find a text field while the script is executing$/ do
22
- @text_field = @page.text_field_element(:id => 'text_field_id')
23
- end
24
-
25
- Then /^I should be able to type "([^\"]*)" into the field element$/ do |value|
26
- @text_field.value = value
27
- end
28
-
29
- Then /^I should see that the text field exists$/ do
30
- @page.text_field_id?.should == true
31
- end
32
-
33
- When /^I append "([^\"]*)" to the text field$/ do |text|
34
- @page.text_field_id_element.append text
35
- end
@@ -1,23 +0,0 @@
1
- When /^I get the first item from the unordered list$/ do
2
- @element = @page.ul_id_element[0]
3
- end
4
-
5
- When /^I search for the unordered list by "([^\"]*)"$/ do |how|
6
- @list = @page.send "ul_#{how}_element"
7
- end
8
-
9
- When /^I search for the unordered list by "([^"]*)" and "([^"]*)"$/ do |param1, param2|
10
- @list = @page.send "ul_#{param1}_#{param2}_element"
11
- end
12
-
13
- When /^I search for the unordered list while the script is executing$/ do
14
- @list = @page.unordered_list_element(:id => 'ul_id')
15
- end
16
-
17
- Then /^I should see that the unordered list exists$/ do
18
- @page.ul_id?.should == true
19
- end
20
-
21
- Then /^the text for the unordered list should contain "(.*)"$/ do |text|
22
- @page.send("ul_id").should include text
23
- end
@@ -1,45 +0,0 @@
1
-
2
- When /^I retrieve the video element$/ do
3
- @element = @avpage.video_id_element
4
- end
5
-
6
- When /^I search for the video element by "([^\"]*)"$/ do |how|
7
- @element = @avpage.send "video_#{how}_element"
8
- end
9
-
10
- When /^I search for the video element by "([^\"]*)" and "([^\"]*)"$/ do |param1, param2|
11
- @element = @avpage.send "video_#{param1}_#{param2}_element"
12
- end
13
-
14
- Then /^I should know the video is not autoplay$/ do
15
- @element.should_not be_autoplay
16
- end
17
-
18
- Then /^I should know that the video is paused$/ do
19
- @element.should be_paused
20
- end
21
-
22
- Then /^I should know that its height is (\d+) pixels$/ do |height|
23
- @element.height.should == height.to_i
24
- end
25
-
26
- Then /^I should knot what its width is (\d+) pixels$/ do |width|
27
- @element.width.should == width.to_i
28
- end
29
-
30
- Then /^I should know that it has not ended$/ do
31
- @element.should_not be_ended
32
- end
33
-
34
- Then /^I should know that it is not seeking$/ do
35
- @element.should_not be_seeking
36
- end
37
-
38
- Then /^I should know that it is not in a loop$/ do
39
- @element.should_not be_loop
40
- end
41
-
42
- Then /^I should know that it is muted$/ do
43
- @element.should_not be_muted
44
- end
45
-
@@ -1,26 +0,0 @@
1
- require File.dirname(__FILE__) + "/../sample-app/sample_app"
2
-
3
- class AjaxTestEnvironment
4
- def run
5
- Thread.abort_on_exception = true
6
- @example_app = Thread.new { SampleApp.start("127.0.0.1", 4567) }
7
- poller = Selenium::WebDriver::SocketPoller.new("127.0.0.1", 4567, 60)
8
- unless poller.connected?
9
- raise "timed out waiting for SampleApp to launch"
10
- end
11
-
12
- self
13
- end
14
-
15
- def stop
16
- @example_app.kill
17
- end
18
-
19
- end
20
-
21
- @server = AjaxTestEnvironment.new
22
- @server.run
23
-
24
- at_exit do
25
- @server.stop
26
- end
@@ -1,24 +0,0 @@
1
- class AudioVideoPage
2
- include PageObject
3
-
4
- page_url "http://localhost:4567/audio_video.html"
5
-
6
- audio(:audio_id, :id => 'audio')
7
- audio(:audio_name, :name => 'audio')
8
- audio(:audio_class, :class => 'audio')
9
- audio(:audio_css, :css => '.audio')
10
- audio(:audio_index, :index => 0)
11
- audio(:audio_xpath, :xpath => '//audio')
12
- audio(:audio_class_index, :class => 'audio', :index => 0)
13
- audio(:audio_name_index, :name => 'audio', :index => 0)
14
-
15
- video(:video_id, :id => 'video')
16
- video(:video_name, :name => 'video')
17
- video(:video_class, :class => 'video')
18
- video(:video_css, :css => '.video')
19
- video(:video_index, :index => 0)
20
- video(:video_xpath, :xpath => '//video')
21
- video(:video_class_index, :class => 'video', :index => 0)
22
- video(:video_name_index, :name => 'video', :index => 0)
23
-
24
- end
@@ -1,8 +0,0 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../../', 'lib'))
2
-
3
- require 'rspec'
4
- require 'watir-webdriver'
5
- require 'selenium-webdriver'
6
- require 'page-object'
7
-
8
- World(PageObject::PageFactory)
@@ -1,8 +0,0 @@
1
-
2
- Before do
3
- @browser = PageObject::PersistantBrowser.get_browser
4
- end
5
-
6
- at_exit do
7
- PageObject::PersistantBrowser.quit
8
- end
@@ -1,373 +0,0 @@
1
- class Page
2
- include PageObject
3
-
4
- expected_title "Static Elements Page"
5
- expected_element :hello0
6
-
7
- link(:hello0, {:text => "Hello", :index => 0})
8
- link(:hello1, {:text => "Hello", :index => 1})
9
- link(:hello2, {:text => "Hello", :index => 2})
10
-
11
- text_field(:text_field_id, :id => "text_field_id")
12
- text_field(:text_field_class, :class => "text_field_class")
13
- text_field(:text_field_name, :name => "text_field_name")
14
- text_field(:text_field_xpath, :xpath => "//input[@type='text']")
15
- text_field(:text_field_css, :css => "input[type='text']")
16
- text_field(:text_field_tag_name, :tag_name => "input[type='text']")
17
- text_field(:text_field_index, :index => 0)
18
- text_field(:text_field_text, :text => "")
19
- text_field(:text_field_value, :value => "")
20
- text_field(:text_field_label, :label => "Text Field")
21
- text_field(:text_field_title, :title => 'text_field_title')
22
- text_field(:text_field_data_field, :data_field => 'title')
23
- text_field(:text_field_class_index, :class => "text_field_class", :index => 0)
24
- text_field(:text_field_name_index, :name => "text_field_name", :index => 0)
25
-
26
- text_area(:text_area_id, :id => "text_area_id")
27
- text_area(:text_area_class, :class => "text_area_class")
28
- text_area(:text_area_css, :css => ".text_area_class")
29
- text_area(:text_area_name, :name => "text_area_name")
30
- text_area(:text_area_xpath, :xpath => "//textarea")
31
- text_area(:text_area_tag_name, :tag_name => "textarea")
32
- text_area(:text_area_index, :index => 0)
33
- text_area(:text_area_text, :text => "")
34
- text_area(:text_area_value, :value => "")
35
- text_area(:text_area_class_index, :class => "text_area_class", :index => 0)
36
- text_area(:text_area_name_index, :name => "text_area_name", :index => 0)
37
- text_area(:text_area_label, :label => "Text Area")
38
-
39
- hidden_field(:hidden_field_id, :id => "hidden_field_id")
40
- hidden_field(:hidden_field_class, :class => "hidden_field_class")
41
- hidden_field(:hidden_field_css, :css => ".hidden_field_class")
42
- hidden_field(:hidden_field_name, :name => "hidden_field_name")
43
- hidden_field(:hidden_field_xpath, :xpath => "//input[@type='hidden']")
44
- hidden_field(:hidden_field_tag_name, :tag_name => "input[type='hidden']")
45
- hidden_field(:hidden_field_index, :index => 0)
46
- hidden_field(:hidden_field_text, :text => "")
47
- hidden_field(:hidden_field_value, :value => "12345")
48
- hidden_field(:hidden_field_class_index, :class => "hidden_field_class", :index => 0)
49
- hidden_field(:hidden_field_name_index, :name => "hidden_field_name", :index => 0)
50
-
51
- link(:google_search_id, :id => "link_id")
52
- link(:google_search_name, :name => "link_name")
53
- link(:google_search_class, :class => "link_class")
54
- link(:google_search_css, :css => ".link_class")
55
- link(:google_search_xpath, :xpath => "//a[text()='Google Search']")
56
- link(:google_search_link, :link => "Google Search")
57
- link(:google_search_link_text, :link_text => "Google Search")
58
- link(:google_search_href, :href => "success.html")
59
- link(:google_search_text, :text => "Google Search")
60
- link(:google_search_index, :index => 0)
61
- link(:google_search_title, :title => "link_title")
62
-
63
- select_list(:sel_list_id, :id => "sel_list_id")
64
- select_list(:sel_list_class, :class => "sel_list_class")
65
- select_list(:sel_list_css, :css => ".sel_list_class")
66
- select_list(:sel_list_index, :index => 0)
67
- select_list(:sel_list_name, :name => "sel_list_name")
68
- select_list(:sel_list_value, :value => "option1")
69
- select_list(:sel_list_xpath, :xpath => "//select")
70
- select_list(:sel_list_text, :text => "Test 1")
71
- select_list(:sel_list_class_index, :class => "sel_list_class", :index => 0)
72
- select_list(:sel_list_name_index, :name => "sel_list_name", :index => 0)
73
- select_list(:sel_list_multiple, :id => "sel_list_multiple")
74
- select_list(:sel_list_label, :label => "Select List")
75
-
76
- checkbox(:cb_id, :id => 'cb_id')
77
- checkbox(:cb_name, :name => 'cb_name')
78
- checkbox(:cb_class, :class => 'cb_class')
79
- checkbox(:cb_css, :css => '.cb_class')
80
- checkbox(:cb_index, :index => 0)
81
- checkbox(:cb_xpath, :xpath => "//input[@type='checkbox']")
82
- checkbox(:cb_value, :value => '1')
83
- checkbox(:cb_class_index, :class => "cb_class", :index => 0)
84
- checkbox(:cb_name_index, :name => "cb_name", :index => 0)
85
- checkbox(:cb_label, :label => 'Checkbox')
86
-
87
- radio_button(:milk_id, :id => 'milk_id')
88
- radio_button(:milk_name, :name => 'milk_name')
89
- radio_button(:milk_class, :class => 'milk_class')
90
- radio_button(:milk_css, :css => '.milk_class')
91
- radio_button(:milk_index, :index => 0)
92
- radio_button(:milk_value, :value => 'Milk')
93
- radio_button(:milk_xpath, :xpath => "//input[@type='radio']")
94
- radio_button(:milk_class_index, :class => "milk_class", :index => 0)
95
- radio_button(:milk_name_index, :name => "milk_name", :index => 0)
96
- radio_button(:milk_label, :label => "Radio")
97
-
98
- radio_button(:butter_id, :id => 'butter_id')
99
-
100
- radio_button_group(:favorite_cheese, name: 'fav_cheese')
101
-
102
- div(:div_id, :id => 'div_id')
103
- div(:div_name, :name => 'div_name')
104
- div(:div_class, :class => 'div_class')
105
- div(:div_css, :css => '.div_class')
106
- div(:div_text, :text => 'page-object rocks!')
107
- div(:div_index, :index => 0)
108
- div(:div_xpath, :xpath => '//div')
109
- div(:div_title, :title => 'div_title')
110
- div(:div_class_index, :class => "div_class", :index => 0)
111
- div(:div_name_index, :name => "div_name", :index => 0)
112
-
113
- div(:div_data_entity, :data_entity => "test")
114
-
115
- span(:span_id, :id => 'span_id')
116
- span(:span_name, :name => 'span_name')
117
- span(:span_class, :class => 'span_class')
118
- span(:span_css, :css => '.span_class')
119
- span(:span_index, :index => 0)
120
- span(:span_text, :text => 'My alert')
121
- span(:span_title, :title => 'span_title')
122
- span(:span_xpath, :xpath => '//span')
123
- span(:span_class_index, :class => "span_class", :index => 0)
124
- span(:span_name_index, :name => "span_name", :index => 0)
125
-
126
- table(:table_id, :id => 'table_id')
127
- table(:table_name, :name => 'table_name')
128
- table(:table_class, :class => 'table_class')
129
- table(:table_css, :css => '.table_class')
130
- table(:table_index, :index => 0)
131
- table(:table_xpath, :xpath => '//table')
132
- table(:table_class_index, :class => "table_class", :index => 0)
133
- table(:table_name_index, :name => "table_name", :index => 0)
134
- table(:table_with_thead_id, :id => 'table_with_thead_id')
135
-
136
- cell(:cell_id, :id => 'cell_id')
137
- cell(:cell_name, :name => 'cell_name')
138
- cell(:cell_class, :class => 'cell_class')
139
- cell(:cell_css, :css => '.cell_class')
140
- cell(:cell_index, :index => 3)
141
- cell(:cell_text, :text => 'Data4')
142
- cell(:cell_xpath, :xpath => '//table//tr[2]//td[2]')
143
- cell(:cell_class_index, :class => "cell_class", :index => 0)
144
- cell(:cell_name_index, :name => "cell_name", :index => 0)
145
-
146
- row(:tr_id, :id => 'tr_id')
147
- row(:tr_class, :class => 'tr_class')
148
- row(:tr_css, :css => '.tr_class')
149
- row(:tr_index, :index => 1)
150
- row(:tr_text, :text => 'Data1 Data2')
151
- row(:tr_xpath, :xpath => '//table//tbody//tr[1]')
152
- row(:tr_class_index, :class => "tr_class", :index => 0)
153
- row(:tr_name_index, :name => "tr_name", :index => 0)
154
-
155
- button(:button_id, :id => 'button_id')
156
- button(:button_name, :name => 'button_name')
157
- button(:button_class, :class => 'button_class')
158
- button(:button_css, :css => '.button_class')
159
- button(:button_index, :index => 0)
160
- button(:button_xpath, :xpath=> "//input[@type='submit']")
161
- button(:button_text, :text => 'Click Me')
162
- button(:button_value, :value => 'Click Me')
163
- button(:button_class_index, :class => "button_class", :index => 0)
164
- button(:button_name_index, :name => "button_name", :index => 0)
165
-
166
- button(:button_image_id, :id => 'button_image_id')
167
- button(:button_image_src, :src => 'images/submit.gif')
168
- button(:button_image_alt, :alt => 'Submit')
169
-
170
- button(:btn_id, :id => 'btn_id')
171
- button(:btn_name, :name => 'btn_name')
172
- button(:btn_class, :class => 'btn_class')
173
- button(:btn_css, :css => '.btn_class')
174
- button(:btn_index, :index => 0)
175
- button(:btn_text, :text => 'Click Me Too')
176
- button(:btn_value, :value => 'Click Me Too')
177
- button(:btn_class_index, :class => "btn_class", :index => 0)
178
- button(:btn_name_index, :name => "btn_name", :index => 0)
179
-
180
-
181
- button(:disabled_button, :value => 'Disabled')
182
-
183
- image(:image_id, :id => 'image_id')
184
- image(:image_name, :name => 'image_name')
185
- image(:image_class, :class => 'image_class')
186
- image(:image_css, :css => '.image_class')
187
- image(:image_index, :index => 1)
188
- image(:image_xpath, :xpath => '//img[2]')
189
- image(:image_alt, :alt => 'image_alt')
190
- image(:image_src, :src => 'images/circle.png')
191
- image(:image_class_index, :class => "image_class", :index => 0)
192
- image(:image_name_index, :name => "image_name", :index => 0)
193
- image(:image_css, :css => ".image_class")
194
-
195
- form(:form_id, :id => 'form_id')
196
- form(:form_name, :id => 'form_name')
197
- form(:form_class, :class => 'form_class')
198
- form(:form_css, :css => '.form_class')
199
- form(:form_index, :index => 0)
200
- form(:form_xpath, :xpath => '//form')
201
- form(:form_action, :action => "success.html")
202
- form(:form_class_index, :class => "form_class", :index => 0)
203
- form(:form_name_index, :name => "form_name", :index => 0)
204
-
205
- list_item(:li_id, :id => 'li_id')
206
- list_item(:li_name, :name => 'li_name')
207
- list_item(:li_class, :class => 'li_class')
208
- list_item(:li_css, :css => '.li_class')
209
- list_item(:li_index, :index => 0)
210
- list_item(:li_text, :text => 'Item One')
211
- list_item(:li_xpath, :xpath => '//li[1]')
212
- list_item(:li_class_index, :class => "li_class", :index => 0)
213
- list_item(:li_name_index, :name => "li_name", :index => 0)
214
-
215
- unordered_list(:ul_id, :id => 'ul_id')
216
- unordered_list(:ul_name, :name => 'ul_name')
217
- unordered_list(:ul_class, :class => 'ul_class')
218
- unordered_list(:ul_css, :css => '.ul_class')
219
- unordered_list(:ul_index, :index => 0)
220
- unordered_list(:ul_xpath, :xpath => '//ul')
221
- unordered_list(:ul_class_index, :class => "ul_class", :index => 0)
222
- unordered_list(:ul_name_index, :name => "ul_name", :index => 0)
223
-
224
- ordered_list(:ol_id, :id => 'ol_id')
225
- ordered_list(:ol_name, :name => 'ol_name')
226
- ordered_list(:ol_class, :class => 'ol_class')
227
- ordered_list(:ol_css, :css => '.ol_class')
228
- ordered_list(:ol_index, :index => 0)
229
- ordered_list(:ol_xpath, :xpath => '//ol')
230
- ordered_list(:ol_class_index, :class => "ol_class", :index => 0)
231
- ordered_list(:ol_name_index, :name => "ol_name", :index => 0)
232
-
233
- h1(:h1_id, :id => 'h1_id')
234
- h1(:h1_class, :class => 'h1_class')
235
- h1(:h1_css, :css => '.h1_class')
236
- h1(:h1_name, :name => 'h1_name')
237
- h1(:h1_index, :index => 0)
238
- h1(:h1_xpath, :xpath => '//h1')
239
- h1(:h1_class_index, :class => 'h1_class', :index => 0)
240
- h1(:h1_name_index, :name => 'h1_name', :index => 0)
241
-
242
- h2(:h2_id, :id => 'h2_id')
243
- h2(:h2_class, :class => 'h2_class')
244
- h2(:h2_css, :css => '.h2_class')
245
- h2(:h2_name, :name => 'h2_name')
246
- h2(:h2_index, :index => 0)
247
- h2(:h2_xpath, :xpath => '//h2')
248
- h2(:h2_class_index, :class => 'h2_class', :index => 0)
249
- h2(:h2_name_index, :name => 'h2_name', :index => 0)
250
-
251
- h3(:h3_id, :id => 'h3_id')
252
- h3(:h3_class, :class => 'h3_class')
253
- h3(:h3_css, :css => '.h3_class')
254
- h3(:h3_name, :name => 'h3_name')
255
- h3(:h3_index, :index => 0)
256
- h3(:h3_xpath, :xpath => '//h3')
257
- h3(:h3_class_index, :class => 'h3_class', :index => 0)
258
- h3(:h3_name_index, :name => 'h3_name', :index => 0)
259
-
260
- h4(:h4_id, :id => 'h4_id')
261
- h4(:h4_class, :class => 'h4_class')
262
- h4(:h4_css, :css => '.h4_class')
263
- h4(:h4_name, :name => 'h4_name')
264
- h4(:h4_index, :index => 0)
265
- h4(:h4_xpath, :xpath => '//h4')
266
- h4(:h4_class_index, :class => 'h4_class', :index => 0)
267
- h4(:h4_name_index, :name => 'h4_name', :index => 0)
268
-
269
- h5(:h5_id, :id => 'h5_id')
270
- h5(:h5_class, :class => 'h5_class')
271
- h5(:h5_css, :css => '.h5_class')
272
- h5(:h5_name, :name => 'h5_name')
273
- h5(:h5_index, :index => 0)
274
- h5(:h5_xpath, :xpath => '//h5')
275
- h5(:h5_class_index, :class => 'h5_class', :index => 0)
276
- h5(:h5_name_index, :name => 'h5_name', :index => 0)
277
-
278
- h6(:h6_id, :id => 'h6_id')
279
- h6(:h6_class, :class => 'h6_class')
280
- h6(:h6_css, :css => '.h6_class')
281
- h6(:h6_name, :name => 'h6_name')
282
- h6(:h6_index, :index => 0)
283
- h6(:h6_xpath, :xpath => '//h6')
284
- h6(:h6_class_index, :class => 'h6_class', :index => 0)
285
- h6(:h6_name_index, :name => 'h6_name', :index => 0)
286
-
287
- paragraph(:p_id, :id => 'p_id')
288
- paragraph(:p_class, :class => 'p_class')
289
- paragraph(:p_css, :css => '.p_class')
290
- paragraph(:p_name, :name => 'p_name')
291
- paragraph(:p_index, :index => 0)
292
- paragraph(:p_xpath, :xpath => '//p')
293
- paragraph(:p_class_index, :class => 'p_class', :index => 0)
294
- paragraph(:p_name_index, :name => 'p_name', :index => 0)
295
-
296
- button(:alert_button, :id => 'alert_button')
297
- button(:alert_button_that_reloads, :id => 'alert_button_that_reloads')
298
- button(:confirm_button, :id => 'confirm_button')
299
- button(:confirm_button_that_reloads, :id => 'confirm_button_that_reloads')
300
- button(:prompt_button, :id => 'prompt_button')
301
-
302
- file_field(:file_field_id, :id => 'file_field_id')
303
- file_field(:file_field_name, :name => 'file_field_name')
304
- file_field(:file_field_class, :class => 'file_field_class')
305
- file_field(:file_field_css, :css => '.file_field_class')
306
- file_field(:file_field_index, :index => 0)
307
- file_field(:file_field_title, :title => 'file_field_title')
308
- file_field(:file_field_class_index, :class => 'file_field_class', :index => 0)
309
- file_field(:file_field_name_index, :name => 'file_field_name', :index => 0)
310
- file_field(:file_field_xpath, :xpath => "//input[@type='file']")
311
- file_field(:file_field_label, :label => "File Field")
312
-
313
- label(:label_id, :id => 'label_id')
314
- label(:label_name, :name => 'label_name')
315
- label(:label_class, :class => 'label_class')
316
- label(:label_css, :css => '.label_class')
317
- label(:label_text, :text => 'page-object is the best!')
318
- label(:label_index, :index => 6)
319
- label(:label_xpath, :xpath => '//label[7]')
320
- label(:label_class_index, :class => "label_class", :index => 0)
321
- label(:label_name_index, :name => "label_name", :index => 0)
322
-
323
- link(:open_window, :text => 'New Window')
324
- link(:open_another_window, :text => 'Another New Window')
325
- link(:child, :id => 'child')
326
-
327
- area(:area_id, :id => 'area')
328
- area(:area_name, :name => 'area')
329
- area(:area_class, :class => 'area')
330
- area(:area_css, :css => '.area')
331
- area(:area_index, :index => 0)
332
- area(:area_xpath, :xpath => '//area')
333
- area(:area_class_index, :class => 'area', :index => 0)
334
- area(:area_name_index, :name => 'area', :index => 0)
335
-
336
- canvas(:canvas_id, :id => 'canvas')
337
- canvas(:canvas_name, :name => 'canvas')
338
- canvas(:canvas_class, :class => 'canvas')
339
- canvas(:canvas_css, :css => '.canvas')
340
- canvas(:canvas_index, :index => 0)
341
- canvas(:canvas_xpath, :xpath => '//canvas')
342
- canvas(:canvas_class_index, :class => 'canvas', :index => 0)
343
- canvas(:canvas_name_index, :name => 'canvas', :index => 0)
344
-
345
- element(:article_id, :article, :id => 'article_id')
346
- element(:header_id, :header, :id => 'header_id')
347
- element(:footer_id, :footer, :id => 'footer_id')
348
- element(:summary_id, :summary, :id => 'summary_id')
349
- element(:details_id, :details, :id => 'details_id')
350
-
351
- figure(:figure_id, :id => 'figure_id')
352
-
353
- svg(:svg_id, :id => 'the_svg')
354
-
355
- b(:b_id, :id => 'b_id')
356
- b(:b_class, :class => 'b_class')
357
- b(:b_css, :css => '.b_class')
358
- b(:b_name, :name => 'b_name')
359
- b(:b_index, :index => 0)
360
- b(:b_xpath, :xpath => '//b')
361
- b(:b_class_index, :class => 'b_class', :index => 0)
362
- b(:b_name_index, :name => 'b_name', :index => 0)
363
-
364
- i(:i_id, :id => 'i_id')
365
- i(:i_class, :class => 'i_class')
366
- i(:i_css, :css => '.i_class')
367
- i(:i_name, :name => 'i_name')
368
- i(:i_index, :index => 0)
369
- i(:i_xpath, :xpath => '//i')
370
- i(:i_class_index, :class => 'i_class', :index => 0)
371
- i(:i_name_index, :name => 'i_name', :index => 0)
372
- end
373
-