rubinium 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/CHANGES +7 -0
  2. data/MIT-LICENSE +21 -0
  3. data/README +137 -0
  4. data/Rakefile +139 -0
  5. data/TODO +7 -0
  6. data/doc/examples/rtc_site_live.rb +12 -0
  7. data/doc/examples/rts_main.rb +9 -0
  8. data/doc/examples/rts_shared_code.rb +25 -0
  9. data/lib/rubinium.rb +9 -0
  10. data/lib/rubinium/string.rb +3 -0
  11. data/lib/rubinium/test_base.rb +80 -0
  12. data/lib/rubinium/test_suite.rb +53 -0
  13. data/lib/rubinium/validator.rb +16 -0
  14. data/test/selenium_tests/test_click.rb +22 -0
  15. data/test/selenium_tests/test_open.rb +11 -0
  16. data/test/tc_file_creation.rb +60 -0
  17. data/test/ts_rubinium.rb +1 -0
  18. data/vendor/selenium-0.6.0/install-readme.txt +9 -0
  19. data/vendor/selenium-0.6.0/selenium/SeleneseRunner.html +253 -0
  20. data/vendor/selenium-0.6.0/selenium/SeleniumLog.html +61 -0
  21. data/vendor/selenium-0.6.0/selenium/TestRunner-splash.html +55 -0
  22. data/vendor/selenium-0.6.0/selenium/TestRunner.hta +146 -0
  23. data/vendor/selenium-0.6.0/selenium/TestRunner.html +146 -0
  24. data/vendor/selenium-0.6.0/selenium/devtests/TestClickInFrame.html +58 -0
  25. data/vendor/selenium-0.6.0/selenium/devtests/TestOpenInFrame.html +48 -0
  26. data/vendor/selenium-0.6.0/selenium/devtests/TestOpenInNewWindow.html +78 -0
  27. data/vendor/selenium-0.6.0/selenium/devtests/TestOpenMeta.html +43 -0
  28. data/vendor/selenium-0.6.0/selenium/devtests/TestSuite.html +39 -0
  29. data/vendor/selenium-0.6.0/selenium/devtests/meta/page.html +5 -0
  30. data/vendor/selenium-0.6.0/selenium/dom-images/butmin.gif +0 -0
  31. data/vendor/selenium-0.6.0/selenium/dom-images/butplus.gif +0 -0
  32. data/vendor/selenium-0.6.0/selenium/dom-styles/default.css +298 -0
  33. data/vendor/selenium-0.6.0/selenium/domviewer.html +16 -0
  34. data/vendor/selenium-0.6.0/selenium/html-xpath/carnation.jpg +0 -0
  35. data/vendor/selenium-0.6.0/selenium/html-xpath/example.html +75 -0
  36. data/vendor/selenium-0.6.0/selenium/html-xpath/html-xpath-patched.js +657 -0
  37. data/vendor/selenium-0.6.0/selenium/html-xpath/html-xpath.js +610 -0
  38. data/vendor/selenium-0.6.0/selenium/html-xpath/license.txt +504 -0
  39. data/vendor/selenium-0.6.0/selenium/html-xpath/rainbow.jpg +0 -0
  40. data/vendor/selenium-0.6.0/selenium/htmlutils.js +283 -0
  41. data/vendor/selenium-0.6.0/selenium/index.html +60 -0
  42. data/vendor/selenium-0.6.0/selenium/jsmock/mock-tests.html +205 -0
  43. data/vendor/selenium-0.6.0/selenium/jsmock/mock.js +124 -0
  44. data/vendor/selenium-0.6.0/selenium/selenium-api.js +683 -0
  45. data/vendor/selenium-0.6.0/selenium/selenium-browserbot.js +930 -0
  46. data/vendor/selenium-0.6.0/selenium/selenium-commandhandlers.js +286 -0
  47. data/vendor/selenium-0.6.0/selenium/selenium-domviewer.js +188 -0
  48. data/vendor/selenium-0.6.0/selenium/selenium-executionloop.js +250 -0
  49. data/vendor/selenium-0.6.0/selenium/selenium-fitrunner.js +597 -0
  50. data/vendor/selenium-0.6.0/selenium/selenium-logging.js +88 -0
  51. data/vendor/selenium-0.6.0/selenium/selenium-logo.png +0 -0
  52. data/vendor/selenium-0.6.0/selenium/selenium-tableparser.js +50 -0
  53. data/vendor/selenium-0.6.0/selenium/selenium.css +211 -0
  54. data/vendor/selenium-0.6.0/selenium/tests/ErrorCheckingTestSuite.html +36 -0
  55. data/vendor/selenium-0.6.0/selenium/tests/GoogleTestSearch.html +69 -0
  56. data/vendor/selenium-0.6.0/selenium/tests/GoogleTestSuite.html +32 -0
  57. data/vendor/selenium-0.6.0/selenium/tests/JsUnitSuite.html +38 -0
  58. data/vendor/selenium-0.6.0/selenium/tests/TestClick.html +128 -0
  59. data/vendor/selenium-0.6.0/selenium/tests/TestClickJavascriptHref.html +115 -0
  60. data/vendor/selenium-0.6.0/selenium/tests/TestCommandError.html +79 -0
  61. data/vendor/selenium-0.6.0/selenium/tests/TestConfirmations.html +77 -0
  62. data/vendor/selenium-0.6.0/selenium/tests/TestErrorChecking.html +71 -0
  63. data/vendor/selenium-0.6.0/selenium/tests/TestFailingAssert.html +59 -0
  64. data/vendor/selenium-0.6.0/selenium/tests/TestFailingVerifications.html +198 -0
  65. data/vendor/selenium-0.6.0/selenium/tests/TestFocusOnBlur.html +53 -0
  66. data/vendor/selenium-0.6.0/selenium/tests/TestGoBack.html +81 -0
  67. data/vendor/selenium-0.6.0/selenium/tests/TestImplicitLocators.html +81 -0
  68. data/vendor/selenium-0.6.0/selenium/tests/TestJavascriptParameters.html +91 -0
  69. data/vendor/selenium-0.6.0/selenium/tests/TestLocators.html +161 -0
  70. data/vendor/selenium-0.6.0/selenium/tests/TestModalDialog.html +58 -0
  71. data/vendor/selenium-0.6.0/selenium/tests/TestModalDialogDialog.html +48 -0
  72. data/vendor/selenium-0.6.0/selenium/tests/TestOpen.html +66 -0
  73. data/vendor/selenium-0.6.0/selenium/tests/TestPatternMatching.html +127 -0
  74. data/vendor/selenium-0.6.0/selenium/tests/TestPause.html +78 -0
  75. data/vendor/selenium-0.6.0/selenium/tests/TestPrompting.html +82 -0
  76. data/vendor/selenium-0.6.0/selenium/tests/TestProxy.html +62 -0
  77. data/vendor/selenium-0.6.0/selenium/tests/TestSelect.html +111 -0
  78. data/vendor/selenium-0.6.0/selenium/tests/TestSelectWindow.html +106 -0
  79. data/vendor/selenium-0.6.0/selenium/tests/TestStore.html +165 -0
  80. data/vendor/selenium-0.6.0/selenium/tests/TestSuite-InternetExplorer.html +79 -0
  81. data/vendor/selenium-0.6.0/selenium/tests/TestSuite-Konqueror.html +75 -0
  82. data/vendor/selenium-0.6.0/selenium/tests/TestSuite-Safari.html +75 -0
  83. data/vendor/selenium-0.6.0/selenium/tests/TestSuite.html +75 -0
  84. data/vendor/selenium-0.6.0/selenium/tests/TestType.html +79 -0
  85. data/vendor/selenium-0.6.0/selenium/tests/TestUserExtensions.html +81 -0
  86. data/vendor/selenium-0.6.0/selenium/tests/TestVerifications.html +164 -0
  87. data/vendor/selenium-0.6.0/selenium/tests/TestVerifyAlerts.html +80 -0
  88. data/vendor/selenium-0.6.0/selenium/tests/TestVerifyAlertsFailures.html +108 -0
  89. data/vendor/selenium-0.6.0/selenium/tests/TestVerifyConfirmationFailures.html +86 -0
  90. data/vendor/selenium-0.6.0/selenium/tests/TestVerifyEditable.html +70 -0
  91. data/vendor/selenium-0.6.0/selenium/tests/TestVerifyEditableFailures.html +95 -0
  92. data/vendor/selenium-0.6.0/selenium/tests/TestVisibility.html +91 -0
  93. data/vendor/selenium-0.6.0/selenium/tests/TestVisibilityFailures.html +131 -0
  94. data/vendor/selenium-0.6.0/selenium/tests/TestWait.html +112 -0
  95. data/vendor/selenium-0.6.0/selenium/tests/TestWaitFor.html +63 -0
  96. data/vendor/selenium-0.6.0/selenium/tests/TestWaitInPopupWindow.html +94 -0
  97. data/vendor/selenium-0.6.0/selenium/tests/TestXPathLocators.html +98 -0
  98. data/vendor/selenium-0.6.0/selenium/tests/browserbot/alert-handling-tests.html +79 -0
  99. data/vendor/selenium-0.6.0/selenium/tests/browserbot/assert-tests.html +113 -0
  100. data/vendor/selenium-0.6.0/selenium/tests/browserbot/browserbot-tests.html +123 -0
  101. data/vendor/selenium-0.6.0/selenium/tests/browserbot/command-factory-tests.html +290 -0
  102. data/vendor/selenium-0.6.0/selenium/tests/browserbot/command-handler-tests.html +115 -0
  103. data/vendor/selenium-0.6.0/selenium/tests/browserbot/confirm-handling-tests.html +97 -0
  104. data/vendor/selenium-0.6.0/selenium/tests/browserbot/error-checking-command-tests.html +198 -0
  105. data/vendor/selenium-0.6.0/selenium/tests/browserbot/event-bubble-tests.html +106 -0
  106. data/vendor/selenium-0.6.0/selenium/tests/browserbot/optionlocator-tests.html +180 -0
  107. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-accessor-tests.html +65 -0
  108. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-action-tests.html +200 -0
  109. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-attribute-tests.html +98 -0
  110. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-locator-tests-include.html +33 -0
  111. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-locator-tests.html +258 -0
  112. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-property-tests.html +49 -0
  113. data/vendor/selenium-0.6.0/selenium/tests/browserbot/pattern-matcher-tests.html +66 -0
  114. data/vendor/selenium-0.6.0/selenium/tests/browserbot/selenium-api-tests.html +412 -0
  115. data/vendor/selenium-0.6.0/selenium/tests/browserbot/selenium-parameter-tests.html +98 -0
  116. data/vendor/selenium-0.6.0/selenium/tests/browserbot/suite.html +52 -0
  117. data/vendor/selenium-0.6.0/selenium/tests/browserbot/testloop-handle-error-tests.html +74 -0
  118. data/vendor/selenium-0.6.0/selenium/tests/events/TestButtonEvents.html +72 -0
  119. data/vendor/selenium-0.6.0/selenium/tests/events/TestCheckboxEvents.html +107 -0
  120. data/vendor/selenium-0.6.0/selenium/tests/events/TestFireEvents.html +75 -0
  121. data/vendor/selenium-0.6.0/selenium/tests/events/TestLinkEvents.html +43 -0
  122. data/vendor/selenium-0.6.0/selenium/tests/events/TestRadioEvents.html +149 -0
  123. data/vendor/selenium-0.6.0/selenium/tests/events/TestSelectEvents.html +122 -0
  124. data/vendor/selenium-0.6.0/selenium/tests/events/TestTextEvents.html +87 -0
  125. data/vendor/selenium-0.6.0/selenium/tests/events/readme.txt +26 -0
  126. data/vendor/selenium-0.6.0/selenium/tests/html/banner.gif +0 -0
  127. data/vendor/selenium-0.6.0/selenium/tests/html/test_async_event.html +36 -0
  128. data/vendor/selenium-0.6.0/selenium/tests/html/test_click_javascript_page.html +34 -0
  129. data/vendor/selenium-0.6.0/selenium/tests/html/test_click_page1.html +31 -0
  130. data/vendor/selenium-0.6.0/selenium/tests/html/test_click_page2.html +30 -0
  131. data/vendor/selenium-0.6.0/selenium/tests/html/test_confirm.html +34 -0
  132. data/vendor/selenium-0.6.0/selenium/tests/html/test_dummy_page.html +26 -0
  133. data/vendor/selenium-0.6.0/selenium/tests/html/test_editable.html +36 -0
  134. data/vendor/selenium-0.6.0/selenium/tests/html/test_focus_on_blur.html +33 -0
  135. data/vendor/selenium-0.6.0/selenium/tests/html/test_form_events.html +98 -0
  136. data/vendor/selenium-0.6.0/selenium/tests/html/test_framed_page.html +7 -0
  137. data/vendor/selenium-0.6.0/selenium/tests/html/test_just_text.html +22 -0
  138. data/vendor/selenium-0.6.0/selenium/tests/html/test_locators.html +34 -0
  139. data/vendor/selenium-0.6.0/selenium/tests/html/test_modal_dialog.html +29 -0
  140. data/vendor/selenium-0.6.0/selenium/tests/html/test_modal_dialog_dialog.html +35 -0
  141. data/vendor/selenium-0.6.0/selenium/tests/html/test_open.html +23 -0
  142. data/vendor/selenium-0.6.0/selenium/tests/html/test_prompt.html +34 -0
  143. data/vendor/selenium-0.6.0/selenium/tests/html/test_reload_onchange_page.html +32 -0
  144. data/vendor/selenium-0.6.0/selenium/tests/html/test_select.html +35 -0
  145. data/vendor/selenium-0.6.0/selenium/tests/html/test_select_window.html +29 -0
  146. data/vendor/selenium-0.6.0/selenium/tests/html/test_select_window_popup.html +28 -0
  147. data/vendor/selenium-0.6.0/selenium/tests/html/test_slowloading_page.html +27 -0
  148. data/vendor/selenium-0.6.0/selenium/tests/html/test_store_value.html +23 -0
  149. data/vendor/selenium-0.6.0/selenium/tests/html/test_type_page1.html +37 -0
  150. data/vendor/selenium-0.6.0/selenium/tests/html/test_type_page2.html +61 -0
  151. data/vendor/selenium-0.6.0/selenium/tests/html/test_verifications.html +42 -0
  152. data/vendor/selenium-0.6.0/selenium/tests/html/test_verify_alert.html +46 -0
  153. data/vendor/selenium-0.6.0/selenium/tests/html/test_visibility.html +53 -0
  154. data/vendor/selenium-0.6.0/selenium/tests/readme.txt +1 -0
  155. data/vendor/selenium-0.6.0/selenium/tests/tableparser/tableparser-tests.html +122 -0
  156. data/vendor/selenium-0.6.0/selenium/tests/tinyWebServer.py +70 -0
  157. data/vendor/selenium-0.6.0/selenium/user-extensions.js.sample +62 -0
  158. data/vendor/selenium-0.6.0/selenium/version.txt +1 -0
  159. data/vendor/selenium-0.6.0/selenium/xmlextras.js +153 -0
  160. data/vendor/selenium-0.6.0/selenium/xpath.js +3910 -0
  161. metadata +216 -0
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <!--
3
+ Copyright 2004 ThoughtWorks, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <html>
18
+ <head>
19
+ <meta content="text/html; charset=ISO-8859-1"
20
+ http-equiv="content-type">
21
+ <title>Test Click Link Events</title>
22
+ </head>
23
+ <body>
24
+ <table cellpadding="1" cellspacing="1" border="1">
25
+ <tbody>
26
+ <tr>
27
+ <td rowspan="1" colspan="3">Test Click Link Events<br>
28
+ </td>
29
+ </tr>
30
+ <tr><td>open</td><td>./tests/html/test_form_events.html</td><td>&nbsp;</td></tr>
31
+ <tr><td>verifyValue</td><td>eventlog</td><td>&nbsp;</td></tr>
32
+
33
+ <!-- Click the button -->
34
+ <tr><td>click</td><td>theLink</td><td></td></tr>
35
+ <tr><td>verifyValue</td><td>eventlog</td><td>{focus(theLink)} {click(theLink)} {blur(theLink)}</td></tr>
36
+ <tr><td>verifyAlert</td><td>link clicked</td><td/></tr>
37
+
38
+ <!-- Perform another action to ensure that there are no more alerts -->
39
+ <tr><td>click</td><td>theButton</td><td></td></tr>
40
+ </tbody>
41
+ </table>
42
+ </body>
43
+ </html>
@@ -0,0 +1,149 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <!--
3
+ Copyright 2004 ThoughtWorks, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <html>
18
+ <head>
19
+ <meta content="text/html; charset=ISO-8859-1"
20
+ http-equiv="content-type">
21
+ <title>Test Radio Button Events</title>
22
+ </head>
23
+ <body>
24
+ <table cellpadding="1" cellspacing="1" border="1">
25
+ <tbody>
26
+ <tr>
27
+ <td rowspan="1" colspan="3">Test Radio Button Events<br>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>open</td>
32
+ <td>./tests/html/test_form_events.html</td>
33
+ <td>&nbsp;</td>
34
+ </tr>
35
+ <tr>
36
+ <td>verifyValue</td>
37
+ <td>theRadio1</td>
38
+ <td>off</td>
39
+ </tr>
40
+ <tr>
41
+ <td>verifyValue</td>
42
+ <td>theRadio2</td>
43
+ <td>off</td>
44
+ </tr>
45
+ <tr>
46
+ <td>verifyValue</td>
47
+ <td>eventlog</td>
48
+ <td>&nbsp;</td>
49
+ </tr>
50
+
51
+ <!-- Check the first radio -->
52
+ <tr>
53
+ <td>click</td>
54
+ <td>theRadio1</td>
55
+ <td></td>
56
+ </tr>
57
+ <tr>
58
+ <td>verifyValue</td>
59
+ <td>theRadio1</td>
60
+ <td>on</td>
61
+ </tr>
62
+ <tr>
63
+ <td>verifyValue</td>
64
+ <td>theRadio2</td>
65
+ <td>off</td>
66
+ </tr>
67
+ <tr>
68
+ <td>verifyValue</td>
69
+ <td>eventlog</td>
70
+ <td>{focus(theRadio1)} * {blur(theRadio1)}</td>
71
+ </tr>
72
+ <tr>
73
+ <td>verifyValue</td>
74
+ <td>eventlog</td>
75
+ <td>* {click(theRadio1)} *</td>
76
+ </tr>
77
+ <tr>
78
+ <td>verifyValue</td>
79
+ <td>eventlog</td>
80
+ <td>* {change(theRadio1)} *</td>
81
+ </tr>
82
+
83
+ <!-- Click the other radio -->
84
+ <tr>
85
+ <td>type</td>
86
+ <td>eventlog</td>
87
+ <td>&nbsp;</td>
88
+ </tr>
89
+ <tr>
90
+ <td>click</td>
91
+ <td>theRadio2</td>
92
+ <td></td>
93
+ </tr>
94
+ <tr>
95
+ <td>verifyValue</td>
96
+ <td>theRadio1</td>
97
+ <td>off</td>
98
+ </tr>
99
+ <tr>
100
+ <td>verifyValue</td>
101
+ <td>theRadio2</td>
102
+ <td>on</td>
103
+ </tr>
104
+ <tr>
105
+ <td>verifyValue</td>
106
+ <td>eventlog</td>
107
+ <td>{focus(theRadio2)} * {blur(theRadio2)}</td>
108
+ </tr>
109
+ <tr>
110
+ <td>verifyValue</td>
111
+ <td>eventlog</td>
112
+ <td>* {click(theRadio2)} *</td>
113
+ </tr>
114
+ <tr>
115
+ <td>verifyValue</td>
116
+ <td>eventlog</td>
117
+ <td>* {change(theRadio2)} *</td>
118
+ </tr>
119
+
120
+ <!-- Click the same radio again, shouldn't trigger a change event -->
121
+ <tr>
122
+ <td>type</td>
123
+ <td>eventlog</td>
124
+ <td>&nbsp;</td>
125
+ </tr>
126
+ <tr>
127
+ <td>click</td>
128
+ <td>theRadio2</td>
129
+ <td></td>
130
+ </tr>
131
+ <tr>
132
+ <td>verifyValue</td>
133
+ <td>theRadio1</td>
134
+ <td>off</td>
135
+ </tr>
136
+ <tr>
137
+ <td>verifyValue</td>
138
+ <td>theRadio2</td>
139
+ <td>on</td>
140
+ </tr>
141
+ <tr>
142
+ <td>verifyValue</td>
143
+ <td>eventlog</td>
144
+ <td>{focus(theRadio2)} {click(theRadio2)} {blur(theRadio2)}</td>
145
+ </tr>
146
+ </tbody>
147
+ </table>
148
+ </body>
149
+ </html>
@@ -0,0 +1,122 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <!--
3
+ Copyright 2004 ThoughtWorks, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <html>
18
+ <head>
19
+ <meta content="text/html; charset=ISO-8859-1"
20
+ http-equiv="content-type">
21
+ <title>Test Select Events</title>
22
+ </head>
23
+ <body>
24
+ <table cellpadding="1" cellspacing="1" border="1">
25
+ <tbody>
26
+ <tr>
27
+ <td rowspan="1" colspan="3">Test Select Events<br>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>open</td>
32
+ <td>./tests/html/test_form_events.html</td>
33
+ <td>&nbsp;</td>
34
+ </tr>
35
+ <tr>
36
+ <td>verifyValue</td>
37
+ <td>theSelect</td>
38
+ <td>&nbsp;</td>
39
+ </tr>
40
+ <tr>
41
+ <td>verifyValue</td>
42
+ <td>eventlog</td>
43
+ <td>&nbsp;</td>
44
+ </tr>
45
+
46
+ <!-- Select an option -->
47
+ <tr>
48
+ <td>select</td>
49
+ <td>theSelect</td>
50
+ <td>First Option</td>
51
+ </tr>
52
+ <tr>
53
+ <td>verifyValue</td>
54
+ <td>theSelect</td>
55
+ <td>option1</td>
56
+ </tr>
57
+ <tr>
58
+ <td>verifyValue</td>
59
+ <td>eventlog</td>
60
+ <td>{focus(theSelect)} {change(theSelect)} {blur(theSelect)}</td>
61
+ </tr>
62
+
63
+ <!-- Select the same option again-->
64
+ <tr>
65
+ <td>type</td>
66
+ <td>eventlog</td>
67
+ <td>&nbsp;</td>
68
+ </tr>
69
+ <tr>
70
+ <td>select</td>
71
+ <td>theSelect</td>
72
+ <td>First Option</td>
73
+ </tr>
74
+ <tr>
75
+ <td>verifyValue</td>
76
+ <td>theSelect</td>
77
+ <td>option1</td>
78
+ </tr>
79
+ <tr>
80
+ <td>verifyValue</td>
81
+ <td>eventlog</td>
82
+ <td>{focus(theSelect)} {blur(theSelect)}</td>
83
+ </tr>
84
+
85
+ <!-- Select the option with no value-->
86
+ <tr>
87
+ <td>type</td>
88
+ <td>eventlog</td>
89
+ <td>&nbsp;</td>
90
+ </tr>
91
+ <tr>
92
+ <td>select</td>
93
+ <td>theSelect</td>
94
+ <td>Empty Option</td>
95
+ </tr>
96
+ <tr>
97
+ <td>verifyValue</td>
98
+ <td>theSelect</td>
99
+ <td></td>
100
+ </tr>
101
+ <tr>
102
+ <td>verifyValue</td>
103
+ <td>eventlog</td>
104
+ <td>{focus(theSelect)} {change(theSelect)} {blur(theSelect)}</td>
105
+ </tr>
106
+
107
+ <!-- Select an option that doesn't exist -->
108
+ <tr>
109
+ <td>assertErrorOnNext</td>
110
+ <td>Option with label 'Not an option' not found</td>
111
+ <td></td>
112
+ </tr>
113
+ <tr>
114
+ <td>select</td>
115
+ <td>theSelect</td>
116
+ <td>Not an option</td>
117
+ </tr>
118
+
119
+ </tbody>
120
+ </table>
121
+ </body>
122
+ </html>
@@ -0,0 +1,87 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <!--
3
+ Copyright 2004 ThoughtWorks, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <html>
18
+ <head>
19
+ <meta content="text/html; charset=ISO-8859-1"
20
+ http-equiv="content-type">
21
+ <title>Test Type Text Events</title>
22
+ </head>
23
+ <body>
24
+ <table cellpadding="1" cellspacing="1" border="1">
25
+ <tbody>
26
+ <tr>
27
+ <td rowspan="1" colspan="3">Test Type Text Events<br>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>open</td>
32
+ <td>./tests/html/test_form_events.html</td>
33
+ <td>&nbsp;</td>
34
+ </tr>
35
+ <tr>
36
+ <td>verifyValue</td>
37
+ <td>theTextbox</td>
38
+ <td>&nbsp;</td>
39
+ </tr>
40
+ <tr>
41
+ <td>verifyValue</td>
42
+ <td>eventlog</td>
43
+ <td>&nbsp;</td>
44
+ </tr>
45
+
46
+ <!-- Set the textbox value from blank -->
47
+ <tr>
48
+ <td>type</td>
49
+ <td>theTextbox</td>
50
+ <td>first value</td>
51
+ </tr>
52
+ <tr>
53
+ <td>verifyValue</td>
54
+ <td>theTextbox</td>
55
+ <td>first value</td>
56
+ </tr>
57
+ <tr>
58
+ <td>verifyValue</td>
59
+ <td>eventlog</td>
60
+ <td>{focus(theTextbox)} {select(theTextbox)} {change(theTextbox)} {blur(theTextbox)}</td>
61
+ </tr>
62
+
63
+ <!-- Clear the event log, and change the value -->
64
+ <tr>
65
+ <td>type</td>
66
+ <td>eventlog</td>
67
+ <td>&nbsp;</td>
68
+ </tr>
69
+ <tr>
70
+ <td>type</td>
71
+ <td>theTextbox</td>
72
+ <td>changed value</td>
73
+ </tr>
74
+ <tr>
75
+ <td>verifyValue</td>
76
+ <td>theTextbox</td>
77
+ <td>changed value</td>
78
+ </tr>
79
+ <tr>
80
+ <td>verifyValue</td>
81
+ <td>eventlog</td>
82
+ <td>{focus(theTextbox)} {select(theTextbox)} {change(theTextbox)} {blur(theTextbox)}</td>
83
+ </tr>
84
+ </tbody>
85
+ </table>
86
+ </body>
87
+ </html>
@@ -0,0 +1,26 @@
1
+ This directory contains tests for browser event emulation when driven by the
2
+ Selenium javascript engine. There are subtle differences in the eventing
3
+ for different browsers, which Selenium attempts to emulate when driving
4
+ the app with Javascript.
5
+
6
+ Current Implementation:
7
+ -----------------------
8
+ Currently, only the focus, select, click, change and blur events are supported for elements of
9
+ types INPUT-TEXT, INPUT-RADIO, INPUT-CHECKBOX, INPUT-BUTTON and SELECT.
10
+
11
+ The focus event is not supported for the "window" object.
12
+
13
+ Other HTML events, together with all keyboard and mouse events are not currently emulated.
14
+
15
+ Key Browser differences:
16
+ ----------------
17
+ 1) Firefox PR1 has a bug which allows "focus" and "blur" events to bubble when
18
+ the target element is a CHECKBOX, RADIO, BUTTON or SELECT.
19
+ (see http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents)
20
+ *** SeleniumA does _not_ currently emulate this behaviour.
21
+
22
+ 2) Internet explorer has a bug whereby "select" and "change" events do not bubble up from
23
+ target elements to enclosing elements.
24
+ *** SeleniumA does currently emulate this behaviour.
25
+
26
+ 3) The window.onfocus event is not supported.
@@ -0,0 +1,36 @@
1
+ <!--
2
+ Copyright 2004 ThoughtWorks, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+ <html>
17
+ <head>
18
+ </head>
19
+ <body>
20
+ <img style="width: 644px; height: 41px;" alt="banner" src="banner.gif"><br>
21
+ <form name="theForm">
22
+ <input id="theField" value="oldValue"/>
23
+ <br>
24
+ <input type="button" name="theButton" onclick="javascript: changeFieldValue();"/>
25
+ </form>
26
+ </body>
27
+
28
+ <script language="javascript">
29
+ <!--
30
+ function changeFieldValue() {
31
+ setTimeout("document.theForm.theField.value = 'newValue'", 500);
32
+ }
33
+ -->
34
+ </script>
35
+
36
+ </html>