ryanb / selenium-on-rails

This repo is no longer maintained, see the official repository by paytonrules.

This URL has Read+Write access

selenium-on-rails / selenium-core / TestPrompt.html
100644 123 lines (101 sloc) 4.262 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<html>
<!--
Copyright 2004 ThoughtWorks, Inc
 
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.
-->
 
<head>
    <meta content="text/html; charset=ISO-8859-1"
          http-equiv="content-type">
    <title>Select a Test Suite</title>
    <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserdetect.js"></script>
    <script>
 
        function load() {
            if (browserVersion.isHTA) {
                document.getElementById("save-div").style.display = "inline";
            }
        }
 
        function autoCheck() {
            var auto = document.getElementById("auto");
            var autoDiv = document.getElementById("auto-div");
            if (auto.checked) {
                autoDiv.style.display = "inline";
            } else {
                autoDiv.style.display = "none";
            }
        }
 
        function saveCheck() {
            var results = document.getElementById("results");
            var check = document.getElementById("save").checked;
            if (check) {
                results.firstChild.nodeValue = "Results file ";
                document.getElementById("resultsUrl").value = "results.html";
            } else {
                results.firstChild.nodeValue = "Results URL ";
                document.getElementById("resultsUrl").value = "../postResults";
            }
        }
 
        function go() {
            if (!browserVersion.isHTA) return true;
            var inputs = document.getElementsByTagName("input");
            var queryString = "";
            for (var i = 0; i < inputs.length; i++) {
                var elem = inputs[i];
                var name = elem.name;
                var value = elem.value;
                if (elem.type == "checkbox") {
                    value = elem.checked;
                }
                queryString += escape(name) + "=" + escape(value);
                if (i < (inputs.length - 1)) {
                    queryString += "&";
                }
            }
 
            window.parent.selenium = null;
            window.parent.htmlTestRunner.controlPanel.queryString = queryString;
            window.parent.htmlTestRunner.loadSuiteFrame();
            return false;
        }
    </script>
</head>
 
<body onload="load()" style="font-size: x-small">
<form id="prompt" target="_top" method="GET" onsubmit="return go();" action="TestRunner.html">
 
    <p>
        Test Suite:
        <input id="test" name="test" size="30" value="../tests/TestSuite.html"/>
    </p>
 
    <p align="center"><input type="submit" value="Go"/></p>
 
    <fieldset>
        <legend>Options</legend>
 
        <p>
            <input id="multiWindow" type="checkbox" name="multiWindow" onclick="autoCheck();"/> <label
                for="multiWindow">AUT in separate window</label>
 
        <p>
 
        <p>
            <input id="auto" type="checkbox" name="auto" onclick="autoCheck();"/> <label for="auto">Run
            automatically</label>
        </p>
 
        <div id="auto-div" style="display: none">
            <p>
                <input id="close" type="checkbox" name="close"/> <label for="close">Close afterwards </label>
            </p>
 
            <div id="save-div" style="display: none">
                <br/><label for="save">Save to file </label><input id="save" type="checkbox" name="save"
                                                                   onclick="saveCheck();"/>
            </div>
 
            <p id="results">
                Results URL:
                <input id="resultsUrl" name="resultsUrl" value="../postResults"/>
            </p>
 
        </div>
    </fieldset>
 
 
</form>
</body>
</html>