Permalink
Browse files

initial import

  • Loading branch information...
0 parents commit 22d9b0facb4658f58b553bb68b918439dad4cf22 @ryanb committed Jun 29, 2008
Showing with 28,733 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +125 −0 CHANGELOG
  3. +202 −0 LICENSE-2.0.txt
  4. +193 −0 README
  5. +27 −0 Rakefile
  6. +33 −0 config.yml.example
  7. +19 −0 generators/selenium/USAGE
  8. +50 −0 generators/selenium/selenium_generator.rb
  9. +16 −0 generators/selenium/templates/rhtml.rhtml
  10. +14 −0 generators/selenium/templates/rselenese.rhtml
  11. +11 −0 generators/selenium/templates/selenese.rhtml
  12. +19 −0 init.rb
  13. +119 −0 lib/controllers/selenium_controller.rb
  14. +9 −0 lib/selenium_helper.rb
  15. +11 −0 lib/selenium_on_rails.rb
  16. +212 −0 lib/selenium_on_rails/acceptance_test_runner.rb
  17. +55 −0 lib/selenium_on_rails/fixture_loader.rb
  18. +38 −0 lib/selenium_on_rails/partials_support.rb
  19. +57 −0 lib/selenium_on_rails/paths.rb
  20. +17 −0 lib/selenium_on_rails/renderer.rb
  21. +35 −0 lib/selenium_on_rails/rselenese.rb
  22. +81 −0 lib/selenium_on_rails/selenese.rb
  23. +51 −0 lib/selenium_on_rails/suite_renderer.rb
  24. +113 −0 lib/selenium_on_rails/test_builder.rb
  25. +1,002 −0 lib/selenium_on_rails/test_builder_accessors.rb
  26. +515 −0 lib/selenium_on_rails/test_builder_actions.rb
  27. +91 −0 lib/selenium_on_rails/test_builder_user_accessors.rb.example
  28. +24 −0 lib/selenium_on_rails/test_builder_user_actions.rb.example
  29. +22 −0 lib/selenium_on_rails_config.rb
  30. +18 −0 lib/views/layout.rhtml
  31. +5 −0 lib/views/record.rhtml
  32. +67 −0 lib/views/setup.rhtml
  33. +26 −0 lib/views/test_suite.rhtml
  34. +23 −0 routes.rb
  35. +8 −0 selenium-core/Blank.html
  36. +8 −0 selenium-core/InjectedRemoteRunner.html
  37. +109 −0 selenium-core/RemoteRunner.html
  38. +74 −0 selenium-core/SeleniumLog.html
  39. +123 −0 selenium-core/TestPrompt.html
  40. +55 −0 selenium-core/TestRunner-splash.html
  41. +175 −0 selenium-core/TestRunner.hta
  42. +175 −0 selenium-core/TestRunner.html
  43. BIN selenium-core/domviewer/butmin.gif
  44. BIN selenium-core/domviewer/butplus.gif
  45. +298 −0 selenium-core/domviewer/domviewer.css
  46. +16 −0 selenium-core/domviewer/domviewer.html
  47. +205 −0 selenium-core/domviewer/selenium-domviewer.js
  48. BIN selenium-core/icons/all.png
  49. BIN selenium-core/icons/continue.png
  50. BIN selenium-core/icons/continue_disabled.png
  51. BIN selenium-core/icons/pause.png
  52. BIN selenium-core/icons/pause_disabled.png
  53. BIN selenium-core/icons/selected.png
  54. BIN selenium-core/icons/step.png
  55. BIN selenium-core/icons/step_disabled.png
  56. +1,431 −0 selenium-core/iedoc-core.xml
  57. +1,368 −0 selenium-core/iedoc.xml
  58. +6 −0 selenium-core/lib/cssQuery/cssQuery-p.js
  59. +142 −0 selenium-core/lib/cssQuery/src/cssQuery-level2.js
  60. +150 −0 selenium-core/lib/cssQuery/src/cssQuery-level3.js
  61. +53 −0 selenium-core/lib/cssQuery/src/cssQuery-standard.js
  62. +356 −0 selenium-core/lib/cssQuery/src/cssQuery.js
  63. +2,006 −0 selenium-core/lib/prototype.js
  64. +101 −0 selenium-core/lib/scriptaculous/builder.js
  65. +815 −0 selenium-core/lib/scriptaculous/controls.js
  66. +915 −0 selenium-core/lib/scriptaculous/dragdrop.js
  67. +958 −0 selenium-core/lib/scriptaculous/effects.js
  68. +47 −0 selenium-core/lib/scriptaculous/scriptaculous.js
  69. +283 −0 selenium-core/lib/scriptaculous/slider.js
  70. +383 −0 selenium-core/lib/scriptaculous/unittest.js
  71. +69 −0 selenium-core/scripts/find_matching_child.js
  72. +842 −0 selenium-core/scripts/htmlutils.js
  73. +79 −0 selenium-core/scripts/injection.html
  74. +7 −0 selenium-core/scripts/injection_iframe.html
  75. +70 −0 selenium-core/scripts/js2html.js
  76. +175 −0 selenium-core/scripts/narcissus-defs.js
  77. +1,054 −0 selenium-core/scripts/narcissus-exec.js
  78. +1,003 −0 selenium-core/scripts/narcissus-parse.js
  79. +63 −0 selenium-core/scripts/se2html.js
  80. +2,329 −0 selenium-core/scripts/selenium-api.js
  81. +1,946 −0 selenium-core/scripts/selenium-browserbot.js
  82. +142 −0 selenium-core/scripts/selenium-browserdetect.js
  83. +375 −0 selenium-core/scripts/selenium-commandhandlers.js
  84. +177 −0 selenium-core/scripts/selenium-executionloop.js
  85. +139 −0 selenium-core/scripts/selenium-logging.js
  86. +466 −0 selenium-core/scripts/selenium-remoterunner.js
  87. +1,281 −0 selenium-core/scripts/selenium-testrunner.js
  88. +5 −0 selenium-core/scripts/selenium-version.js
  89. +75 −0 selenium-core/scripts/user-extensions.js.sample
  90. +153 −0 selenium-core/scripts/xmlextras.js
  91. BIN selenium-core/selenium-logo.png
  92. +43 −0 selenium-core/selenium-test.css
  93. +299 −0 selenium-core/selenium.css
  94. +428 −0 selenium-core/xpath/dom.js
  95. +255 −0 selenium-core/xpath/misc.js
  96. +2,182 −0 selenium-core/xpath/xpath.js
  97. +20 −0 switch_environment/init.rb
  98. +16 −0 switch_environment/switch_environment_controller.rb
  99. +8 −0 tasks/test_acceptance.rake
  100. +147 −0 test/renderer_test.rb
  101. +672 −0 test/rselenese_test.rb
  102. +229 −0 test/selenese_test.rb
  103. +48 −0 test/selenium_controller_test.rb
  104. +33 −0 test/selenium_support_test.rb
  105. +29 −0 test/setup_test.rb
  106. +173 −0 test/suite_renderer_test.rb
  107. +70 −0 test/test_helper.rb
  108. 0 test_data/.hidden.html
  109. +1 −0 test_data/_partial.rsel
  110. +6 −0 test_data/html.html
  111. +12 −0 test_data/own_layout.html
  112. +6 −0 test_data/partials/_html.html
  113. +2 −0 test_data/partials/_nesting.rsel
  114. +6 −0 test_data/partials/_rhtml.rhtml
  115. +1 −0 test_data/partials/_rsel.rsel
  116. +5 −0 test_data/partials/_sel.sel
  117. +5 −0 test_data/partials/all_partials.rsel
  118. +7 −0 test_data/rhtml.rhtml
  119. +8 −0 test_data/rselenese.rsel
  120. +7 −0 test_data/selenese.sel
  121. +1 −0 test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel
  122. +1 −0 test_data/suite_one/suite_one_testcase1.sel
  123. +1 −0 test_data/suite_one/suite_one_testcase2.sel
  124. +1 −0 test_data/suite_two/suite_two_testcase.sel
@@ -0,0 +1 @@
+doc
125 CHANGELOG
@@ -0,0 +1,125 @@
+== REVISION 38[http://svn.openqa.org/fisheye/changelog/selenium-on-rails/?cs=38]
+
+=== change made by Flanagan
+
+* SOR-13[http://jira.openqa.org/browse/SOR-13] Corrected an omission of require statements.
+
+== REVISION 37
+
+=== change made by Flanagan
+
+* Undone an unwanted commit of modified Rakefile.
+
+== REVISION 36[http://svn.openqa.org/fisheye/changelog/selenium-on-rails/?cs=36]
+
+=== change made by Flanagan
+
+* SOR-13[http://jira.openqa.org/browse/SOR-13] Added (experimental) support for user-extensions.js.
+
+== REVISION 35[http://svn.openqa.org/fisheye/changelog/selenium-on-rails/?cs=35]
+
+=== all changes made by Jonas
+
+* SOR-12[http://jira.openqa.org/browse/SOR-12] removed all support for selenium gem
+* Selenium Core 0.8.2 is now bundled with Selenium on Rails. If you want to use other version set the 'selenium_path' in config.yml
+* Updated installation instructions for Windows
+
+== REVISION 34[http://svn.openqa.org/fisheye/changelog/selenium-on-rails/?cs=34]
+
+=== all changes made by Flanagan
+
+* SOR-11[http://jira.openqa.org/browse/SOR-11] Fixed related assertions for store_checked to use only locator parameter
+
+Warning: Users must change tests that pass two parameters (locator, pattern) to +verify_checked+, +verify_not_checked+, +assert_checked+, +assert_not_checked+, +wait_for_checked+, or +wait_for_not_checked+.
+
+Test scripts that continue to use two parameters will be broken, only one parameter, the locator, should be passed.
+
+For example, <tt>|verify_checked|my_checkbox|true|</tt> will be interpreted as <tt>|verify_checked|my_checkboxtrue||</tt> so change the test to <tt>|verify_checked|my_checkbox||</tt>
+
+* SOR-9[http://jira.openqa.org/browse/SOR-9] Added Mac OS X browsers to config.yml.example
+* SOR-10[http://jira.openqa.org/browse/SOR-10] Added support for baseUrl to acceptance_test_runner.rb as added to selenium-core 0.8.2
+* Added 'webrick' to SERVER_COMMAND in acceptance_test_runner.rb as parameters do not work with lighttpd
+* Reversed expected query string in test/renderer_testrb to make tests pass
+
+Note: On Mac OS X, at least, clear_tables comes before fixtures in the query string; this may be an environment-specific issue if the test now fails on other OSes.
+
+* Added this CHANGELOG file and amended the rake rdoc task to include it
+
+* Added support in rselenese for a long list of actions and accessors that are included in selenium-core (0.8.2 and possibly earlier) but were previously missing in selenium-on-rails.
+
+Here are the newly supported actions:
+
+Useful for debugging:
+* <tt>brake</tt> (alias for selenium-core's break, a reserved word in Ruby)
+* <tt>echo, :string</tt>
+* <tt>highlight, :locator</tt>
+
+Keyboard events:
+* <tt>alt_key_down</tt>
+* <tt>alt_key_up</tt>
+* <tt>control_key_down</tt>
+* <tt>control_key_up</tt>
+* <tt>meta_key_down</tt>
+* <tt>meta_key_up</tt>
+* <tt>shift_key_down</tt>
+* <tt>shift_key_up</tt>
+* <tt>type_keys, :locator, :string</tt>
+
+Mouse events:
+* <tt>click_at, :locator, :coord_string</tt>
+* <tt>double_click, :locator</tt>
+* <tt>double_click_at, :locator, :coord_string</tt>
+* <tt>drag_and_drop, :locator, :movements_string</tt>
+* <tt>drag_and_drop_to_object, :locator, :locator</tt>
+* <tt>mouse_down_at, :locator, :coord_string</tt>
+* <tt>mouse_move, :locator</tt>
+* <tt>mouse_move_at, :locator, :coord_string</tt>
+* <tt>mouse_out, :locator</tt>
+* <tt>mouse_up, :locator</tt>
+* <tt>mouse_up_at, :locator, :coord_string</tt>
+* <tt>set_mouse_speed, :integer</tt>
+
+Other actions:
+* <tt>create_cookie, :name_value_pair, :options_string</tt>
+* <tt>delete_cookie, :string, :string</tt>
+* <tt>open_window, :url, :integer</tt>
+* <tt>pause, :timeout</tt>
+* <tt>remove_all_selections, :locator</tt>
+* <tt>select_frame, :locator</tt>
+* <tt>set_cursor_position, :locator, :integer</tt>
+* <tt>store, :script, :variable</tt>
+* <tt>window_focus, :window_name</tt>
+* <tt>window_maximize, :window_name</tt>
+
+Here are the newly supported accessors:
+
+The following store_* accessors and their associated assert, verify and wait_for brethren are fully supported:
+* <tt>store_selected_id, :locator, :variable</tt>
+* <tt>store_selected_ids, :locator, :variable</tt>
+* <tt>store_selected_index, :locator, :variable</tt>
+* <tt>store_selected_indexes, :locator, :variable</tt>
+* <tt>store_selected_label, :locator, :variable</tt>
+* <tt>store_selected_labels, :locator, :variable</tt>
+* <tt>store_selected_value, :locator, :variable</tt>
+* <tt>store_selected_values, :locator, :variable</tt>
+* <tt>store_something_selected, :locator, :variable</tt>
+* <tt>store_all_window_ids, :variable</tt>
+* <tt>store_all_window_names, :variable</tt>
+* <tt>store_all_window_titles, :variable</tt>
+* <tt>store_cookie, :variable</tt>
+* <tt>store_log_messages, :variable</tt>
+* <tt>store_mouse_speed, :variable</tt>
+* <tt>store_cursor_position, :locator, :variable</tt>
+* <tt>store_attribute_from_all_windows, :attribute_name, :variable</tt>
+* <tt>store_element_height, :locator, :variable</tt>
+* <tt>store_element_index, :locator, :variable</tt>
+* <tt>store_element_width, :locator, :variable</tt>
+* <tt>store_element_position_left, :locator, :variable</tt>
+* <tt>store_element_position_top, :locator, :variable</tt>
+
+Only the associated assert, verify and wait_for brethren of the following store_* accessors are supported by the selenium-core, so these store_* accessors create exceptions in SOR:
+* <tt>store_ordered, :locator, :locator, :variable</tt>
+* <tt>store_error_on_next, :string</tt>
+* <tt>store_failure_on_next, :string</tt>
+* <tt>store_whether_this_frame_match_frame_expression, :string, :string, :variable</tt>
+* <tt>store_whether_this_window_match_window_expression, :string, :string, :variable</tt>
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Oops, something went wrong.

0 comments on commit 22d9b0f

Please sign in to comment.