selenium-core-runner 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +9 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +30 -0
- data/app/controllers/selenium_core_runner/suites_controller.rb +19 -0
- data/app/views/selenium_core_runner/suites/index.html.erb +177 -0
- data/app/views/selenium_core_runner/suites/show.html.erb +0 -0
- data/config/routes.rb +6 -0
- data/lib/selenium-core-runner/engine.rb +19 -0
- data/lib/selenium-core-runner.rb +3 -0
- data/public/selenium-core-runner/Blank.html +7 -0
- data/public/selenium-core-runner/InjectedRemoteRunner.html +8 -0
- data/public/selenium-core-runner/RemoteRunner.html +101 -0
- data/public/selenium-core-runner/SeleniumLog.html +109 -0
- data/public/selenium-core-runner/TestPrompt.html +145 -0
- data/public/selenium-core-runner/TestRunner-splash.html +55 -0
- data/public/selenium-core-runner/TestRunner.hta +177 -0
- data/public/selenium-core-runner/TestRunner.html +177 -0
- data/public/selenium-core-runner/icons/all.png +0 -0
- data/public/selenium-core-runner/icons/continue.png +0 -0
- data/public/selenium-core-runner/icons/continue_disabled.png +0 -0
- data/public/selenium-core-runner/icons/pause.png +0 -0
- data/public/selenium-core-runner/icons/pause_disabled.png +0 -0
- data/public/selenium-core-runner/icons/selected.png +0 -0
- data/public/selenium-core-runner/icons/step.png +0 -0
- data/public/selenium-core-runner/icons/step_disabled.png +0 -0
- data/public/selenium-core-runner/iedoc-core.xml +1789 -0
- data/public/selenium-core-runner/iedoc.xml +1830 -0
- data/public/selenium-core-runner/lib/cssQuery/cssQuery-p.js +6 -0
- data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-level2.js +142 -0
- data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-level3.js +150 -0
- data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-standard.js +53 -0
- data/public/selenium-core-runner/lib/cssQuery/src/cssQuery.js +356 -0
- data/public/selenium-core-runner/lib/prototype.js +2006 -0
- data/public/selenium-core-runner/lib/scriptaculous/builder.js +101 -0
- data/public/selenium-core-runner/lib/scriptaculous/controls.js +815 -0
- data/public/selenium-core-runner/lib/scriptaculous/dragdrop.js +915 -0
- data/public/selenium-core-runner/lib/scriptaculous/effects.js +958 -0
- data/public/selenium-core-runner/lib/scriptaculous/scriptaculous.js +47 -0
- data/public/selenium-core-runner/lib/scriptaculous/slider.js +283 -0
- data/public/selenium-core-runner/lib/scriptaculous/unittest.js +383 -0
- data/public/selenium-core-runner/lib/snapsie.js +91 -0
- data/public/selenium-core-runner/scripts/find_matching_child.js +69 -0
- data/public/selenium-core-runner/scripts/htmlutils.js +1623 -0
- data/public/selenium-core-runner/scripts/injection.html +72 -0
- data/public/selenium-core-runner/scripts/selenium-api.js +3240 -0
- data/public/selenium-core-runner/scripts/selenium-browserbot.js +2333 -0
- data/public/selenium-core-runner/scripts/selenium-browserdetect.js +153 -0
- data/public/selenium-core-runner/scripts/selenium-commandhandlers.js +379 -0
- data/public/selenium-core-runner/scripts/selenium-executionloop.js +175 -0
- data/public/selenium-core-runner/scripts/selenium-logging.js +148 -0
- data/public/selenium-core-runner/scripts/selenium-remoterunner.js +695 -0
- data/public/selenium-core-runner/scripts/selenium-testrunner.js +1362 -0
- data/public/selenium-core-runner/scripts/selenium-version.js +5 -0
- data/public/selenium-core-runner/scripts/ui-doc.html +803 -0
- data/public/selenium-core-runner/scripts/ui-element.js +1627 -0
- data/public/selenium-core-runner/scripts/ui-map-sample.js +979 -0
- data/public/selenium-core-runner/scripts/user-extensions.js +3 -0
- data/public/selenium-core-runner/scripts/user-extensions.js.sample +75 -0
- data/public/selenium-core-runner/scripts/xmlextras.js +153 -0
- data/public/selenium-core-runner/selenium-logo.png +0 -0
- data/public/selenium-core-runner/selenium-test.css +43 -0
- data/public/selenium-core-runner/selenium.css +316 -0
- data/public/selenium-core-runner/xpath/dom.js +566 -0
- data/public/selenium-core-runner/xpath/javascript-xpath-0.1.11.js +2816 -0
- data/public/selenium-core-runner/xpath/util.js +549 -0
- data/public/selenium-core-runner/xpath/xmltoken.js +149 -0
- data/public/selenium-core-runner/xpath/xpath.js +2481 -0
- metadata +121 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
<script language="JavaScript">
|
2
|
+
if (window["selenium_has_been_loaded_into_this_window"]==null)
|
3
|
+
{
|
4
|
+
|
5
|
+
__SELENIUM_JS__
|
6
|
+
// Some background on the code below: broadly speaking, where we are relative to other windows
|
7
|
+
// when running in proxy injection mode depends on whether we are in a frame set file or not.
|
8
|
+
//
|
9
|
+
// In regular HTML files, the selenium JavaScript is injected into an iframe called "selenium"
|
10
|
+
// in order to reduce its impact on the JavaScript environment (through namespace pollution,
|
11
|
+
// etc.). So in regular HTML files, we need to look at the parent of the current window when we want
|
12
|
+
// a handle to, e.g., the application window.
|
13
|
+
//
|
14
|
+
// In frame set files, we can't use an iframe, so we put the JavaScript in the head element and share
|
15
|
+
// the window with the frame set. So in this case, we need to look at the current window, not the
|
16
|
+
// parent when looking for, e.g., the application window. (TODO: Perhaps I should have just
|
17
|
+
// assigned a regular frame for selenium?)
|
18
|
+
//
|
19
|
+
BrowserBot.prototype.getContentWindow = function() {
|
20
|
+
return window;
|
21
|
+
};
|
22
|
+
|
23
|
+
BrowserBot.prototype.getTargetWindow = function(windowName) {
|
24
|
+
return window;
|
25
|
+
};
|
26
|
+
|
27
|
+
BrowserBot.prototype.getCurrentWindow = function() {
|
28
|
+
return window;
|
29
|
+
};
|
30
|
+
|
31
|
+
LOG.openLogWindow = function(message, className) {
|
32
|
+
// disable for now
|
33
|
+
};
|
34
|
+
|
35
|
+
BrowserBot.prototype.relayToRC = function(name) {
|
36
|
+
var object = eval(name);
|
37
|
+
var s = 'state:' + serializeObject(name, object) + "\n";
|
38
|
+
sendToRC(s,"state=true");
|
39
|
+
}
|
40
|
+
|
41
|
+
function selenium_frameRunTest(oldOnLoadRoutine) {
|
42
|
+
if (oldOnLoadRoutine) {
|
43
|
+
eval(oldOnLoadRoutine);
|
44
|
+
}
|
45
|
+
runSeleniumTest();
|
46
|
+
}
|
47
|
+
|
48
|
+
function seleniumOnLoad() {
|
49
|
+
injectedSessionId = "@SESSION_ID@";
|
50
|
+
window["selenium_has_been_loaded_into_this_window"] = true;
|
51
|
+
runSeleniumTest();
|
52
|
+
}
|
53
|
+
|
54
|
+
function seleniumOnUnload() {
|
55
|
+
sendToRC("Current window or frame is closed!", "closing=true");
|
56
|
+
}
|
57
|
+
|
58
|
+
if (window.addEventListener) {
|
59
|
+
window.addEventListener("load", seleniumOnLoad, false); // firefox
|
60
|
+
window.addEventListener("unload", seleniumOnUnload, false); // firefox
|
61
|
+
} else if (window.attachEvent){
|
62
|
+
window.attachEvent("onload", seleniumOnLoad); // IE
|
63
|
+
window.attachEvent("onunload", seleniumOnUnload); // IE
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
throw "causing a JavaScript error to tell the world that I did not arrange to be run on load";
|
67
|
+
}
|
68
|
+
|
69
|
+
injectedSessionId = "@SESSION_ID@";
|
70
|
+
proxyInjectionMode = true;
|
71
|
+
}
|
72
|
+
</script>
|