zena 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (392) hide show
  1. data/History.txt +23 -1
  2. data/MIT-LICENSE +2 -2
  3. data/README.rdoc +2 -15
  4. data/app/controllers/acls_controller.rb +1 -1
  5. data/app/controllers/documents_controller.rb +12 -3
  6. data/app/controllers/nodes_controller.rb +1 -3
  7. data/app/controllers/sites_controller.rb +7 -0
  8. data/app/controllers/versions_controller.rb +1 -1
  9. data/app/controllers/virtual_classes_controller.rb +7 -8
  10. data/app/models/acl.rb +3 -2
  11. data/app/models/relation_proxy.rb +2 -1
  12. data/app/models/role.rb +16 -0
  13. data/app/models/site.rb +48 -0
  14. data/app/models/text_document.rb +2 -1
  15. data/app/models/user.rb +2 -1
  16. data/app/models/zip.rb +2 -1
  17. data/app/views/acls/index.rhtml +11 -1
  18. data/app/views/documents/show.rhtml +1 -1
  19. data/app/views/relations/_add.erb +2 -2
  20. data/app/views/relations/_form.erb +5 -2
  21. data/app/views/relations/_li.erb +4 -1
  22. data/app/views/relations/index.erb +3 -3
  23. data/app/views/sites/_form.erb +1 -1
  24. data/app/views/sites/_job.erb +4 -0
  25. data/app/views/sites/index.erb +1 -1
  26. data/app/views/sites/jobs.erb +10 -0
  27. data/app/views/templates/document_create_tabs/_file.rhtml +3 -0
  28. data/app/views/zafu/default/Node-+search.zafu +2 -2
  29. data/bricks/acls/zena/init.rb +2 -1
  30. data/bricks/acls/zena/test/integration/acl_integration_test.rb +5 -5
  31. data/bricks/acls/zena/test/sites/erebus/acls.yml +2 -2
  32. data/bricks/acls/zena/test/unit/acl_test.rb +2 -2
  33. data/bricks/grid/lib/bricks/grid.rb +110 -0
  34. data/bricks/grid/zena/init.rb +4 -0
  35. data/bricks/math/lib/bricks/math.rb +1 -0
  36. data/bricks/pdf/lib/bricks/pdf.rb +10 -1
  37. data/bricks/sphinx/zena/tasks.rb +8 -40
  38. data/bricks/spreadsheet/README +31 -0
  39. data/bricks/spreadsheet/lib/bricks/spreadsheet.rb +293 -0
  40. data/bricks/spreadsheet/zena/init.rb +3 -0
  41. data/bricks/spreadsheet/zena/test/sites/zena/links.yml +11 -0
  42. data/bricks/spreadsheet/zena/test/unit/xlsx_test.rb +5 -0
  43. data/bricks/spreadsheet/zena/test/zafu/README +27 -0
  44. data/bricks/spreadsheet/zena/test/zafu/spreadsheet.yml +19 -0
  45. data/bricks/worker/lib/bricks/worker.rb +11 -5
  46. data/bricks/worker/zena/init.rb +8 -0
  47. data/bricks/worker/zena/migrate/20120501091514_add_site_id_to_jobs.rb +9 -0
  48. data/bricks/zena/zena/migrate/01_base.rb +0 -7
  49. data/bricks/zena/zena/migrate/20111214112233_add_comment_to_relations.rb +9 -0
  50. data/config/bricks.yml +15 -1
  51. data/config/environments/production.rb +2 -2
  52. data/config/gems.yml +6 -1
  53. data/doc/zafu_changes.yml +1 -1
  54. data/lib/tasks/zena.rake +6 -2
  55. data/lib/zena/app.rb +1 -1
  56. data/lib/zena/code/default_syntax.rb +5 -1
  57. data/lib/zena/db_helper/mysql.rb +5 -1
  58. data/lib/zena/deploy/app_init.rhtml +11 -7
  59. data/lib/zena/deploy/awstats.conf.rhtml +1 -1
  60. data/lib/zena/deploy/start_stop.rhtml +5 -5
  61. data/lib/zena/deploy/vhost.rhtml +16 -2
  62. data/lib/zena/deploy.rb +5 -3
  63. data/lib/zena/info.rb +1 -1
  64. data/lib/zena/parser/zazen_rules.rb +7 -7
  65. data/lib/zena/remote/node.rb +7 -0
  66. data/lib/zena/routes.rb +4 -5
  67. data/lib/zena/test_controller.rb +18 -1
  68. data/lib/zena/use/action.rb +13 -4
  69. data/lib/zena/use/ajax.rb +10 -4
  70. data/lib/zena/use/authlogic.rb +1 -1
  71. data/lib/zena/use/calendar.rb +4 -0
  72. data/lib/zena/use/conditional.rb +3 -0
  73. data/lib/zena/use/dates.rb +44 -4
  74. data/lib/zena/use/display.rb +45 -15
  75. data/lib/zena/use/forms.rb +59 -30
  76. data/lib/zena/use/query_builder.rb +12 -12
  77. data/lib/zena/use/recursion.rb +1 -1
  78. data/lib/zena/use/rendering.rb +18 -17
  79. data/lib/zena/use/urls.rb +2 -1
  80. data/lib/zena/use/zafu_safe_definitions.rb +0 -9
  81. data/lib/zena/use/zafu_templates.rb +2 -2
  82. data/lib/zena/use/zazen.rb +1 -3
  83. data/lib/zena/use.rb +13 -2
  84. data/lib/zena.rb +8 -2
  85. data/public/images/bullet_back.png +0 -0
  86. data/public/javascripts/grid.js +535 -0
  87. data/public/javascripts/tablekit.js +0 -0
  88. data/public/javascripts/window.js +0 -0
  89. data/public/javascripts/zena.js +17 -7
  90. data/public/stylesheets/admin.css +5 -1
  91. data/public/stylesheets/grid.css +19 -0
  92. data/test/fixtures/files/TestNode.zafu +123 -311
  93. data/test/fixtures/files/translations_fr.yml +6 -1
  94. data/test/functional/acls_controller_test.rb +2 -2
  95. data/test/functional/nodes_controller_test.rb +17 -11
  96. data/test/functional/virtual_classes_controller_test.rb +1 -1
  97. data/test/integration/query_node/basic.yml +9 -0
  98. data/test/integration/query_node/dates.yml +1 -1
  99. data/test/integration/zafu_compiler/ajax.yml +9 -9
  100. data/test/integration/zafu_compiler/basic.yml +0 -24
  101. data/test/integration/zafu_compiler/dates.yml +24 -7
  102. data/test/integration/zafu_compiler/display.yml +45 -2
  103. data/test/integration/zafu_compiler/errors.yml +0 -6
  104. data/test/integration/zafu_compiler/forms.yml +41 -3
  105. data/test/integration/zafu_compiler/query.yml +29 -3
  106. data/test/integration/zafu_compiler/roles.yml +0 -4
  107. data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
  108. data/test/integration/zafu_compiler_test.rb +11 -3
  109. data/test/selenium/Add/add3.rsel +8 -8
  110. data/test/selenium/Drop/drop1.rsel +12 -12
  111. data/test/selenium/Drop/drop2.rsel +14 -14
  112. data/test/selenium/Drop/drop3.rsel +21 -21
  113. data/test/selenium/Drop/drop4.rsel +1 -1
  114. data/test/selenium/Edit/edit2.rsel +9 -9
  115. data/test/selenium/Edit/edit4.rsel +55 -0
  116. data/test/selenium/Edit/edit5.rsel +41 -0
  117. data/test/selenium/Edit/edit6.rsel +53 -0
  118. data/test/selenium/Filter/0setup.rsel +12 -0
  119. data/test/selenium/Filter/filter1.rsel +9 -0
  120. data/test/selenium/Filter/filter2.rsel +9 -0
  121. data/test/selenium/Form/form1.rsel +1 -1
  122. data/test/selenium/Form/form2.rsel +1 -1
  123. data/test/selenium/Form/form3.rsel +15 -0
  124. data/test/selenium/Grid/0setup.rsel +13 -0
  125. data/test/selenium/Grid/grid1.rsel +11 -0
  126. data/test/selenium/Swap/0setup.rsel +12 -0
  127. data/test/selenium/Swap/swap1.rsel +13 -0
  128. data/test/selenium/Swap/swap2.rsel +11 -0
  129. data/test/selenium/Toggle/toggle1.rsel +6 -6
  130. data/test/sites/zena/versions.yml +1 -1
  131. data/test/unit/relation_proxy_test.rb +36 -0
  132. data/test/unit/site_test.rb +10 -2
  133. data/test/unit/zena/use/rendering_test.rb +7 -6
  134. data/test/unit/zena/use/zazen_test.rb +1 -2
  135. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +24 -0
  136. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +58 -0
  137. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +88 -0
  138. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +27 -0
  139. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +23 -0
  140. data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +19 -0
  141. data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +19 -0
  142. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +16 -0
  143. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +16 -0
  144. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +16 -0
  145. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +18 -0
  146. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +18 -0
  147. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +16 -0
  148. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +18 -0
  149. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +16 -0
  150. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +16 -0
  151. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +16 -0
  152. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +16 -0
  153. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +16 -0
  154. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +16 -0
  155. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +18 -0
  156. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +16 -0
  157. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +17 -0
  158. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +17 -0
  159. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +18 -0
  160. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +22 -0
  161. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +23 -0
  162. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +25 -0
  163. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +18 -0
  164. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +18 -0
  165. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +18 -0
  166. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +16 -0
  167. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +16 -0
  168. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +20 -0
  169. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +20 -0
  170. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +16 -0
  171. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +16 -0
  172. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +16 -0
  173. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +16 -0
  174. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +16 -0
  175. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +16 -0
  176. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +16 -0
  177. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +18 -0
  178. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +16 -0
  179. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +16 -0
  180. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +16 -0
  181. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +16 -0
  182. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +16 -0
  183. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +16 -0
  184. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +16 -0
  185. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +16 -0
  186. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +16 -0
  187. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +16 -0
  188. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +16 -0
  189. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +16 -0
  190. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +16 -0
  191. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +16 -0
  192. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +16 -0
  193. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +16 -0
  194. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +16 -0
  195. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +16 -0
  196. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +16 -0
  197. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +16 -0
  198. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +16 -0
  199. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +16 -0
  200. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +16 -0
  201. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +16 -0
  202. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +16 -0
  203. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +16 -0
  204. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +16 -0
  205. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +16 -0
  206. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +16 -0
  207. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +16 -0
  208. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +16 -0
  209. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +16 -0
  210. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
  211. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +104 -0
  212. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
  213. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +17 -0
  214. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +13 -0
  215. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +25 -0
  216. data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +166 -0
  217. data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +304 -0
  218. data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +37 -0
  219. data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +52 -0
  220. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
  221. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +118 -0
  222. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
  223. data/vendor/TextMate/Zena.tmbundle/info.plist +17 -0
  224. data/vendor/plugins/selenium-on-rails/CHANGELOG +125 -0
  225. data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +202 -0
  226. data/vendor/plugins/selenium-on-rails/README.md +202 -0
  227. data/vendor/plugins/selenium-on-rails/Rakefile +38 -0
  228. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +265 -0
  229. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +148 -0
  230. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +231 -0
  231. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +195 -0
  232. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +295 -0
  233. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +219 -0
  234. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +156 -0
  235. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +179 -0
  236. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +223 -0
  237. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +441 -0
  238. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +3098 -0
  239. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +2080 -0
  240. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +116 -0
  241. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +116 -0
  242. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +126 -0
  243. data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +150 -0
  244. data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +422 -0
  245. data/vendor/plugins/selenium-on-rails/doc/files/README.html +321 -0
  246. data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +108 -0
  247. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +101 -0
  248. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +222 -0
  249. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +109 -0
  250. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +111 -0
  251. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +101 -0
  252. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +101 -0
  253. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +118 -0
  254. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +101 -0
  255. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +101 -0
  256. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +114 -0
  257. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +113 -0
  258. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +120 -0
  259. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +108 -0
  260. data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +115 -0
  261. data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +42 -0
  262. data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +43 -0
  263. data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +182 -0
  264. data/vendor/plugins/selenium-on-rails/doc/index.html +24 -0
  265. data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +208 -0
  266. data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +19 -0
  267. data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +50 -0
  268. data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +16 -0
  269. data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +14 -0
  270. data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +11 -0
  271. data/vendor/plugins/selenium-on-rails/init.rb +15 -0
  272. data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +122 -0
  273. data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +16 -0
  274. data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +8 -0
  275. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +215 -0
  276. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +57 -0
  277. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +36 -0
  278. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +61 -0
  279. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +20 -0
  280. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +44 -0
  281. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +87 -0
  282. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +56 -0
  283. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +116 -0
  284. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +1002 -0
  285. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +514 -0
  286. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +91 -0
  287. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +24 -0
  288. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +11 -0
  289. data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +30 -0
  290. data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +18 -0
  291. data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +5 -0
  292. data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +9 -0
  293. data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +67 -0
  294. data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +26 -0
  295. data/vendor/plugins/selenium-on-rails/routes.rb +24 -0
  296. data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +7 -0
  297. data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +8 -0
  298. data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +110 -0
  299. data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +109 -0
  300. data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +145 -0
  301. data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +55 -0
  302. data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +177 -0
  303. data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +177 -0
  304. data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butmin.gif +0 -0
  305. data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butplus.gif +0 -0
  306. data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.css +298 -0
  307. data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +16 -0
  308. data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +205 -0
  309. data/vendor/plugins/selenium-on-rails/selenium-core/icons/all.png +0 -0
  310. data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue.png +0 -0
  311. data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue_disabled.png +0 -0
  312. data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause.png +0 -0
  313. data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause_disabled.png +0 -0
  314. data/vendor/plugins/selenium-on-rails/selenium-core/icons/selected.png +0 -0
  315. data/vendor/plugins/selenium-on-rails/selenium-core/icons/step.png +0 -0
  316. data/vendor/plugins/selenium-on-rails/selenium-core/icons/step_disabled.png +0 -0
  317. data/vendor/plugins/selenium-on-rails/selenium-core/iedoc-core.xml +1759 -0
  318. data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +1800 -0
  319. data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +6 -0
  320. data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +142 -0
  321. data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +150 -0
  322. data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +53 -0
  323. data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +356 -0
  324. data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +2006 -0
  325. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +101 -0
  326. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +815 -0
  327. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +915 -0
  328. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +958 -0
  329. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +47 -0
  330. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +283 -0
  331. data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +383 -0
  332. data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +91 -0
  333. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +69 -0
  334. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +1616 -0
  335. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +72 -0
  336. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +3184 -0
  337. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +2300 -0
  338. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +153 -0
  339. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +377 -0
  340. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +175 -0
  341. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +148 -0
  342. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +695 -0
  343. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +1362 -0
  344. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +5 -0
  345. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +803 -0
  346. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +1537 -0
  347. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +979 -0
  348. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +3 -0
  349. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +75 -0
  350. data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +153 -0
  351. data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
  352. data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +43 -0
  353. data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +316 -0
  354. data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +566 -0
  355. data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +2816 -0
  356. data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +549 -0
  357. data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +149 -0
  358. data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +2450 -0
  359. data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +8 -0
  360. data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +37 -0
  361. data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +27 -0
  362. data/vendor/plugins/selenium-on-rails/test/paths_test.rb +72 -0
  363. data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +157 -0
  364. data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +708 -0
  365. data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +242 -0
  366. data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +67 -0
  367. data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +43 -0
  368. data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +35 -0
  369. data/vendor/plugins/selenium-on-rails/test/setup_test.rb +31 -0
  370. data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +109 -0
  371. data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +17 -0
  372. data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +51 -0
  373. data/vendor/plugins/selenium-on-rails/test/test_helper.rb +101 -0
  374. data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +1 -0
  375. data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +12 -0
  376. data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +6 -0
  377. data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +2 -0
  378. data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +6 -0
  379. data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +1 -0
  380. data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +5 -0
  381. data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +5 -0
  382. data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +7 -0
  383. data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +8 -0
  384. data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +7 -0
  385. data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +1 -0
  386. data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +1 -0
  387. data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +1 -0
  388. data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +1 -0
  389. data/zena.gemspec +290 -7
  390. metadata +346 -52
  391. data/app/views/nodes/_table.rhtml +0 -14
  392. data/lib/zena/use/grid.rb +0 -154
@@ -0,0 +1,1002 @@
1
+ # The accessors available for SeleniumOnRails::TestBuilder tests.
2
+ #
3
+ # For each +store_foo+ there's +assert_foo+, +assert_not_foo+, +verify_foo+,
4
+ # +verify_not_foo+, +wait_for_foo+, +wait_for_not_foo+.
5
+ module SeleniumOnRails::TestBuilderAccessors
6
+
7
+ # Tell Selenium to expect an error on the next command execution.
8
+ #
9
+ # NOTE: <tt>store_error_on_next</tt> is currently not supported by
10
+ # Selenium Core and is only added to here as a shortcut for
11
+ # generating the related assertions.
12
+ #
13
+ # Related Assertions, automatically generated:
14
+ # * <tt>assert_error_on_next(message)</tt>
15
+ # * <tt>assert_not_error_on_next(message)</tt>
16
+ # * <tt>verify_error_on_next(message)</tt>
17
+ # * <tt>verify_not_error_on_next(message)</tt>
18
+ # * <tt>wait_for_error_on_next(message)</tt>
19
+ # * <tt>wait_for_not_error_on_next(message)</tt>
20
+ def store_error_on_next message
21
+ raise 'Not supported in Selenium Core at the moment'
22
+ end
23
+
24
+ # Tell Selenium to expect a failure on the next command execution.
25
+ #
26
+ # NOTE: <tt>store_failure_on_next</tt> is currently not supported by
27
+ # Selenium Core and is only added to here as a shortcut for
28
+ # generating the related assertions.
29
+ #
30
+ # Related Assertions, automatically generated:
31
+ # * <tt>assert_failure_on_next(message)</tt>
32
+ # * <tt>assert_not_failure_on_next(message)</tt>
33
+ # * <tt>verify_failure_on_next(message)</tt>
34
+ # * <tt>verify_not_failure_on_next(message)</tt>
35
+ # * <tt>wait_for_failure_on_next(message)</tt>
36
+ # * <tt>wait_for_not_failure_on_next(message)</tt>
37
+ def store_failure_on_next message
38
+ raise 'Not supported in Selenium Core at the moment'
39
+ end
40
+
41
+ # Returns the IDs of all windows that the browser knows about.
42
+ #
43
+ # Related Assertions, automatically generated:
44
+ # * <tt>assertAllWindowIds(pattern)</tt>
45
+ # * <tt>assertNotAllWindowIds(pattern)</tt>
46
+ # * <tt>verifyAllWindowIds(pattern)</tt>
47
+ # * <tt>verifyNotAllWindowIds(pattern)</tt>
48
+ # * <tt>waitForAllWindowIds(pattern)</tt>
49
+ # * <tt>waitForNotAllWindowIds(pattern)</tt>
50
+ def store_all_window_ids variable_name
51
+ command 'storeAllWindowIds', variable_name
52
+ end
53
+
54
+ # Returns the names of all windows that the browser knows about.
55
+ #
56
+ # Related Assertions, automatically generated:
57
+ # * <tt>assertAllWindowNames(pattern)</tt>
58
+ # * <tt>assertNotAllWindowNames(pattern)</tt>
59
+ # * <tt>verifyAllWindowNames(pattern)</tt>
60
+ # * <tt>verifyNotAllWindowNames(pattern)</tt>
61
+ # * <tt>waitForAllWindowNames(pattern)</tt>
62
+ # * <tt>waitForNotAllWindowNames(pattern)</tt>
63
+ def store_all_window_names variable_name
64
+ command 'storeAllWindowNames', variable_name
65
+ end
66
+
67
+ # Returns the titles of all windows that the browser knows about.
68
+ #
69
+ # Related Assertions, automatically generated:
70
+ # * <tt>assertAllWindowTitles(pattern)</tt>
71
+ # * <tt>assertNotAllWindowTitles(pattern)</tt>
72
+ # * <tt>verifyAllWindowTitles(pattern)</tt>
73
+ # * <tt>verifyNotAllWindowTitles(pattern)</tt>
74
+ # * <tt>waitForAllWindowTitles(pattern)</tt>
75
+ # * <tt>waitForNotAllWindowTitles(pattern)</tt>
76
+ def store_all_window_titles variable_name
77
+ command 'storeAllWindowTitles', variable_name
78
+ end
79
+
80
+ # Has an alert occurred?
81
+ #
82
+ # Related Assertions, automatically generated:
83
+ # * <tt>assert_alert_present</tt>
84
+ # * <tt>assert_alert_not_present</tt>
85
+ # * <tt>verify_alert_present</tt>
86
+ # * <tt>verify_alert_not_present</tt>
87
+ # * <tt>wait_for_alert_present</tt>
88
+ # * <tt>wait_for_alert_not_present</tt>
89
+ def store_alert_present variable_name
90
+ command 'storeAlertPresent', variable_name
91
+ end
92
+
93
+ # Returns every instance of some attribute from all known windows.
94
+ #
95
+ # Related Assertions, automatically generated:
96
+ # * <tt>assert_attribute_from_all_windows(attribute_name, pattern)</tt>
97
+ # * <tt>assert_not_attribute_from_all_windows(attribute_name, pattern)</tt>
98
+ # * <tt>verify_attribute_from_all_windows(attribute_name, pattern)</tt>
99
+ # * <tt>verify_not_attribute_from_all_windows(attribute_name, pattern)</tt>
100
+ # * <tt>wait_for_attribute_from_all_windows(attribute_name, pattern)</tt>
101
+ # * <tt>wait_for_not_attribute_from_all_windows(attribute_name, pattern)</tt>
102
+ def store_attribute_from_all_windows attribute_name, variable_name
103
+ command 'storeAttributeFromAllWindows', attribute_name, variable_name
104
+ end
105
+
106
+ # Has a prompt occurred?
107
+ #
108
+ # Related Assertions, automatically generated:
109
+ # * <tt>assert_prompt_present</tt>
110
+ # * <tt>assert_prompt_not_present</tt>
111
+ # * <tt>verify_prompt_present</tt>
112
+ # * <tt>verify_prompt_not_present</tt>
113
+ # * <tt>wait_for_prompt_present</tt>
114
+ # * <tt>wait_for_prompt_not_present</tt>
115
+ def store_prompt_present variable_name
116
+ command 'storePromptPresent', variable_name
117
+ end
118
+
119
+ # Has <tt>confirm()</tt> been called?
120
+ #
121
+ # Related Assertions, automatically generated:
122
+ # * <tt>assert_confirmation_present</tt>
123
+ # * <tt>assert_confirmation_not_present</tt>
124
+ # * <tt>verify_confirmation_present</tt>
125
+ # * <tt>verify_confirmation_not_present</tt>
126
+ # * <tt>wait_for_confirmation_present</tt>
127
+ # * <tt>wait_for_confirmation_not_present</tt>
128
+ def store_confirmation_present variable_name
129
+ command 'storeConfirmationPresent', variable_name
130
+ end
131
+
132
+ # Return all cookies of the current page under test.
133
+ #
134
+ # Related Assertions, automatically generated:
135
+ # * <tt>assert_cookie(pattern)</tt>
136
+ # * <tt>assert_not_cookie(pattern)</tt>
137
+ # * <tt>verify_cookie(pattern)</tt>
138
+ # * <tt>verify_not_cookie(pattern)</tt>
139
+ # * <tt>wait_for_cookie(pattern)</tt>
140
+ # * <tt>wait_for_not_cookie(pattern)</tt>
141
+ def store_cookie variable_name
142
+ command 'storeCookie', variable_name
143
+ end
144
+
145
+ # Retrieves the text cursor position in the given input element or
146
+ # textarea; beware, this may not work perfectly on all browsers.
147
+ #
148
+ # This method will fail if the specified element isn't an input element
149
+ # or textarea, or there is no cursor in the element.
150
+ #
151
+ # Related Assertions, automatically generated:
152
+ # * <tt>assert_cursor_position(locator, pattern)</tt>
153
+ # * <tt>assert_not_cursor_position(locator, pattern)</tt>
154
+ # * <tt>verify_cursor_position(locator, pattern)</tt>
155
+ # * <tt>verify_not_cursor_position(locator, pattern)</tt>
156
+ # * <tt>wait_for_cursor_position(locator, pattern)</tt>
157
+ # * <tt>wait_for_not_cursor_position(locator, pattern)</tt>
158
+ def store_cursor_position locator, variable_name
159
+ command 'storeCursorPosition', locator, variable_name
160
+ end
161
+
162
+ # Retrieves the message of a JavaScript alert generated during the previous
163
+ # action, or fail if there were no alerts.
164
+ #
165
+ # Getting an alert has the same effect as manually clicking OK. If an alert
166
+ # is generated but you do not get/verify it, the next Selenium action will
167
+ # fail.
168
+ #
169
+ # NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert
170
+ # dialog.
171
+ #
172
+ # NOTE: Selenium does NOT support JavaScript alerts that are generated in a
173
+ # page's <tt>onload()</tt> event handler. In this case a visible dialog WILL be
174
+ # generated and Selenium will hang until someone manually clicks OK.
175
+ #
176
+ # Related Assertions, automatically generated:
177
+ # * <tt>assert_alert(pattern)</tt>
178
+ # * <tt>assert_not_alert(pattern)</tt>
179
+ # * <tt>verify_alert_present(pattern)</tt>
180
+ # * <tt>verify_not_alert(pattern)</tt>
181
+ # * <tt>wait_for_alert(pattern)</tt>
182
+ # * <tt>wait_for_not_alert(pattern)</tt>
183
+ def store_alert variable_name
184
+ command 'storeAlert', variable_name
185
+ end
186
+
187
+ # Retrieves the message of a JavaScript confirmation dialog generated during
188
+ # the previous action.
189
+ #
190
+ # By default, the confirm function will return +true+, having the same effect
191
+ # as manually clicking OK. This can be changed by prior execution of the
192
+ # +choose_cancel_on_next_confirmation+ command. If a confirmation is
193
+ # generated but you do not get/verify it, the next Selenium action will fail.
194
+ #
195
+ # NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
196
+ # dialog.
197
+ #
198
+ # NOTE: Selenium does NOT support JavaScript confirmations that are generated
199
+ # in a page's <tt>onload()</tt> event handler. In this case a visible dialog WILL be
200
+ # generated and Selenium will hang until you manually click OK.
201
+ #
202
+ # Related Assertions, automatically generated:
203
+ # * <tt>assert_confirmation(pattern)</tt>
204
+ # * <tt>assert_not_confirmation(pattern)</tt>
205
+ # * <tt>verify_confirmation_present(pattern)</tt>
206
+ # * <tt>verify_not_confirmation(pattern)</tt>
207
+ # * <tt>wait_for_confirmation(pattern)</tt>
208
+ # * <tt>wait_for_not_confirmation(pattern)</tt>
209
+ def store_confirmation variable_name
210
+ command 'storeConfirmation', variable_name
211
+ end
212
+
213
+ # Retrieves the message of a JavaScript question prompt dialog generated
214
+ # during the previous action.
215
+ #
216
+ # Successful handling of the prompt requires prior execution of the
217
+ # +answer_on_next_prompt+ command. If a prompt is generated but you do not
218
+ # get/verify it, the next Selenium action will fail.
219
+ #
220
+ # NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
221
+ #
222
+ # NOTE: Selenium does NOT support JavaScript prompts that are generated in a
223
+ # page's <tt>onload()</tt> event handler. In this case a visible dialog WILL be
224
+ # generated and Selenium will hang until someone manually clicks OK.
225
+ #
226
+ # Related Assertions, automatically generated:
227
+ # * <tt>assert_prompt(pattern)</tt>
228
+ # * <tt>assert_not_prompt(pattern)</tt>
229
+ # * <tt>verify_prompt_present(pattern)</tt>
230
+ # * <tt>verify_not_prompt(pattern)</tt>
231
+ # * <tt>wait_for_prompt(pattern)</tt>
232
+ # * <tt>wait_for_not_prompt(pattern)</tt>
233
+ def store_prompt variable_name
234
+ command 'storePrompt', variable_name
235
+ end
236
+
237
+ # Gets the absolute URL of the current page.
238
+ #
239
+ # Related Assertions, automatically generated:
240
+ # * <tt>assert_absolute_location(pattern)</tt>
241
+ # * <tt>assert_not_absolute_location(pattern)</tt>
242
+ # * <tt>verify_absolute_location_present(pattern)</tt>
243
+ # * <tt>verify_not_absolute_location(pattern)</tt>
244
+ # * <tt>wait_for_absolute_location(pattern)</tt>
245
+ # * <tt>wait_for_not_absolute_location(pattern)</tt>
246
+ def store_absolute_location variable_name
247
+ command 'storeAbsoluteLocation', variable_name
248
+ end
249
+
250
+ # Verify the location of the current page ends with the expected location.
251
+ # If an URL querystring is provided, this is checked as well.
252
+ #
253
+ # Related Assertions, automatically generated:
254
+ # * <tt>assert_location(pattern)</tt>
255
+ # * <tt>assert_not_location(pattern)</tt>
256
+ # * <tt>verify_location_present(pattern)</tt>
257
+ # * <tt>verify_not_location(pattern)</tt>
258
+ # * <tt>wait_for_location(pattern)</tt>
259
+ # * <tt>wait_for_not_location(pattern)</tt>
260
+ def store_location expected_location, variable_name
261
+ command 'storeLocation', expected_location, variable_name
262
+ end
263
+
264
+ # Returns the number of pixels between "mousemove" events during
265
+ # drag_and_drop commands (default=10).
266
+ #
267
+ # Related Assertions, automatically generated:
268
+ # * <tt>assert_mouse_speed(pattern)</tt>
269
+ # * <tt>assert_not_mouse_speed(pattern)</tt>
270
+ # * <tt>verify_mouse_speed(pattern)</tt>
271
+ # * <tt>verify_not_mouse_speed(pattern)</tt>
272
+ # * <tt>wait_for_mouse_speed(pattern)</tt>
273
+ # * <tt>wait_for_not_mouse_speed(pattern)</tt>
274
+ def store_mouse_speed variable_name
275
+ command 'storeMouseSpeed', variable_name
276
+ end
277
+
278
+ # Gets the title of the current page.
279
+ #
280
+ # Related Assertions, automatically generated:
281
+ # * <tt>assert_title(pattern)</tt>
282
+ # * <tt>assert_not_title(pattern)</tt>
283
+ # * <tt>verify_title_present(pattern)</tt>
284
+ # * <tt>verify_not_title(pattern)</tt>
285
+ # * <tt>wait_for_title(pattern)</tt>
286
+ # * <tt>wait_for_not_title(pattern)</tt>
287
+ def store_title variable_name
288
+ command 'storeTitle', variable_name
289
+ end
290
+
291
+ # Gets the entire text of the page.
292
+ #
293
+ # Related Assertions, automatically generated:
294
+ # * <tt>assert_body_text(pattern)</tt>
295
+ # * <tt>assert_not_body_text(pattern)</tt>
296
+ # * <tt>verify_body_text_present(pattern)</tt>
297
+ # * <tt>verify_not_body_text(pattern)</tt>
298
+ # * <tt>wait_for_body_text(pattern)</tt>
299
+ # * <tt>wait_for_not_body_text(pattern)</tt>
300
+ def store_body_text variable_name
301
+ command 'storeBodyText', variable_name
302
+ end
303
+
304
+ # Gets the (whitespace-trimmed) value of an input field (or anything else
305
+ # with a value parameter). For checkbox/radio elements, the value will be
306
+ # "on" or "off" depending on whether the element is checked or not.
307
+ #
308
+ # Related Assertions, automatically generated:
309
+ # * <tt>assert_value(locator, pattern)</tt>
310
+ # * <tt>assert_not_value(locator, pattern)</tt>
311
+ # * <tt>verify_value_present(locator, pattern)</tt>
312
+ # * <tt>verify_not_value(locator, pattern)</tt>
313
+ # * <tt>wait_for_value(locator, pattern)</tt>
314
+ # * <tt>wait_for_not_value(locator, pattern)</tt>
315
+ def store_value locator, variable_name
316
+ command 'storeValue', locator, variable_name
317
+ end
318
+
319
+ # Gets the text of an element. This works for any element that contains text.
320
+ # This command uses either the +textContent+ (Mozilla-like browsers) or the
321
+ # +innerText+ (IE-like browsers) of the element, which is the rendered text
322
+ # shown to the user.
323
+ #
324
+ # Related Assertions, automatically generated:
325
+ # * <tt>assert_text(locator, pattern)</tt>
326
+ # * <tt>assert_not_text(locator, pattern)</tt>
327
+ # * <tt>verify_text_present(locator, pattern)</tt>
328
+ # * <tt>verify_not_text(locator, pattern)</tt>
329
+ # * <tt>wait_for_text(locator, pattern)</tt>
330
+ # * <tt>wait_for_not_text(locator, pattern)</tt>
331
+ def store_text locator, variable_name
332
+ command 'storeText', locator, variable_name
333
+ end
334
+
335
+ # Gets the result of evaluating the specified JavaScript snippet. The snippet
336
+ # may have multiple lines, but only the result of the last line will be
337
+ # returned.
338
+ #
339
+ # Note that, by default, the snippet will run in the context of the
340
+ # "selenium" object itself, so +this+ will refer to the Selenium object, and
341
+ # +window+ will refer to the top-level runner test window, not the window of
342
+ # your application.
343
+ #
344
+ # If you need a reference to the window of your application, you can refer to
345
+ # <tt>this.browserbot.getCurrentWindow()</tt> and if you need to use a locator to
346
+ # refer to a single element in your application page, you can use
347
+ # <tt>this.page().findElement("foo")</tt> where <tt>"foo"</tt> is your locator.
348
+ #
349
+ # Related Assertions, automatically generated:
350
+ # * <tt>assert_eval(script, pattern)</tt>
351
+ # * <tt>assert_not_eval(script, pattern)</tt>
352
+ # * <tt>verify_eval_present(script, pattern)</tt>
353
+ # * <tt>verify_not_eval(script, pattern)</tt>
354
+ # * <tt>wait_for_eval(script, pattern)</tt>
355
+ # * <tt>wait_for_not_eval(script, pattern)</tt>
356
+ def store_eval script, variable_name
357
+ command 'storeEval', script, variable_name
358
+ end
359
+
360
+ # Gets whether a toggle-button (checkbox/radio) is checked. Fails if the
361
+ # specified element doesn't exist or isn't a toggle-button.
362
+ #
363
+ # Related Assertions, automatically generated:
364
+ # * <tt>assert_checked(locator)</tt>
365
+ # * <tt>assert_not_checked(locator)</tt>
366
+ # * <tt>verify_checked_present(locator)</tt>
367
+ # * <tt>verify_not_checked(locator)</tt>
368
+ # * <tt>wait_for_checked(locator)</tt>
369
+ # * <tt>wait_for_not_checked(locator)</tt>
370
+ def store_checked locator, variable_name
371
+ command 'storeChecked', locator, variable_name
372
+ end
373
+
374
+ # Gets the text from a cell of a table.
375
+ #
376
+ # Related Assertions, automatically generated:
377
+ # * <tt>assert_table(locator, row, column, pattern)</tt>
378
+ # * <tt>assert_not_table(locator, row, column, pattern)</tt>
379
+ # * <tt>verify_table_present(locator, row, column, pattern)</tt>
380
+ # * <tt>verify_not_table(locator, row, column, pattern)</tt>
381
+ # * <tt>wait_for_table(locator, row, column, pattern)</tt>
382
+ # * <tt>wait_for_not_table(locator, row, column, pattern)</tt>
383
+ def store_table locator, row, column, variable_name
384
+ command 'storeTable', "#{locator}.#{row}.#{column}", variable_name
385
+ end
386
+
387
+ # Verifies that the selected option of a drop-down satisfies the
388
+ # <tt>option_locator</tt>.
389
+ #
390
+ # <tt>option_locator</tt> is typically just an option label (e.g. "John Smith").
391
+ #
392
+ # See the <tt>select</tt> command for more information about option locators.
393
+ #
394
+ # NOTE: <tt>store_selected</tt> is currently not supported by Selenium Core.
395
+ #
396
+ # Related Assertions, automatically generated:
397
+ # * <tt>assert_selected(locator, option_locator)</tt>
398
+ # * <tt>assert_not_selected(locator, option_locator)</tt>
399
+ # * <tt>verify_selected_present(locator, option_locator)</tt>
400
+ # * <tt>verify_not_selected(locator, option_locator)</tt>
401
+ # * <tt>wait_for_selected(locator, option_locator)</tt>
402
+ # * <tt>wait_for_not_selected(locator, option_locator)</tt>
403
+ def store_selected locator, option_locator, variable_name
404
+ raise 'Not supported in Selenium Core at the moment'
405
+ end
406
+
407
+ # Gets option element ID for selected option in the specified select element.
408
+ #
409
+ # Related Assertions, automatically generated:
410
+ # * <tt>assert_selected_id(select_locator, pattern)</tt>
411
+ # * <tt>assert_not_selected_id(select_locator, pattern)</tt>
412
+ # * <tt>verify_selected_id(select_locator, pattern)</tt>
413
+ # * <tt>verify_not_selected_id(select_locator, pattern)</tt>
414
+ # * <tt>wait_for_selected_id(select_locator, pattern)</tt>
415
+ # * <tt>wait_for_not_selected_id(select_locator, pattern)</tt>
416
+ def store_selected_id select_locator, variable_name
417
+ command 'storeSelectedId', select_locator, variable_name
418
+ end
419
+
420
+ # Gets all option element IDs for selected options in the specified select
421
+ # or multi-select element.
422
+ #
423
+ # Related Assertions, automatically generated:
424
+ # * <tt>assert_selected_ids(select_locator, pattern)</tt>
425
+ # * <tt>assert_not_selected_ids(select_locator, pattern)</tt>
426
+ # * <tt>verify_selected_ids(select_locator, pattern)</tt>
427
+ # * <tt>verify_not_selected_ids(select_locator, pattern)</tt>
428
+ # * <tt>wait_for_selected_ids(select_locator, pattern)</tt>
429
+ # * <tt>wait_for_not_selected_ids(select_locator, pattern)</tt>
430
+ def store_selected_ids select_locator, variable_name
431
+ command 'storeSelectedIds', select_locator, variable_name
432
+ end
433
+
434
+ # Gets option index (option number, starting at 0) for selected option in the
435
+ # specified select element.
436
+ #
437
+ # Related Assertions, automatically generated:
438
+ # * <tt>assert_selected_index(select_locator, pattern)</tt>
439
+ # * <tt>assert_not_selected_index(select_locator, pattern)</tt>
440
+ # * <tt>verify_selected_index(select_locator, pattern)</tt>
441
+ # * <tt>verify_not_selected_index(select_locator, pattern)</tt>
442
+ # * <tt>wait_for_selected_index(select_locator, pattern)</tt>
443
+ # * <tt>wait_for_not_selected_index(select_locator, pattern)</tt>
444
+ def store_selected_index select_locator, variable_name
445
+ command 'storeSelectedIndex', select_locator, variable_name
446
+ end
447
+
448
+ # Gets all option indexes (option number, starting at 0) for selected options
449
+ # in the specified select or multi-select element.
450
+ #
451
+ # Related Assertions, automatically generated:
452
+ # * <tt>assert_selected_indexes(select_locator, pattern)</tt>
453
+ # * <tt>assert_not_selected_indexes(select_locator, pattern)</tt>
454
+ # * <tt>verify_selected_indexes(select_locator, pattern)</tt>
455
+ # * <tt>verify_not_selected_indexes(select_locator, pattern)</tt>
456
+ # * <tt>wait_for_selected_indexes(select_locator, pattern)</tt>
457
+ # * <tt>wait_for_not_selected_indexes(select_locator, pattern)</tt>
458
+ def store_selected_indexes select_locator, variable_name
459
+ command 'storeSelectedIndexes', select_locator, variable_name
460
+ end
461
+
462
+ # Gets option label (visible text) for selected option in the specified select
463
+ # element.
464
+ #
465
+ # Related Assertions, automatically generated:
466
+ # * <tt>assert_selected_label(select_locator, pattern)</tt>
467
+ # * <tt>assert_not_selected_label(select_locator, pattern)</tt>
468
+ # * <tt>verify_selected_label(select_locator, pattern)</tt>
469
+ # * <tt>verify_not_selected_label(select_locator, pattern)</tt>
470
+ # * <tt>wait_for_selected_label(select_locator, pattern)</tt>
471
+ # * <tt>wait_for_not_selected_label(select_locator, pattern)</tt>
472
+ def store_selected_label select_locator, variable_name
473
+ command 'storeSelectedLabel', select_locator, variable_name
474
+ end
475
+
476
+ # Gets all option labels (visible text) for selected options in the specified
477
+ # select or multi-select element.
478
+ #
479
+ # Related Assertions, automatically generated:
480
+ # * <tt>assert_selected_labels(select_locator, pattern)</tt>
481
+ # * <tt>assert_not_selected_labels(select_locator, pattern)</tt>
482
+ # * <tt>verify_selected_labels(select_locator, pattern)</tt>
483
+ # * <tt>verify_not_selected_labels(select_locator, pattern)</tt>
484
+ # * <tt>wait_for_selected_labels(select_locator, pattern)</tt>
485
+ # * <tt>wait_for_not_selected_labels(select_locator, pattern)</tt>
486
+ def store_selected_labels select_locator, variable_name
487
+ command 'storeSelectedLabels', select_locator, variable_name
488
+ end
489
+
490
+ # Gets option value (value attribute) for selected option in the specified
491
+ # select element.
492
+ #
493
+ # Related Assertions, automatically generated:
494
+ # * <tt>assert_selected_value(select_locator, pattern)</tt>
495
+ # * <tt>assert_not_selected_value(select_locator, pattern)</tt>
496
+ # * <tt>verify_selected_value(select_locator, pattern)</tt>
497
+ # * <tt>verify_not_selected_value(select_locator, pattern)</tt>
498
+ # * <tt>wait_for_selected_value(select_locator, pattern)</tt>
499
+ # * <tt>wait_for_not_selected_value(select_locator, pattern)</tt>
500
+ def store_selected_value select_locator, variable_name
501
+ command 'storeSelectedValue', select_locator, variable_name
502
+ end
503
+
504
+ # Gets all option values (value attribute) for selected options in the specified
505
+ # select or multi-select element.
506
+ #
507
+ # Related Assertions, automatically generated:
508
+ # * <tt>assert_selected_values(select_locator, pattern)</tt>
509
+ # * <tt>assert_not_selected_values(select_locator, pattern)</tt>
510
+ # * <tt>verify_selected_values(select_locator, pattern)</tt>
511
+ # * <tt>verify_not_selected_values(select_locator, pattern)</tt>
512
+ # * <tt>wait_for_selected_values(select_locator, pattern)</tt>
513
+ # * <tt>wait_for_not_selected_values(select_locator, pattern)</tt>
514
+ def store_selected_values select_locator, variable_name
515
+ command 'storeSelectedValues', select_locator, variable_name
516
+ end
517
+
518
+ # Determines whether some option in a drop-down menu is selected.
519
+ #
520
+ # Related Assertions, automatically generated:
521
+ # * <tt>assert_something_selected(select_locator)</tt>
522
+ # * <tt>assert_not_something_selected(select_locator)</tt>
523
+ # * <tt>verify_something_selected(select_locator)</tt>
524
+ # * <tt>verify_not_something_selected(select_locator)</tt>
525
+ # * <tt>wait_for_something_selected(select_locator)</tt>
526
+ # * <tt>wait_for_not_something_selected(select_locator)</tt>
527
+ def store_something_selected select_locator, variable_name
528
+ command 'storeSomethingSelected', select_locator, variable_name
529
+ end
530
+
531
+ # Gets all option labels for selected options in the specified select or
532
+ # multi-select element.
533
+ #
534
+ # The +pattern+ for the automatically generated assertions can either take an
535
+ # array or a pattern.
536
+ # assert_selected_options 'fruits', ['apple', 'pear']
537
+ # assert_selected_options 'fruits', 'a*,p*'
538
+ #
539
+ # Related Assertions, automatically generated:
540
+ # * <tt>assert_selected_options(locator, pattern)</tt>
541
+ # * <tt>assert_not_selected_options(locator, pattern)</tt>
542
+ # * <tt>verify_selected_options_present(locator, pattern)</tt>
543
+ # * <tt>verify_not_selected_options(locator, pattern)</tt>
544
+ # * <tt>wait_for_selected_options(locator, pattern)</tt>
545
+ # * <tt>wait_for_not_selected_options(locator, pattern)</tt>
546
+ def store_selected_options locator, variable_name
547
+ command 'storeSelectedOptions', locator, variable_name
548
+ end
549
+
550
+ # Gets all option labels in the specified select drop-down.
551
+ #
552
+ # The +pattern+ for the automatically generated assertions can either take an
553
+ # array or a pattern.
554
+ # assert_select_options 'fruits', ['apple', 'pear']
555
+ # assert_select_options 'fruits', 'a*,p*'
556
+ #
557
+ # Related Assertions, automatically generated:
558
+ # * <tt>assert_select_options(locator, pattern)</tt>
559
+ # * <tt>assert_not_select_options(locator, pattern)</tt>
560
+ # * <tt>verify_select_options_present(locator, pattern)</tt>
561
+ # * <tt>verify_not_select_options(locator, pattern)</tt>
562
+ # * <tt>wait_for_select_options(locator, pattern)</tt>
563
+ # * <tt>wait_for_not_select_options(locator, pattern)</tt>
564
+ def store_select_options locator, variable_name
565
+ command 'storeSelectOptions', locator, variable_name
566
+ end
567
+
568
+ # Gets the value of an element attribute.
569
+ #
570
+ # Related Assertions, automatically generated:
571
+ # * <tt>assert_attribute(locator, attribute_name, pattern)</tt>
572
+ # * <tt>assert_not_attribute(locator, attribute_name, pattern)</tt>
573
+ # * <tt>verify_attribute_present(locator, attribute_name, pattern)</tt>
574
+ # * <tt>verify_not_attribute(locator, attribute_name, pattern)</tt>
575
+ # * <tt>wait_for_attribute(locator, attribute_name, pattern)</tt>
576
+ # * <tt>wait_for_not_attribute(locator, attribute_name, pattern)</tt>
577
+ def store_attribute locator, attribute_name, variable_name
578
+ command 'storeAttribute', "#{locator}@#{attribute_name}", variable_name
579
+ end
580
+
581
+ # Check if these two elements have same parent and are ordered. Two
582
+ # same elements will not be considered ordered.
583
+ #
584
+ # NOTE: <tt>store_ordered</tt> is currently not supported by Selenium Core.
585
+ #
586
+ # Related Assertions, automatically generated:
587
+ # * <tt>assert_ordered(locator_1, locator_2)</tt>
588
+ # * <tt>assert_not_ordered(locator_1, locator_2)</tt>
589
+ # * <tt>verify_ordered(locator_1, locator_2)</tt>
590
+ # * <tt>verify_not_ordered(locator_1, locator_2)</tt>
591
+ # * <tt>wait_for_ordered(locator_1, locator_2)</tt>
592
+ # * <tt>wait_for_not_ordered(locator_1, locator_2)</tt>
593
+ def store_ordered locator_1, locator_2, variable_name
594
+ raise 'Not supported in Selenium Core at the moment'
595
+ end
596
+
597
+ # Verifies that the specified text pattern appears somewhere on the rendered
598
+ # page shown to the user.
599
+ #
600
+ # Related Assertions, automatically generated:
601
+ # * <tt>assert_text_present(pattern)</tt>
602
+ # * <tt>assert_text_not_present(pattern)</tt>
603
+ # * <tt>verify_text_present(pattern)</tt>
604
+ # * <tt>verify_text_not_present(pattern)</tt>
605
+ # * <tt>wait_for_text_present(pattern)</tt>
606
+ # * <tt>wait_for_text_not_present(pattern)</tt>
607
+ def store_text_present pattern, variable_name
608
+ command 'storeTextPresent', pattern, variable_name
609
+ end
610
+
611
+ # Verifies that the specified element is somewhere on the page.
612
+ #
613
+ # Related Assertions, automatically generated:
614
+ # * <tt>assert_element_present(locator)</tt>
615
+ # * <tt>assert_element_not_present(locator)</tt>
616
+ # * <tt>verify_element_present(locator)</tt>
617
+ # * <tt>verify_element_not_present(locator)</tt>
618
+ # * <tt>wait_for_element_present(locator)</tt>
619
+ # * <tt>wait_for_element_not_present(locator)</tt>
620
+ def store_element_present locator, variable_name
621
+ command 'storeElementPresent', locator, variable_name
622
+ end
623
+
624
+ # Determines if the specified element is visible. An element can be rendered
625
+ # invisible by setting the CSS "visibility" property to "hidden", or the
626
+ # "display" property to "none", either for the element itself or one if its
627
+ # ancestors. This method will fail if the element is not present.
628
+ #
629
+ # Related Assertions, automatically generated:
630
+ # * <tt>assert_visible(locator)</tt>
631
+ # * <tt>assert_not_visible(locator)</tt>
632
+ # * <tt>verify_visible(locator)</tt>
633
+ # * <tt>verify_not_visible(locator)</tt>
634
+ # * <tt>wait_for_visible(locator)</tt>
635
+ # * <tt>wait_for_not_visible(locator)</tt>
636
+ def store_visible locator, variable_name
637
+ command 'storeVisible', locator, variable_name
638
+ end
639
+
640
+ # Retrieves the height of an element. This method will fail if the element
641
+ # is not present.
642
+ #
643
+ # Related Assertions, automatically generated:
644
+ # * <tt>assert_element_height(locator, pattern)</tt>
645
+ # * <tt>assert_not_element_height(locator, pattern)</tt>
646
+ # * <tt>verify_element_height(locator, pattern)</tt>
647
+ # * <tt>verify_not_element_height(locator, pattern)</tt>
648
+ # * <tt>wait_for_element_height(locator, pattern)</tt>
649
+ # * <tt>wait_for_not_element_height(locator, pattern)</tt>
650
+ def store_element_height locator, variable_name
651
+ command 'storeElementHeight', locator, variable_name
652
+ end
653
+
654
+ # Get the relative index of an element to its parent (starting from 0).
655
+ # The comment node and empty text node will be ignored.
656
+ #
657
+ # Related Assertions, automatically generated:
658
+ # * <tt>assert_element_index(locator, pattern)</tt>
659
+ # * <tt>assert_not_element_index(locator, pattern)</tt>
660
+ # * <tt>verify_element_index(locator, pattern)</tt>
661
+ # * <tt>verify_not_element_index(locator, pattern)</tt>
662
+ # * <tt>wait_for_element_index(locator, pattern)</tt>
663
+ # * <tt>wait_for_not_element_index(locator, pattern)</tt>
664
+ def store_element_index locator, variable_name
665
+ command 'storeElementIndex', locator, variable_name
666
+ end
667
+
668
+ # Retrieves the width of an element. This method will fail if the element
669
+ # is not present.
670
+ #
671
+ # Related Assertions, automatically generated:
672
+ # * <tt>assert_element_width(locator, pattern)</tt>
673
+ # * <tt>assert_not_element_width(locator, pattern)</tt>
674
+ # * <tt>verify_element_width(locator, pattern)</tt>
675
+ # * <tt>verify_not_element_width(locator, pattern)</tt>
676
+ # * <tt>wait_for_element_width(locator, pattern)</tt>
677
+ # * <tt>wait_for_not_element_width(locator, pattern)</tt>
678
+ def store_element_width locator, variable_name
679
+ command 'storeElementWidth', locator, variable_name
680
+ end
681
+
682
+ # Retrieves the horizontal position of an element. This method will fail
683
+ # if the element is not present.
684
+ #
685
+ # Related Assertions, automatically generated:
686
+ # * <tt>assert_element_position_left(locator, pattern)</tt>
687
+ # * <tt>assert_not_element_position_left(locator, pattern)</tt>
688
+ # * <tt>verify_element_position_left(locator, pattern)</tt>
689
+ # * <tt>verify_not_element_position_left(locator, pattern)</tt>
690
+ # * <tt>wait_for_element_position_left(locator, pattern)</tt>
691
+ # * <tt>wait_for_not_element_position_left(locator, pattern)</tt>
692
+ def store_element_position_left locator, variable_name
693
+ command 'storeElementPositionLeft', locator, variable_name
694
+ end
695
+
696
+ # Retrieves the vertical position of an element. This method will fail
697
+ # if the element is not present.
698
+ #
699
+ # Related Assertions, automatically generated:
700
+ # * <tt>assert_element_position_top(locator, pattern)</tt>
701
+ # * <tt>assert_not_element_position_top(locator, pattern)</tt>
702
+ # * <tt>verify_element_position_top(locator, pattern)</tt>
703
+ # * <tt>verify_not_element_position_top(locator, pattern)</tt>
704
+ # * <tt>wait_for_element_position_top(locator, pattern)</tt>
705
+ # * <tt>wait_for_not_element_position_top(locator, pattern)</tt>
706
+ def store_element_position_top locator, variable_name
707
+ command 'storeElementPositionTop', locator, variable_name
708
+ end
709
+
710
+ # Return the contents of the log.
711
+ #
712
+ # Related Assertions, automatically generated:
713
+ # * <tt>assert_log_messages(pattern)</tt>
714
+ # * <tt>assert_not_log_messages(pattern)</tt>
715
+ # * <tt>verify_log_messages(pattern)</tt>
716
+ # * <tt>verify_not_log_messages(pattern)</tt>
717
+ # * <tt>wait_for_log_messages(pattern)</tt>
718
+ # * <tt>wait_for_not_log_messages(pattern)</tt>
719
+ def store_log_messages variable_name
720
+ command 'storeLogMessages', variable_name
721
+ end
722
+
723
+ # Determines whether the specified input element is editable, i.e. hasn't
724
+ # been disabled. This method will fail if the specified element isn't an
725
+ # input element.
726
+ #
727
+ # Related Assertions, automatically generated:
728
+ # * <tt>assert_editable(locator)</tt>
729
+ # * <tt>assert_not_editable(locator)</tt>
730
+ # * <tt>verify_editable(locator)</tt>
731
+ # * <tt>verify_not_editable(locator)</tt>
732
+ # * <tt>wait_for_editable(locator)</tt>
733
+ # * <tt>wait_for_not_editable(locator)</tt>
734
+ def store_editable locator, variable_name
735
+ command 'storeEditable', locator, variable_name
736
+ end
737
+
738
+ # Returns the IDs of all buttons on the page.
739
+ #
740
+ # If a given button has no ID, it will appear as "" in this array.
741
+ #
742
+ # The +pattern+ for the automatically generated assertions can either take an
743
+ # array or a pattern.
744
+ # assert_all_buttons ['but1', 'but2']
745
+ # assert_all_buttons 'but?,but?*'
746
+ #
747
+ # Related Assertions, automatically generated:
748
+ # * <tt>assert_all_buttons(pattern)</tt>
749
+ # * <tt>assert_not_all_buttons(pattern)</tt>
750
+ # * <tt>verify_all_buttons(pattern)</tt>
751
+ # * <tt>verify_not_all_buttons(pattern)</tt>
752
+ # * <tt>wait_for_all_buttons(pattern)</tt>
753
+ # * <tt>wait_for_not_all_buttons(pattern)</tt>
754
+ def store_all_buttons variable_name
755
+ command 'storeAllButtons', variable_name
756
+ end
757
+
758
+ # Returns the IDs of all links on the page.
759
+ #
760
+ # If a given link has no ID, it will appear as "" in this array.
761
+ #
762
+ # The +pattern+ for the automatically generated assertions can either take an
763
+ # array or a pattern.
764
+ # assert_all_links ['link1', 'link2']
765
+ # assert_all_links 'link?,link?*'
766
+ #
767
+ # Related Assertions, automatically generated:
768
+ # * <tt>assert_all_links(pattern)</tt>
769
+ # * <tt>assert_not_all_links(pattern)</tt>
770
+ # * <tt>verify_all_links(pattern)</tt>
771
+ # * <tt>verify_not_all_links(pattern)</tt>
772
+ # * <tt>wait_for_all_links(pattern)</tt>
773
+ # * <tt>wait_for_not_all_links(pattern)</tt>
774
+ def store_all_links variable_name
775
+ command 'storeAllLinks', variable_name
776
+ end
777
+
778
+ # Returns the IDs of all input fields on the page.
779
+ #
780
+ # If a given field has no ID, it will appear as "" in this array.
781
+ #
782
+ # The +pattern+ for the automatically generated assertions can either take an
783
+ # array or a pattern.
784
+ # assert_all_fields ['field1', 'field2']
785
+ # assert_all_fields 'field?,field?*'
786
+ #
787
+ # Related Assertions, automatically generated:
788
+ # * <tt>assert_all_fields(pattern)</tt>
789
+ # * <tt>assert_not_all_fields(pattern)</tt>
790
+ # * <tt>verify_all_fields(pattern)</tt>
791
+ # * <tt>verify_not_all_fields(pattern)</tt>
792
+ # * <tt>wait_for_all_fields(pattern)</tt>
793
+ # * <tt>wait_for_not_all_fields(pattern)</tt>
794
+ def store_all_fields variable_name
795
+ command 'storeAllFields', variable_name
796
+ end
797
+
798
+ # Returns the entire HTML source between the opening and closing "html" tags.
799
+ #
800
+ # Related Assertions, automatically generated:
801
+ # * <tt>assert_html_source(pattern)</tt>
802
+ # * <tt>assert_not_html_source(pattern)</tt>
803
+ # * <tt>verify_html_source(pattern)</tt>
804
+ # * <tt>verify_not_html_source(pattern)</tt>
805
+ # * <tt>wait_for_html_source(pattern)</tt>
806
+ # * <tt>wait_for_not_html_source(pattern)</tt>
807
+ def store_html_source variable_name
808
+ command 'storeHtmlSource', variable_name
809
+ end
810
+
811
+ # Returns the specified expression.
812
+ #
813
+ # This is useful because of JavaScript preprocessing.
814
+ #
815
+ # Related Assertions, automatically generated:
816
+ # * <tt>assert_expression(expression, pattern)</tt>
817
+ # * <tt>assert_not_expression(expression, pattern)</tt>
818
+ # * <tt>verify_expression(expression, pattern)</tt>
819
+ # * <tt>verify_not_expression(expression, pattern)</tt>
820
+ # * <tt>wait_for_expression(expression, pattern)</tt>
821
+ # * <tt>wait_for_not_expression(expression, pattern)</tt>
822
+ def store_expression expression, variable_name
823
+ command 'storeExpression', expression, variable_name
824
+ end
825
+
826
+ # Determine whether current/locator identify the frame containing this
827
+ # running code.
828
+ #
829
+ # This is useful in proxy injection mode, where this code runs in every
830
+ # browser frame and window, and sometimes the selenium server needs to
831
+ # identify the "current" frame. In this case, when the test calls select_frame,
832
+ # this routine is called for each frame to figure out which one has been
833
+ # selected. The selected frame will return true, while all others will return
834
+ # false.
835
+ #
836
+ # NOTE: <tt>store_whether_this_frame_match_frame_expression</tt> is currently
837
+ # not supported by Selenium Core.
838
+ #
839
+ # Related Assertions, automatically generated:
840
+ # * <tt>assert_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
841
+ # * <tt>assert_not_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
842
+ # * <tt>verify_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
843
+ # * <tt>verify_not_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
844
+ # * <tt>wait_for_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
845
+ # * <tt>wait_for_not_whether_this_frame_match_frame_expression(current_frame_string, target)</tt>
846
+ def store_whether_this_frame_match_frame_expression current_frame_string, target, variable_name
847
+ raise 'Not supported in Selenium Core at the moment'
848
+ end
849
+
850
+ # Determine whether current_window_string plus target identify the window
851
+ # containing this running code.
852
+ #
853
+ # This is useful in proxy injection mode, where this code runs in every browser
854
+ # frame and window, and sometimes the selenium server needs to identify the
855
+ # "current" window. In this case, when the test calls select_window, this routine
856
+ # is called for each window to figure out which one has been selected. The selected
857
+ # window will return true, while all others will return false.
858
+ #
859
+ # NOTE: <tt>store_whether_this_window_match_window_expression</tt> is currently
860
+ # not supported by Selenium Core.
861
+ #
862
+ # Related Assertions, automatically generated:
863
+ # * <tt>assert_whether_this_window_match_window_expression(current_window_string, target)</tt>
864
+ # * <tt>assert_not_whether_this_window_match_window_expression(current_window_string, target)</tt>
865
+ # * <tt>verify_whether_this_window_match_window_expression(current_window_string, target)</tt>
866
+ # * <tt>verify_not_whether_this_window_match_window_expression(current_window_string, target)</tt>
867
+ # * <tt>wait_for_whether_this_window_match_window_expression(current_window_string, target)</tt>
868
+ # * <tt>wait_for_not_whether_this_window_match_window_expression(current_window_string, target)</tt>
869
+ def store_whether_this_window_match_window_expression current_window_string, target, variable_name
870
+ raise 'Not supported in Selenium Core at the moment'
871
+ end
872
+
873
+ private
874
+ # Generates all assertions for the accessors.
875
+ def self.generate_methods
876
+ public_instance_methods.each do |method|
877
+ case method
878
+ when 'store_alert_present',
879
+ 'store_prompt_present',
880
+ 'store_confirmation_present'
881
+ each_assertion method do |assertion_method, command_name|
882
+ define_method assertion_method do
883
+ command command_name
884
+ end
885
+ end
886
+ when 'store_error_on_next',
887
+ 'store_failure_on_next',
888
+ 'store_alert',
889
+ 'store_all_window_ids',
890
+ 'store_all_window_names',
891
+ 'store_all_window_titles',
892
+ 'store_confirmation',
893
+ 'store_cookie',
894
+ 'store_log_messages',
895
+ 'store_mouse_speed',
896
+ 'store_prompt',
897
+ 'store_title',
898
+ 'store_body_text',
899
+ 'store_text_present',
900
+ 'store_element_present',
901
+ 'store_visible',
902
+ 'store_editable',
903
+ 'store_html_source',
904
+ 'store_checked',
905
+ 'store_something_selected'
906
+ each_assertion method do |assertion_method, command_name|
907
+ define_method assertion_method do |pattern|
908
+ command command_name, pattern
909
+ end
910
+ end
911
+ when 'store_attribute_from_all_windows',
912
+ 'store_value',
913
+ 'store_text',
914
+ 'store_eval',
915
+ 'store_cursor_position',
916
+ 'store_selected',
917
+ 'store_selected_id',
918
+ 'store_selected_ids',
919
+ 'store_selected_index',
920
+ 'store_selected_indexes',
921
+ 'store_selected_label',
922
+ 'store_selected_labels',
923
+ 'store_selected_value',
924
+ 'store_selected_values',
925
+ 'store_element_height',
926
+ 'store_element_index',
927
+ 'store_element_width',
928
+ 'store_element_position_left',
929
+ 'store_element_position_top',
930
+ 'store_expression',
931
+ 'store_ordered',
932
+ 'store_whether_this_frame_match_frame_expression',
933
+ 'store_whether_this_window_match_window_expression'
934
+ each_assertion method do |assertion_method, command_name|
935
+ define_method assertion_method do |arg1, arg2|
936
+ command command_name, arg1, arg2
937
+ end
938
+ end
939
+ when 'store_all_buttons',
940
+ 'store_all_links',
941
+ 'store_all_fields'
942
+ each_assertion method do |assertion_method, command_name|
943
+ define_method assertion_method do |pattern|
944
+ command command_name, collection_arg(pattern)
945
+ end
946
+ end
947
+ when 'store_select_options',
948
+ 'store_selected_options'
949
+ each_assertion method do |assertion_method, command_name|
950
+ define_method assertion_method do |locator, pattern|
951
+ command command_name, locator, collection_arg(pattern)
952
+ end
953
+ end
954
+ when 'store_attribute'
955
+ each_assertion method do |assertion_method, command_name|
956
+ define_method assertion_method do |locator, attribute_name, pattern|
957
+ command command_name, "#{locator}@#{attribute_name}", pattern
958
+ end
959
+ end
960
+ when 'store_table'
961
+ each_assertion method do |assertion_method, command_name|
962
+ define_method assertion_method do |locator, row, column, pattern|
963
+ command command_name, "#{locator}.#{row}.#{column}", pattern
964
+ end
965
+ end
966
+ when 'store_absolute_location',
967
+ 'store_location'
968
+ each_assertion method do |assertion_method, command_name|
969
+ define_method assertion_method do |pattern|
970
+ if method == 'store_absolute_location' and pattern.is_a? Hash
971
+ pattern[:only_path] = false
972
+ end
973
+
974
+ command command_name, url_arg(pattern)
975
+ end
976
+ end
977
+ when /^store_/
978
+ raise 'internal error'
979
+ end
980
+ end
981
+ end
982
+
983
+ # Generates all the assertions needed given a +store_method+.
984
+ def self.each_assertion store_method
985
+ before_negation = nil
986
+ after_negation = store_method.split('_')[1..-1] #throw away 'store'
987
+ if after_negation.last == 'present'
988
+ before_negation, after_negation = after_negation, after_negation.pop
989
+ end
990
+
991
+ ['assert', 'verify', ['wait','for']].each do |action|
992
+ [nil, 'not'].each do |negation|
993
+ name = [action, before_negation, negation, after_negation].flatten.reject{|a|a.nil?}
994
+ method_name = name.join '_'
995
+ command = name.inject(name.shift.clone) {|n, p| n << p.capitalize}
996
+ yield method_name, command
997
+ end
998
+ end
999
+ end
1000
+
1001
+ generate_methods
1002
+ end