PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/testing/selenium-core/TestPrompt.html

http://datanucleus-appengine.googlecode.com/
HTML | 145 lines | 109 code | 21 blank | 15 comment | 0 complexity | bf8b4bd8d8946b5182c8ed4017bbb116 MD5 | raw file
  1<html>
  2<!--
  3Copyright 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
 18<head>
 19    <meta content="text/html; charset=ISO-8859-1"
 20          http-equiv="content-type">
 21    <title>Select a Test Suite</title>
 22    <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserdetect.js"></script>
 23    <script language="JavaScript" type="text/javascript" src="scripts/xmlextras.js"></script>
 24    <script>
 25
 26        function load() {
 27            if (browserVersion.isHTA) {
 28                document.getElementById("save-div").style.display = "inline";
 29            }
 30            if (/thisIsSeleniumServer/.test(window.location.search)) {
 31                document.getElementById("slowResources-div").style.display = "inline";
 32                if (browserVersion.isHTA || browserVersion.isChrome) {
 33                    document.getElementById("test").value = "http://localhost:4444/selenium-server/tests/TestSuite.html";
 34                }
 35            }
 36        }
 37
 38        function autoCheck() {
 39            var auto = document.getElementById("auto");
 40            var autoDiv = document.getElementById("auto-div");
 41            if (auto.checked) {
 42                autoDiv.style.display = "inline";
 43            } else {
 44                autoDiv.style.display = "none";
 45            }
 46        }
 47
 48        function slowCheck() {
 49            var slowResourcesCheckbox = document.getElementById("slowResources");
 50            var slowResources = slowResourcesCheckbox.checked ? true : false;
 51            var xhr = XmlHttp.create();
 52            var driverUrl = "http://localhost:4444/selenium-server/driver/?cmd=slowResources&1=" + slowResources;
 53            xhr.open("GET", driverUrl, true);
 54            xhr.send(null);
 55        }
 56
 57        function saveCheck() {
 58            var results = document.getElementById("results");
 59            var check = document.getElementById("save").checked;
 60            if (check) {
 61                results.firstChild.nodeValue = "Results file ";
 62                document.getElementById("resultsUrl").value = "results.html";
 63            } else {
 64                results.firstChild.nodeValue = "Results URL ";
 65                document.getElementById("resultsUrl").value = "../postResults";
 66            }
 67        }
 68
 69        function go() {
 70            if (!browserVersion.isHTA) return true;
 71            var inputs = document.getElementsByTagName("input");
 72            var queryString = "";
 73            for (var i = 0; i < inputs.length; i++) {
 74                var elem = inputs[i];
 75                var name = elem.name;
 76                var value = elem.value;
 77                if (elem.type == "checkbox") {
 78                    value = elem.checked;
 79                }
 80                queryString += escape(name) + "=" + escape(value);
 81                if (i < (inputs.length - 1)) {
 82                    queryString += "&";
 83                }
 84            }
 85
 86            window.parent.selenium = null;
 87            window.parent.htmlTestRunner.controlPanel.queryString = queryString;
 88            window.parent.htmlTestRunner.loadSuiteFrame();
 89            return false;
 90        }
 91    </script>
 92</head>
 93
 94<body onload="load()" style="font-size: x-small">
 95<form id="prompt" target="_top" method="GET" onsubmit="return go();" action="TestRunner.html">
 96
 97    <p>
 98        Test Suite:
 99        <input id="test" name="test" size="30" value="../tests/TestSuite.html"/>
100    </p>
101
102    <p align="center"><input type="submit" value="Go"/></p>
103
104    <fieldset>
105        <legend>Options</legend>
106
107        <p>
108            <input id="multiWindow" type="checkbox" name="multiWindow" onclick="autoCheck();"/> <label
109                for="multiWindow">AUT in separate window</label>
110
111        <p>
112
113        <div id="slowResources-div" style="display: none">
114            <p>
115                <input id="slowResources" type="checkbox" name="slowResources" onclick="slowCheck();" /> <label for="slowResources">Slow down web server</label>
116            </p>
117        </div>
118
119        <p>
120            <input id="auto" type="checkbox" name="auto" onclick="autoCheck();"/> <label for="auto">Run
121            automatically</label>
122        </p>
123
124        <div id="auto-div" style="display: none">
125            <p>
126                <input id="close" type="checkbox" name="close"/> <label for="close">Close afterwards </label>
127            </p>
128
129            <div id="save-div" style="display: none">
130                <br/><label for="save">Save to file </label><input id="save" type="checkbox" name="save"
131                                                                   onclick="saveCheck();"/>
132            </div>
133
134            <p id="results">
135                Results URL:
136                <input id="resultsUrl" name="resultsUrl" value="../postResults"/>
137            </p>
138
139        </div>
140    </fieldset>
141
142
143</form>
144</body>
145</html>