rubinium 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +7 -0
- data/MIT-LICENSE +21 -0
- data/README +137 -0
- data/Rakefile +139 -0
- data/TODO +7 -0
- data/doc/examples/rtc_site_live.rb +12 -0
- data/doc/examples/rts_main.rb +9 -0
- data/doc/examples/rts_shared_code.rb +25 -0
- data/lib/rubinium.rb +9 -0
- data/lib/rubinium/string.rb +3 -0
- data/lib/rubinium/test_base.rb +80 -0
- data/lib/rubinium/test_suite.rb +53 -0
- data/lib/rubinium/validator.rb +16 -0
- data/test/selenium_tests/test_click.rb +22 -0
- data/test/selenium_tests/test_open.rb +11 -0
- data/test/tc_file_creation.rb +60 -0
- data/test/ts_rubinium.rb +1 -0
- data/vendor/selenium-0.6.0/install-readme.txt +9 -0
- data/vendor/selenium-0.6.0/selenium/SeleneseRunner.html +253 -0
- data/vendor/selenium-0.6.0/selenium/SeleniumLog.html +61 -0
- data/vendor/selenium-0.6.0/selenium/TestRunner-splash.html +55 -0
- data/vendor/selenium-0.6.0/selenium/TestRunner.hta +146 -0
- data/vendor/selenium-0.6.0/selenium/TestRunner.html +146 -0
- data/vendor/selenium-0.6.0/selenium/devtests/TestClickInFrame.html +58 -0
- data/vendor/selenium-0.6.0/selenium/devtests/TestOpenInFrame.html +48 -0
- data/vendor/selenium-0.6.0/selenium/devtests/TestOpenInNewWindow.html +78 -0
- data/vendor/selenium-0.6.0/selenium/devtests/TestOpenMeta.html +43 -0
- data/vendor/selenium-0.6.0/selenium/devtests/TestSuite.html +39 -0
- data/vendor/selenium-0.6.0/selenium/devtests/meta/page.html +5 -0
- data/vendor/selenium-0.6.0/selenium/dom-images/butmin.gif +0 -0
- data/vendor/selenium-0.6.0/selenium/dom-images/butplus.gif +0 -0
- data/vendor/selenium-0.6.0/selenium/dom-styles/default.css +298 -0
- data/vendor/selenium-0.6.0/selenium/domviewer.html +16 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/carnation.jpg +0 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/example.html +75 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/html-xpath-patched.js +657 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/html-xpath.js +610 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/license.txt +504 -0
- data/vendor/selenium-0.6.0/selenium/html-xpath/rainbow.jpg +0 -0
- data/vendor/selenium-0.6.0/selenium/htmlutils.js +283 -0
- data/vendor/selenium-0.6.0/selenium/index.html +60 -0
- data/vendor/selenium-0.6.0/selenium/jsmock/mock-tests.html +205 -0
- data/vendor/selenium-0.6.0/selenium/jsmock/mock.js +124 -0
- data/vendor/selenium-0.6.0/selenium/selenium-api.js +683 -0
- data/vendor/selenium-0.6.0/selenium/selenium-browserbot.js +930 -0
- data/vendor/selenium-0.6.0/selenium/selenium-commandhandlers.js +286 -0
- data/vendor/selenium-0.6.0/selenium/selenium-domviewer.js +188 -0
- data/vendor/selenium-0.6.0/selenium/selenium-executionloop.js +250 -0
- data/vendor/selenium-0.6.0/selenium/selenium-fitrunner.js +597 -0
- data/vendor/selenium-0.6.0/selenium/selenium-logging.js +88 -0
- data/vendor/selenium-0.6.0/selenium/selenium-logo.png +0 -0
- data/vendor/selenium-0.6.0/selenium/selenium-tableparser.js +50 -0
- data/vendor/selenium-0.6.0/selenium/selenium.css +211 -0
- data/vendor/selenium-0.6.0/selenium/tests/ErrorCheckingTestSuite.html +36 -0
- data/vendor/selenium-0.6.0/selenium/tests/GoogleTestSearch.html +69 -0
- data/vendor/selenium-0.6.0/selenium/tests/GoogleTestSuite.html +32 -0
- data/vendor/selenium-0.6.0/selenium/tests/JsUnitSuite.html +38 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestClick.html +128 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestClickJavascriptHref.html +115 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestCommandError.html +79 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestConfirmations.html +77 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestErrorChecking.html +71 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestFailingAssert.html +59 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestFailingVerifications.html +198 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestFocusOnBlur.html +53 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestGoBack.html +81 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestImplicitLocators.html +81 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestJavascriptParameters.html +91 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestLocators.html +161 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestModalDialog.html +58 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestModalDialogDialog.html +48 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestOpen.html +66 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestPatternMatching.html +127 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestPause.html +78 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestPrompting.html +82 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestProxy.html +62 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSelect.html +111 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSelectWindow.html +106 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestStore.html +165 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSuite-InternetExplorer.html +79 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSuite-Konqueror.html +75 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSuite-Safari.html +75 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestSuite.html +75 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestType.html +79 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestUserExtensions.html +81 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifications.html +164 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifyAlerts.html +80 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifyAlertsFailures.html +108 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifyConfirmationFailures.html +86 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifyEditable.html +70 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVerifyEditableFailures.html +95 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVisibility.html +91 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestVisibilityFailures.html +131 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestWait.html +112 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestWaitFor.html +63 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestWaitInPopupWindow.html +94 -0
- data/vendor/selenium-0.6.0/selenium/tests/TestXPathLocators.html +98 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/alert-handling-tests.html +79 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/assert-tests.html +113 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/browserbot-tests.html +123 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/command-factory-tests.html +290 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/command-handler-tests.html +115 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/confirm-handling-tests.html +97 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/error-checking-command-tests.html +198 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/event-bubble-tests.html +106 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/optionlocator-tests.html +180 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-accessor-tests.html +65 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-action-tests.html +200 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-attribute-tests.html +98 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-locator-tests-include.html +33 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-locator-tests.html +258 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pagebot-property-tests.html +49 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/pattern-matcher-tests.html +66 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/selenium-api-tests.html +412 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/selenium-parameter-tests.html +98 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/suite.html +52 -0
- data/vendor/selenium-0.6.0/selenium/tests/browserbot/testloop-handle-error-tests.html +74 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestButtonEvents.html +72 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestCheckboxEvents.html +107 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestFireEvents.html +75 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestLinkEvents.html +43 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestRadioEvents.html +149 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestSelectEvents.html +122 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/TestTextEvents.html +87 -0
- data/vendor/selenium-0.6.0/selenium/tests/events/readme.txt +26 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/banner.gif +0 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_async_event.html +36 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_click_javascript_page.html +34 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_click_page1.html +31 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_click_page2.html +30 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_confirm.html +34 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_dummy_page.html +26 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_editable.html +36 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_focus_on_blur.html +33 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_form_events.html +98 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_framed_page.html +7 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_just_text.html +22 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_locators.html +34 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_modal_dialog.html +29 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_modal_dialog_dialog.html +35 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_open.html +23 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_prompt.html +34 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_reload_onchange_page.html +32 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_select.html +35 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_select_window.html +29 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_select_window_popup.html +28 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_slowloading_page.html +27 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_store_value.html +23 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_type_page1.html +37 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_type_page2.html +61 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_verifications.html +42 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_verify_alert.html +46 -0
- data/vendor/selenium-0.6.0/selenium/tests/html/test_visibility.html +53 -0
- data/vendor/selenium-0.6.0/selenium/tests/readme.txt +1 -0
- data/vendor/selenium-0.6.0/selenium/tests/tableparser/tableparser-tests.html +122 -0
- data/vendor/selenium-0.6.0/selenium/tests/tinyWebServer.py +70 -0
- data/vendor/selenium-0.6.0/selenium/user-extensions.js.sample +62 -0
- data/vendor/selenium-0.6.0/selenium/version.txt +1 -0
- data/vendor/selenium-0.6.0/selenium/xmlextras.js +153 -0
- data/vendor/selenium-0.6.0/selenium/xpath.js +3910 -0
- metadata +216 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3
|
+
|
|
4
|
+
<!--
|
|
5
|
+
Copyright 2004 ThoughtWorks, Inc
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
-->
|
|
19
|
+
<html>
|
|
20
|
+
<head>
|
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
22
|
+
<title>BrowserBot tests</title>
|
|
23
|
+
<link rel="stylesheet" type="text/css" href="/jsunit/css/jsUnitStyle.css">
|
|
24
|
+
<script language="JavaScript" type="text/javascript" src="/jsunit/app/jsUnitCore.js"></script>
|
|
25
|
+
<script language="JavaScript" type="text/javascript" src="/jsmock/mock.js"></script>
|
|
26
|
+
|
|
27
|
+
<script language="JavaScript" type="text/javascript" src="/htmlutils.js"></script>
|
|
28
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-executionloop.js"></script>
|
|
29
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-api.js"></script>
|
|
30
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-logging.js"></script>
|
|
31
|
+
<script language="JavaScript" type="text/javascript">
|
|
32
|
+
function setUp() {
|
|
33
|
+
mockPageBot = new Mock();
|
|
34
|
+
|
|
35
|
+
mockBrowserBot = new Mock();
|
|
36
|
+
mockBrowserBot.getCurrentPage = function() { return mockPageBot; };
|
|
37
|
+
|
|
38
|
+
selenium = new Selenium(mockBrowserBot);
|
|
39
|
+
assertEquals(mockPageBot, selenium.page());
|
|
40
|
+
|
|
41
|
+
LOG = new DummyLogger();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function testHandleSimpleStrings() {
|
|
45
|
+
assertEquals('', selenium.preprocessParameter(''));
|
|
46
|
+
assertEquals(' ', selenium.preprocessParameter(' '));
|
|
47
|
+
assertEquals('ABC', selenium.preprocessParameter('ABC'));
|
|
48
|
+
assertEquals('1234567890!@#$%^&*()', selenium.preprocessParameter('1234567890!@#$%^&*()'));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function testSimpleVariableSubstitution() {
|
|
52
|
+
selenium.doStore('value', 'var');
|
|
53
|
+
selenium.doStore('another value', 'var2');
|
|
54
|
+
assertEquals('_value_', selenium.preprocessParameter('_${var}_'));
|
|
55
|
+
assertEquals('_value value_', selenium.preprocessParameter('_${var} ${var}_'));
|
|
56
|
+
assertEquals('_value another value_', selenium.preprocessParameter('_${var} ${var2}_'));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function testUnkownVariableNotSubstituted() {
|
|
60
|
+
selenium.doStore('value', 'var');
|
|
61
|
+
assertEquals('_${bar}_',
|
|
62
|
+
selenium.preprocessParameter('_${bar}_'));
|
|
63
|
+
assertEquals('_${bar} value_',
|
|
64
|
+
selenium.preprocessParameter('_${bar} ${var}_'));
|
|
65
|
+
assertEquals('_value ${bar} ${bar} value ${bar}_',
|
|
66
|
+
selenium.preprocessParameter('_${var} ${bar} ${bar} ${var} ${bar}_'));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function testSimpleJavascriptEvaluation() {
|
|
70
|
+
assertEquals('25', selenium.preprocessParameter('javascript{"2" + "5"}'));
|
|
71
|
+
assertEquals('25', selenium.preprocessParameter('javascript{5 * 5}'));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function testVariableSubstitutionDoesntApplyForJavascriptParameters() {
|
|
75
|
+
assertEquals(' ${foo} ', selenium.preprocessParameter('javascript{" ${foo} "}'));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function testCanAccessStoredVariablesFromJavascriptParameters() {
|
|
79
|
+
selenium.doStore('value', 'var');
|
|
80
|
+
assertEquals(' value ', selenium.preprocessParameter('javascript{" " + storedVars["var"] + " "}'));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function testJavascriptEvaluationOfEmptyBody() {
|
|
84
|
+
assertEquals('javascript{}', selenium.preprocessParameter('javascript{}'));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function testIllegalJavascriptParameter() {
|
|
88
|
+
try {
|
|
89
|
+
selenium.preprocessParameter('javascript{foo}');
|
|
90
|
+
} catch (e) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
fail("call should have failed");
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
96
|
+
</head>
|
|
97
|
+
<body>Selenium API Tests</body>
|
|
98
|
+
</html>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3
|
+
<!--
|
|
4
|
+
Copyright 2004 ThoughtWorks, Inc
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
-->
|
|
18
|
+
<html>
|
|
19
|
+
<head>
|
|
20
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
21
|
+
<title>Selenium Browserbot Test Suite</title>
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="/jsunit/css/jsUnitStyle.css">
|
|
23
|
+
<script language="JavaScript" type="text/javascript" src="/jsunit/app/xbDebug.js"></script>
|
|
24
|
+
<script language="JavaScript" type="text/javascript" src="/jsunit/app/jsUnitCore.js"></script>
|
|
25
|
+
<script language="JavaScript" type="text/javascript" src="/jsunit/app/jsUnitTestSuite.js"></script>
|
|
26
|
+
<script language="Javascript" type="text/javascript">
|
|
27
|
+
function suite() {
|
|
28
|
+
var testSuite = new top.jsUnitTestSuite();
|
|
29
|
+
testSuite.addTestPage("/tests/browserbot/alert-handling-tests.html");
|
|
30
|
+
testSuite.addTestPage("/tests/browserbot/browserbot-tests.html");
|
|
31
|
+
testSuite.addTestPage("/tests/browserbot/command-factory-tests.html");
|
|
32
|
+
testSuite.addTestPage("/tests/browserbot/command-handler-tests.html");
|
|
33
|
+
testSuite.addTestPage("/tests/browserbot/confirm-handling-tests.html");
|
|
34
|
+
testSuite.addTestPage("/tests/browserbot/error-checking-command-tests.html");
|
|
35
|
+
testSuite.addTestPage("/tests/browserbot/event-bubble-tests.html");
|
|
36
|
+
testSuite.addTestPage("/tests/browserbot/pattern-matcher-tests.html");
|
|
37
|
+
testSuite.addTestPage("/tests/browserbot/assert-tests.html");
|
|
38
|
+
testSuite.addTestPage("/tests/browserbot/optionlocator-tests.html");
|
|
39
|
+
testSuite.addTestPage("/tests/browserbot/pagebot-accessor-tests.html");
|
|
40
|
+
testSuite.addTestPage("/tests/browserbot/pagebot-action-tests.html");
|
|
41
|
+
testSuite.addTestPage("/tests/browserbot/pagebot-attribute-tests.html");
|
|
42
|
+
testSuite.addTestPage("/tests/browserbot/pagebot-locator-tests.html");
|
|
43
|
+
testSuite.addTestPage("/tests/browserbot/pagebot-property-tests.html");
|
|
44
|
+
testSuite.addTestPage("/tests/browserbot/selenium-api-tests.html");
|
|
45
|
+
testSuite.addTestPage("/tests/browserbot/selenium-parameter-tests.html");
|
|
46
|
+
testSuite.addTestPage("/tests/browserbot/testloop-handle-error-tests.html");
|
|
47
|
+
return testSuite;
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
</head>
|
|
51
|
+
<body>Selenium Browserbot Test Suite</body>
|
|
52
|
+
</html>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3
|
+
|
|
4
|
+
<!--
|
|
5
|
+
Copyright 2004 ThoughtWorks, Inc
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
-->
|
|
19
|
+
<html>
|
|
20
|
+
<head>
|
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
22
|
+
<title>JsUnit Utility Tests</title>
|
|
23
|
+
<link rel="stylesheet" type="text/css" href="jsunit/css/jsUnitStyle.css">
|
|
24
|
+
<script language="JavaScript" type="text/javascript" src="/jsunit/app/jsUnitCore.js"></script>
|
|
25
|
+
<script language="JavaScript" type="text/javascript" src="/jsmock/mock.js"></script>
|
|
26
|
+
<script language="JavaScript" type="text/javascript" src="/htmlutils.js"></script>
|
|
27
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-api.js"></script>
|
|
28
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-executionloop.js"></script>
|
|
29
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-commandhandlers.js"></script>
|
|
30
|
+
<script language="JavaScript" type="text/javascript" src="/selenium-browserbot.js"></script>
|
|
31
|
+
<script language="JavaScript" type="text/javascript">
|
|
32
|
+
function setUp() {
|
|
33
|
+
commandFactory = new Mock();
|
|
34
|
+
LOG = new Mock();
|
|
35
|
+
selenium = new Selenium();
|
|
36
|
+
testLoop = new TestLoop(commandFactory);
|
|
37
|
+
// We want to verify that testLoop.commandError() function is called appropriately
|
|
38
|
+
// by testLoop.handleCommandError()
|
|
39
|
+
commandErrorHandler = new Mock();
|
|
40
|
+
testLoop.commandError = function(message) {
|
|
41
|
+
commandErrorHandler.handleError(message);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
function verifyMocks() {
|
|
46
|
+
commandFactory.verify();
|
|
47
|
+
LOG.verify();
|
|
48
|
+
commandErrorHandler.verify();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function testOrdinaryCommandError() {
|
|
52
|
+
var error = new SeleniumError("Test Error");
|
|
53
|
+
LOG.expects("error", "Test Error");
|
|
54
|
+
commandErrorHandler.expects("handleError", "Test Error");
|
|
55
|
+
testLoop.handleCommandError(error);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
function testSeleniumMalfunction() {
|
|
59
|
+
var error = new Error("Test Error");
|
|
60
|
+
LOG.expects("exception", error);
|
|
61
|
+
commandErrorHandler.expects("handleError", "Selenium failure. Please report to selenium-devel@lists.public.thoughtworks.org, with details from the logs at the base of the page. The error message is: Test Error");
|
|
62
|
+
testLoop.handleCommandError(error);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
</script>
|
|
66
|
+
</head>
|
|
67
|
+
|
|
68
|
+
<body>
|
|
69
|
+
<p>
|
|
70
|
+
This page contains tests for the selenium-executionloop : handleCommandError()
|
|
71
|
+
To see them, take a look at the source. To run them, load this file via JsUnit's testRunner.html
|
|
72
|
+
</p>
|
|
73
|
+
</body>
|
|
74
|
+
</html>
|
|
@@ -0,0 +1,72 @@
|
|
|
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 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 Button Events<br>
|
|
28
|
+
</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>open</td>
|
|
32
|
+
<td>./tests/html/test_form_events.html</td>
|
|
33
|
+
<td> </td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td>verifyValue</td>
|
|
37
|
+
<td>eventlog</td>
|
|
38
|
+
<td> </td>
|
|
39
|
+
</tr>
|
|
40
|
+
|
|
41
|
+
<!-- Click the button -->
|
|
42
|
+
<tr>
|
|
43
|
+
<td>click</td>
|
|
44
|
+
<td>theButton</td>
|
|
45
|
+
<td></td>
|
|
46
|
+
</tr>
|
|
47
|
+
<tr>
|
|
48
|
+
<td>verifyValue</td>
|
|
49
|
+
<td>eventlog</td>
|
|
50
|
+
<td>{focus(theButton)} {click(theButton)} {blur(theButton)}</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>type</td>
|
|
54
|
+
<td>eventlog</td>
|
|
55
|
+
<td></td>
|
|
56
|
+
</tr>
|
|
57
|
+
|
|
58
|
+
<!-- Click the submit -->
|
|
59
|
+
<tr>
|
|
60
|
+
<td>click</td>
|
|
61
|
+
<td>theSubmit</td>
|
|
62
|
+
<td></td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td>verifyValue</td>
|
|
66
|
+
<td>eventlog</td>
|
|
67
|
+
<td>{focus(theSubmit)} {click(theSubmit)} {submit} {blur(theSubmit)}</td>
|
|
68
|
+
</tr>
|
|
69
|
+
</tbody>
|
|
70
|
+
</table>
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
|
@@ -0,0 +1,107 @@
|
|
|
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 Checkbox 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 Checkbox Events<br>
|
|
28
|
+
</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>open</td>
|
|
32
|
+
<td>./tests/html/test_form_events.html</td>
|
|
33
|
+
<td> </td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td>verifyValue</td>
|
|
37
|
+
<td>theCheckbox</td>
|
|
38
|
+
<td>off</td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>verifyValue</td>
|
|
42
|
+
<td>eventlog</td>
|
|
43
|
+
<td> </td>
|
|
44
|
+
</tr>
|
|
45
|
+
|
|
46
|
+
<!-- Check the checkbox (initially unchecked) -->
|
|
47
|
+
<tr>
|
|
48
|
+
<td>click</td>
|
|
49
|
+
<td>theCheckbox</td>
|
|
50
|
+
<td></td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>verifyValue</td>
|
|
54
|
+
<td>theCheckbox</td>
|
|
55
|
+
<td>on</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr>
|
|
58
|
+
<td>verifyValue</td>
|
|
59
|
+
<td>eventlog</td>
|
|
60
|
+
<td>{focus(theCheckbox)} * {blur(theCheckbox)}</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>verifyValue</td>
|
|
64
|
+
<td>eventlog</td>
|
|
65
|
+
<td>* {click(theCheckbox)} *</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td>verifyValue</td>
|
|
69
|
+
<td>eventlog</td>
|
|
70
|
+
<td>* {change(theCheckbox)} *</td>
|
|
71
|
+
</tr>
|
|
72
|
+
|
|
73
|
+
<!-- Click the checkbox again, unchecking it -->
|
|
74
|
+
<tr>
|
|
75
|
+
<td>type</td>
|
|
76
|
+
<td>eventlog</td>
|
|
77
|
+
<td> </td>
|
|
78
|
+
</tr>
|
|
79
|
+
<tr>
|
|
80
|
+
<td>click</td>
|
|
81
|
+
<td>theCheckbox</td>
|
|
82
|
+
<td></td>
|
|
83
|
+
</tr>
|
|
84
|
+
<tr>
|
|
85
|
+
<td>verifyValue</td>
|
|
86
|
+
<td>theCheckbox</td>
|
|
87
|
+
<td>off</td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>verifyValue</td>
|
|
91
|
+
<td>eventlog</td>
|
|
92
|
+
<td>{focus(theCheckbox)} * {blur(theCheckbox)}</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td>verifyValue</td>
|
|
96
|
+
<td>eventlog</td>
|
|
97
|
+
<td>* {click(theCheckbox)} *</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td>verifyValue</td>
|
|
101
|
+
<td>eventlog</td>
|
|
102
|
+
<td>* {change(theCheckbox)} *</td>
|
|
103
|
+
</tr>
|
|
104
|
+
</tbody>
|
|
105
|
+
</table>
|
|
106
|
+
</body>
|
|
107
|
+
</html>
|
|
@@ -0,0 +1,75 @@
|
|
|
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 Fire 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 Fire Events<br>
|
|
28
|
+
</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>open</td>
|
|
32
|
+
<td>./tests/html/test_form_events.html</td>
|
|
33
|
+
<td> </td>
|
|
34
|
+
</tr>
|
|
35
|
+
|
|
36
|
+
<tr>
|
|
37
|
+
<td>assertValue</td>
|
|
38
|
+
<td>eventlog</td>
|
|
39
|
+
<td> </td>
|
|
40
|
+
</tr>
|
|
41
|
+
|
|
42
|
+
<tr>
|
|
43
|
+
<td>fireEvent</td>
|
|
44
|
+
<td>theTextbox</td>
|
|
45
|
+
<td>focus</td>
|
|
46
|
+
<tr>
|
|
47
|
+
<td>verifyValue</td>
|
|
48
|
+
<td>eventlog</td>
|
|
49
|
+
<td>{focus(theTextbox)}</td>
|
|
50
|
+
</tr>
|
|
51
|
+
|
|
52
|
+
<tr>
|
|
53
|
+
<td>type</td>
|
|
54
|
+
<td>eventlog</td>
|
|
55
|
+
<td> </td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr>
|
|
58
|
+
<td>fireEvent</td>
|
|
59
|
+
<td>theSelect</td>
|
|
60
|
+
<td>change</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>fireEvent</td>
|
|
64
|
+
<td>theSelect</td>
|
|
65
|
+
<td>blur</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td>verifyValue</td>
|
|
69
|
+
<td>eventlog</td>
|
|
70
|
+
<td>{change(theSelect)} {blur(theSelect)}</td>
|
|
71
|
+
</tr>
|
|
72
|
+
</tbody>
|
|
73
|
+
</table>
|
|
74
|
+
</body>
|
|
75
|
+
</html>
|