Anonymous avatar Anonymous committed 9a64298

WW-1469
- Integrate Selenium testing into showcase

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2941 573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (69)

webapps/showcase/src/webapp/WEB-INF/decorators.xml

         <pattern>/tags/ui/ajax/*</pattern>
         <pattern>/nodecorate/*</pattern>
         <pattern>/sitemesh/useFreemarkerApplyDecoratorTag.action</pattern>
+        <pattern>/selenium/core/*</pattern>
     </excludes>
 
     <decorator name="main" page="main.jsp">
     <decorator name="panel" page="panel.ftl" />
     <decorator name="panelDec" page="panel.dec" />
     <decorator name="panelJsp" page="panel.jsp" />
-    
+    <decorator name="plain" page="plain.jsp" />
+
     <!--<decorator name="dashedBox" page="dashedBox.jsp"/>-->
     <!--<decorator name="printable" page="printable.jsp"/>-->
 </decorators>

webapps/showcase/src/webapp/WEB-INF/decorators/plain.jsp

+<%--
+  @author tmjee
+  @version $Date$ $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%
+    response.setHeader("Pragma", "no-cache");
+    response.setHeader("Cache-Control", "no-cache");
+    response.setDateHeader("Expires", 0);
+%>
+
+<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
+<%@ taglib uri="sitemesh-page" prefix="page" %>
+<%@ taglib prefix="ww" uri="/webwork" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <title><decorator:title default="WebWork Showcase"/></title>
+    <decorator:head/>
+</head>
+
+<body id="page-home">
+        <decorator:body/>
+</body>
+</html>

webapps/showcase/src/webapp/WEB-INF/sitemesh.xml

         </mapper>
 
         <mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper">
+            <param name="decorator" value="plain" />
         </mapper>
 
         <mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper">

webapps/showcase/src/webapp/selenium/README.txt

+#
+# @author tmjee
+# @version $Date$ $Id$
+#
+
+This uses Selenium Core 0.8.2
+
+Usage
+=====
+To run test based on Selenium
+1] Start up Tomcat with WebWork showcase deployed in it
+2] Navigate to
+     http://localhost:8080/selenium/core/TestRunner.html
+3] Click go on the left side of the frame, the text suite text field should be filled in with
+     ../tests/TestSuite.html
+4] This will load all the test cases
+5] Click on the "Run All Test" button on the right of the frame, it should be the first button
+
+
+Information
+===========
+The selenium core source files are under the directory
+  /showcase/src/webapp/selenium/core
+
+
+The tests are under the directory
+ /showcase/src/webapp/selenium/tests
+
+Enjoy!
+
+

webapps/showcase/src/webapp/selenium/core/Blank.html

+<html>
+    <head>
+        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+    </head>
+<body>
+    <h3>selenium-rc initial page</h3>
+</body>
+</html>

webapps/showcase/src/webapp/selenium/core/InjectedRemoteRunner.html

+<html>
+    <head>
+        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+    </head>
+<body>
+    <h3>selenium-rc initial page</h3>
+</body>
+</html>

webapps/showcase/src/webapp/selenium/core/RemoteRunner.html

+<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.
+-->
+<HTA:APPLICATION ID="SeleniumHTARunner" APPLICATIONNAME="Selenium" >
+<head>
+<meta content="text/html; charset=ISO-8859-1"
+http-equiv="content-type">
+<title>Selenium Functional Test Runner</title>
+<link rel="stylesheet" type="text/css" href="selenium.css" />
+<script language="JavaScript" type="text/javascript" src="jsunit/app/jsUnitCore.js"></script>
+<script type="text/javascript" src="scripts/xmlextras.js"></script>
+<script language="JavaScript" type="text/javascript" src="lib/prototype.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/htmlutils.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-browserdetect.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-browserbot.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/find_matching_child.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-api.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-commandhandlers.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-executionloop.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-remoterunner.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-logging.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/selenium-version.js"></script>
+<script language="JavaScript" type="text/javascript" src="xpath/misc.js"></script>
+<script language="JavaScript" type="text/javascript" src="xpath/dom.js"></script>
+<script language="JavaScript" type="text/javascript" src="xpath/xpath.js"></script>
+<script language="JavaScript" type="text/javascript" src="scripts/user-extensions.js"></script>
+<script language="JavaScript" type="text/javascript">
+    function openDomViewer() {
+        var autFrame = document.getElementById('myiframe');
+        var autFrameDocument = getIframeDocument(autFrame);
+        var domViewer = window.open(getDocumentBase(document) + 'domviewer/domviewer.html');
+        domViewer.rootDocument = autFrameDocument;
+        return false;
+    }
+
+    function cleanUp() {
+    	if (LOG != null) {
+		LOG.close();
+	}
+    }
+
+</script>
+</head>
+
+<body onLoad="setTimeout(function(){runSeleniumTest();},1000)" onUnload="cleanUp()">
+
+<table border="1" style="height: 100%;">
+  <tr>
+    <td width="50%" height="30%">
+      <table>
+      <tr>
+        <td>
+          <img src="selenium-logo.png">
+        </td>
+        <td>
+          <h1><a href="http://selenium.thoughtworks.com" >Selenium</a> Functional Testing for Web Apps</h1>
+          Open Source From <a href="http://www.thoughtworks.com">ThoughtWorks, Inc</a> and Friends
+          <form action="">
+          <br/>Slow Mode:<INPUT TYPE="CHECKBOX" NAME="FASTMODE" VALUE="YES" onmouseup="slowClicked()">
+
+          <fieldset>
+            <legend>Tools</legend>
+
+            <button type="button" id="domViewer1" onclick="openDomViewer();">
+              View DOM
+            </button>
+            <button type="button" onclick="LOG.show();">
+              Show Log
+            </button>
+          </fieldset>
+
+          </form>
+
+        </td>
+      </tr>
+      </table>
+      <form action="">
+        <label id="context" name="context"></label>
+      </form>
+    </td>
+    <td width="50%" height="30%">
+      <b>Last Four Test Commands:</b><br/>
+      <div id="commandList"></div>
+    </td>
+  </tr>
+    <tr>
+    <td colspan="2" height="70%">
+      <iframe name="myiframe" id="myiframe" src="" height="100%" width="100%"></iframe>
+    </td>
+  </tr>
+</table>
+
+</body>
+</html>
+

webapps/showcase/src/webapp/selenium/core/SeleniumLog.html

+<html>
+
+<head>
+<title>Selenium Log Console</title>
+<link id="cssLink" rel="stylesheet" href="selenium.css" />
+
+</head>
+<body id="logging-console">
+
+<script language="JavaScript">
+
+var logLevels = {
+    debug: 0,
+    info: 1,
+    warn: 2,
+    error: 3
+};
+
+function getThresholdLevel() {
+    var buttons = document.getElementById('logLevelChooser').level;
+    for (var i = 0; i < buttons.length; i++) {
+        if (buttons[i].checked) {
+            return buttons[i].value;
+        }
+    }
+}
+
+function setThresholdLevel(logLevel) {
+    var buttons = document.getElementById('logLevelChooser').level;
+    for (var i = 0; i < buttons.length; i++) {
+        if (buttons[i].value==logLevel) {
+            buttons[i].checked = true;
+        }
+        else {
+            buttons[i].checked = false;
+        }
+    }
+}
+
+function append(message, logLevel) {
+    var logLevelThreshold = getThresholdLevel();
+    if (logLevels[logLevel] < logLevels[logLevelThreshold]) {
+        return;
+    }
+    var log = document.getElementById('log');
+    var newEntry = document.createElement('li');
+    newEntry.className = logLevel;
+    newEntry.appendChild(document.createTextNode(message));
+    log.appendChild(newEntry);
+    if (newEntry.scrollIntoView) {
+        newEntry.scrollIntoView();
+    }
+}
+
+</script>
+
+<div id="banner">
+  <form id="logLevelChooser">
+      <input id="level-error" type="radio" name="level" 
+             value="error" /><label for="level-error">Error</label>
+      <input id="level-warn" type="radio" name="level"
+             value="warn" /><label for="level-warn">Warn</label>
+      <input id="level-info" type="radio" name="level"
+             value="info" /><label for="level-info">Info</label>
+      <input id="level-debug" type="radio" name="level" checked="yes"
+             value="debug" /><label for="level-debug">Debug</label>
+  </form>
+  <h1>Selenium Log Console</h1>
+</div>
+
+<ul id="log"></ul>
+
+</body>
+</html>

webapps/showcase/src/webapp/selenium/core/TestPrompt.html

+<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 name="decorator" content="plain"  /> 
+    <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>

webapps/showcase/src/webapp/selenium/core/TestRunner-splash.html

+<!--
+Copyright 2005 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.
+-->
+
+<html>
+<head>
+    <meta name="decorator" content="plain" /> 
+</head>
+<link rel="stylesheet" type="text/css" href="selenium.css" />
+<body>
+<table width="100%">
+
+<tr>
+  <th>&uarr;</th>
+  <th>&uarr;</th>
+  <th>&uarr;</th>
+</tr>
+<tr>
+  <th width="25%">Test Suite</th>
+  <th width="50%">Current Test</th>
+  <th width="25%">Control Panel</th>
+</tr>
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+<td></td>
+<td class="selenium splash">
+
+<img src="selenium-logo.png" align="right">
+
+<h1>Selenium</h1>
+<h2>by <a href="http://www.thoughtworks.com">ThoughtWorks</a> and friends</h2>
+
+<p>
+For more information on Selenium, visit
+
+<pre>
+    <a href="http://selenium.openqa.org" target="_blank">http://selenium.openqa.org</a>
+</pre>
+
+</td>
+<tr>
+
+</table>
+</body>
+</html>

webapps/showcase/src/webapp/selenium/core/TestRunner.hta

+<html>
+
+<head>
+    <HTA:APPLICATION ID="SeleniumHTARunner" APPLICATIONNAME="Selenium">
+        <!-- the previous line is only relevant if you rename this
+     file to "TestRunner.hta" -->
+
+        <!-- The copyright notice and other comments have been moved to after the HTA declaration,
+to work-around a bug in IE on Win2K whereby the HTA application doesn't function correctly -->
+        <!--
+        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.
+        -->
+        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
+
+        <title>Selenium Functional Test Runner</title>
+        <link rel="stylesheet" type="text/css" href="selenium.css"/>
+        <script type="text/javascript" src="scripts/narcissus-defs.js"></script>
+        <script type="text/javascript" src="scripts/narcissus-parse.js"></script>
+        <script type="text/javascript" src="scripts/narcissus-exec.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/prototype.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/htmlutils.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/cssQuery/cssQuery-p.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserdetect.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserbot.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/find_matching_child.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-api.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-commandhandlers.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-executionloop.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-testrunner.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-logging.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-version.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/misc.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/dom.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/xpath.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/user-extensions.js"></script>
+        <script language="JavaScript" type="text/javascript">
+            function openDomViewer() {
+                var autFrame = document.getElementById('myiframe');
+                var autFrameDocument = new SeleniumFrame(autFrame).getDocument();
+                this.rootDocument = autFrameDocument;
+                var domViewer = window.open(getDocumentBase(document) + 'domviewer/domviewer.html');
+                return false;
+            }
+        </script>
+</head>
+
+<body onLoad="onSeleniumLoad();">
+<table class="layout">
+<form action="" name="controlPanel">
+
+<!-- Suite, Test, Control Panel -->
+
+<tr class="selenium">
+<td width="25%" height="30%">
+    <iframe name="testSuiteFrame" id="testSuiteFrame" src="./TestPrompt.html" application="yes"></iframe>
+</td>
+<td width="50%" height="30%">
+    <iframe name="testFrame" id="testFrame" application="yes"></iframe>
+</td>
+
+<td width="25%">
+    <table class="layout">
+        <tr class="selenium">
+            <th width="25%" height="1" class="header">
+                <h1><a href="http://selenium.thoughtworks.com" title="The Selenium Project">Selenium</a> TestRunner
+                </h1>
+            </th>
+        </tr>
+        <tr>
+            <td width="25%" height="30%" id="controlPanel">
+                <fieldset>
+                    <legend>Execute Tests</legend>
+
+                    <div id="imageButtonPanel">
+                        <button type="button" id="runSuite" onClick="htmlTestRunner.startTestSuite();"
+                                title="Run All tests">
+                        </button>
+                        <button type="button" id="runSeleniumTest" onClick="htmlTestRunner.runSingleTest();"
+                                title="Run the Selected test">
+                        </button>
+                        <button type="button" id="pauseTest" disabled="disabled"
+                                title="Pause/Continue" class="cssPauseTest">
+                        </button>
+                        <button type="button" id="stepTest" disabled="disabled"
+                                title="Step">
+                        </button>
+                    </div>
+
+                    <div style="float:left">Fast</div>
+                    <div style="float:right">Slow</div>
+                    <br/>
+                    <div id="speedSlider">
+                        <div id="speedTrack">&nbsp;</div>
+                        <div id="speedHandle">&nbsp;</div>
+                    </div>
+
+                    <div class="executionOptions">
+                        <input id="highlightOption" type="checkbox" name="highlightOption" value="0"/>
+                        <label for="highlightOption">Highlight elements</label>
+                    </div>
+
+                </fieldset>
+
+                <table id="stats" align="center">
+                    <tr>
+                        <td colspan="2" align="right">Elapsed:</td>
+                        <td id="elapsedTime" colspan="2">00.00</td>
+                    </tr>
+                    <tr>
+                        <th colspan="2">Tests</th>
+                        <th colspan="2">Commands</th>
+                    </tr>
+                    <tr>
+                        <td class="count" id="testRuns">0</td>
+                        <td>run</td>
+                        <td class="count" id="commandPasses">0</td>
+                        <td>passed</td>
+                    </tr>
+                    <tr>
+                        <td class="count" id="testFailures">0</td>
+                        <td>failed</td>
+                        <td class="count" id="commandFailures">0</td>
+                        <td>failed</td>
+                    </tr>
+                    <tr>
+                        <td colspan="2"></td>
+                        <td class="count" id="commandErrors">0</td>
+                        <td>incomplete</td>
+                    </tr>
+                </table>
+
+                <fieldset>
+                    <legend>Tools</legend>
+
+                    <button type="button" id="domViewer1" onClick="openDomViewer();">
+                        View DOM
+                    </button>
+                    <button type="button" onClick="LOG.show();">
+                        Show Log
+                    </button>
+
+                </fieldset>
+
+            </td>
+        </tr>
+    </table>
+</td>
+</tr>
+
+<!-- AUT -->
+
+<tr>
+    <td colspan="3" height="70%">
+        <iframe name="myiframe" id="myiframe" src="TestRunner-splash.html"></iframe>
+    </td>
+</tr>
+
+    </form>
+    </table>
+
+</body>
+</html>

webapps/showcase/src/webapp/selenium/core/TestRunner.html

+<html>
+
+<head>
+    <!--
+    <HTA:APPLICATION ID="SeleniumHTARunner" APPLICATIONNAME="Selenium">
+    -->
+        <!-- the previous line is only relevant if you rename this
+     file to "TestRunner.hta" -->
+
+        <!-- The copyright notice and other comments have been moved to after the HTA declaration,
+to work-around a bug in IE on Win2K whereby the HTA application doesn't function correctly -->
+        <!--
+        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.
+        -->
+        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
+
+        <title>Selenium Functional Test Runner</title>
+        <link rel="stylesheet" type="text/css" href="selenium.css"/>
+        <script type="text/javascript" src="scripts/narcissus-defs.js"></script>
+        <script type="text/javascript" src="scripts/narcissus-parse.js"></script>
+        <script type="text/javascript" src="scripts/narcissus-exec.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/prototype.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/htmlutils.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
+        <script language="JavaScript" type="text/javascript" src="lib/cssQuery/cssQuery-p.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserdetect.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-browserbot.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/find_matching_child.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-api.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-commandhandlers.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-executionloop.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-testrunner.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-logging.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/selenium-version.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/misc.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/dom.js"></script>
+        <script language="JavaScript" type="text/javascript" src="xpath/xpath.js"></script>
+        <script language="JavaScript" type="text/javascript" src="scripts/user-extensions.js"></script>
+        <script language="JavaScript" type="text/javascript">
+            function openDomViewer() {
+                var autFrame = document.getElementById('myiframe');
+                var autFrameDocument = new SeleniumFrame(autFrame).getDocument();
+                this.rootDocument = autFrameDocument;
+                var domViewer = window.open(getDocumentBase(document) + 'domviewer/domviewer.html');
+                return false;
+            }
+        </script>
+</head>
+
+<body onLoad="onSeleniumLoad();">
+<table class="layout">
+<form action="" name="controlPanel">
+
+<!-- Suite, Test, Control Panel -->
+
+<tr class="selenium">
+<td width="25%" height="30%">
+    <iframe name="testSuiteFrame" id="testSuiteFrame" src="TestPrompt.html" application="yes"></iframe>
+</td>
+<td width="50%" height="30%">
+    <iframe name="testFrame" id="testFrame" application="yes"></iframe>
+</td>
+
+<td width="25%">
+    <table class="layout">
+        <tr class="selenium">
+            <th width="25%" height="1" class="header">
+                <h1><a href="http://selenium.thoughtworks.com" title="The Selenium Project">Selenium</a> TestRunner
+                </h1>
+            </th>
+        </tr>
+        <tr>
+            <td width="25%" height="30%" id="controlPanel">
+                <fieldset>
+                    <legend>Execute Tests</legend>
+
+                    <div id="imageButtonPanel">
+                        <button type="button" id="runSuite" onClick="htmlTestRunner.startTestSuite();"
+                                title="Run All tests">
+                        </button>
+                        <button type="button" id="runSeleniumTest" onClick="htmlTestRunner.runSingleTest();"
+                                title="Run the Selected test">
+                        </button>
+                        <button type="button" id="pauseTest" disabled="disabled"
+                                title="Pause/Continue" class="cssPauseTest">
+                        </button>
+                        <button type="button" id="stepTest" disabled="disabled"
+                                title="Step">
+                        </button>
+                    </div>
+
+                    <div style="float:left">Fast</div>
+                    <div style="float:right">Slow</div>
+                    <br/>
+                    <div id="speedSlider">
+                        <div id="speedTrack">&nbsp;</div>
+                        <div id="speedHandle">&nbsp;</div>
+                    </div>
+
+                    <div class="executionOptions">
+                        <input id="highlightOption" type="checkbox" name="highlightOption" value="0"/>
+                        <label for="highlightOption">Highlight elements</label>
+                    </div>
+
+                </fieldset>
+
+                <table id="stats" align="center">
+                    <tr>
+                        <td colspan="2" align="right">Elapsed:</td>
+                        <td id="elapsedTime" colspan="2">00.00</td>
+                    </tr>
+                    <tr>
+                        <th colspan="2">Tests</th>
+                        <th colspan="2">Commands</th>
+                    </tr>
+                    <tr>
+                        <td class="count" id="testRuns">0</td>
+                        <td>run</td>
+                        <td class="count" id="commandPasses">0</td>
+                        <td>passed</td>
+                    </tr>
+                    <tr>
+                        <td class="count" id="testFailures">0</td>
+                        <td>failed</td>
+                        <td class="count" id="commandFailures">0</td>
+                        <td>failed</td>
+                    </tr>
+                    <tr>
+                        <td colspan="2"></td>
+                        <td class="count" id="commandErrors">0</td>
+                        <td>incomplete</td>
+                    </tr>
+                </table>
+
+                <fieldset>
+                    <legend>Tools</legend>
+
+                    <button type="button" id="domViewer1" onClick="openDomViewer();">
+                        View DOM
+                    </button>
+                    <button type="button" onClick="LOG.show();">
+                        Show Log
+                    </button>
+
+                </fieldset>
+
+            </td>
+        </tr>
+    </table>
+</td>
+</tr>
+
+<!-- AUT -->
+
+<tr>
+    <td colspan="3" height="70%">
+        <iframe name="myiframe" id="myiframe" src="TestRunner-splash.html"></iframe>
+    </td>
+</tr>
+
+    </form>
+    </table>
+
+</body>
+</html>
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/domviewer/butmin.gif

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/domviewer/butplus.gif

Added
New image

webapps/showcase/src/webapp/selenium/core/domviewer/domviewer.css

+/******************************************************************************
+* Defines default styles for site pages.                                      *
+******************************************************************************/
+.hidden {
+	display: none;
+}
+
+img{
+    display: inline;
+	border: none;
+}
+
+.box{
+	background: #fcfcfc;
+    border: 1px solid #000;
+	border-color: blue;
+    color: #000000;
+	margin: 10px auto;
+    padding: 3px;
+	vertical-align: bottom;
+}
+a {
+  text-decoration: none;
+}
+
+body {
+  background-color: #ffffff;
+  color: #000000;
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 10pt;
+}
+
+h2 {
+  font-size: 140%;
+}
+
+h3 {
+  font-size: 120%;
+}
+
+h4 {
+  font-size: 100%;
+}
+
+pre {
+  font-family: Courier New, Courier, monospace;
+  font-size: 80%;
+}
+
+td, th {
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 10pt;
+  text-align: left;
+  vertical-align: top;
+}
+
+th {
+  font-weight: bold;
+  vertical-align: bottom;
+}
+
+ul {
+  list-style-type: square;
+}
+
+#demoBox {
+  border-color: #000000;
+  border-style: solid;
+  border-width: 1px;
+  padding: 8px;
+  width: 24em;
+}
+
+.footer {
+  margin-bottom: 0px;
+  text-align: center;
+}
+
+/* Boxed table styles */
+
+table.boxed {
+  border-spacing: 2px;
+  empty-cells: hide;
+}
+
+td.boxed, th.boxed, th.boxedHeader {
+  background-color: #ffffff;
+  border-color: #000000;
+  border-style: solid;
+  border-width: 1px;
+  color: #000000;
+  padding: 2px;
+  padding-left: 8px;
+  padding-right: 8px;
+}
+
+th.boxed {
+  background-color: #c0c0c0;
+}
+
+th.boxedHeader {
+  background-color: #808080;
+  color: #ffffff;
+}
+
+a.object {
+  color: #0000ff;
+}
+
+li {
+  white-space: nowrap;
+}
+
+ul {
+  list-style-type: square;
+  margin-left: 0px;
+  padding-left: 1em;
+}
+
+.boxlevel1{
+	background: #FFD700;
+}
+
+.boxlevel2{
+	background: #D2691E;
+}
+
+.boxlevel3{
+	background: #DCDCDC;
+}
+
+.boxlevel4{
+	background: #F5F5F5;
+}
+
+.boxlevel5{
+	background: #BEBEBE;
+}
+
+.boxlevel6{
+	background: #D3D3D3;
+}
+
+.boxlevel7{
+	background: #A9A9A9;
+}
+
+.boxlevel8{
+	background: #191970;
+}
+
+.boxlevel9{
+	background: #000080;
+}
+
+.boxlevel10{
+	background: #6495ED;
+}
+
+.boxlevel11{
+	background: #483D8B;
+}
+
+.boxlevel12{
+	background: #6A5ACD;
+}
+
+.boxlevel13{
+	background: #7B68EE;
+}
+
+.boxlevel14{
+	background: #8470FF;
+}
+
+.boxlevel15{
+	background: #0000CD;
+}
+
+.boxlevel16{
+	background: #4169E1;
+}
+
+.boxlevel17{
+	background: #0000FF;
+}
+
+.boxlevel18{
+	background: #1E90FF;
+}
+
+.boxlevel19{
+	background: #00BFFF;
+}
+
+.boxlevel20{
+	background: #87CEEB;
+}
+
+.boxlevel21{
+	background: #B0C4DE;
+}
+
+.boxlevel22{
+	background: #ADD8E6;
+}
+
+.boxlevel23{
+	background: #00CED1;
+}
+
+.boxlevel24{
+	background: #48D1CC;
+}
+
+.boxlevel25{
+	background: #40E0D0;
+}
+
+.boxlevel26{
+	background: #008B8B;
+}
+
+.boxlevel27{
+	background: #00FFFF;
+}
+
+.boxlevel28{
+	background: #E0FFFF;
+}
+
+.boxlevel29{
+	background: #5F9EA0;
+}
+
+.boxlevel30{
+	background: #66CDAA;
+}
+
+.boxlevel31{
+	background: #7FFFD4;
+}
+
+.boxlevel32{
+	background: #006400;
+}
+
+.boxlevel33{
+	background: #556B2F;
+}
+
+.boxlevel34{
+	background: #8FBC8F;
+}
+
+.boxlevel35{
+	background: #2E8B57;
+}
+
+.boxlevel36{
+	background: #3CB371;
+}
+
+.boxlevel37{
+	background: #20B2AA;
+}
+
+.boxlevel38{
+	background: #00FF7F;
+}
+
+.boxlevel39{
+	background: #7CFC00;
+}
+
+.boxlevel40{
+	background: #90EE90;
+}
+
+.boxlevel41{
+	background: #00FF00;
+}
+
+.boxlevel41{
+	background: #7FFF00;
+}
+
+.boxlevel42{
+	background: #00FA9A;
+}
+
+.boxlevel43{
+	background: #ADFF2F;
+}
+
+.boxlevel44{
+	background: #32CD32;
+}

webapps/showcase/src/webapp/selenium/core/domviewer/domviewer.html

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <title>DOM Viewer</title>
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        <link rel="stylesheet" type="text/css" href="domviewer.css"/>
+        <script type="text/javascript" src="selenium-domviewer.js"></script>
+    </head>
+	<body onload="loadDomViewer();">
+		<h3>DOM Viewer</h3>
+		<p> This page is generated using JavaScript. If you see this text, your 
+			browser doesn't support JavaScript.</p>
+	</body>
+	
+</html>

webapps/showcase/src/webapp/selenium/core/domviewer/selenium-domviewer.js

+var HIDDEN="hidden";
+var LEVEL = "level";
+var PLUS_SRC="butplus.gif";
+var MIN_SRC="butmin.gif";
+var newRoot;
+var maxColumns=1;
+
+function loadDomViewer() {
+    // See if the rootDocument variable has been set on this window.
+    var rootDocument = window.rootDocument;
+
+    // If not look to the opener for an explicity rootDocument variable, otherwise, use the opener document
+    if (!rootDocument && window.opener) {
+        rootDocument = window.opener.rootDocument || window.opener.document;
+    }
+
+    if (rootDocument) {
+        document.body.innerHTML = displayDOM(rootDocument);
+    }
+    else {
+        document.body.innerHTML = "<b>Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window.</b>";
+    }
+}
+
+
+function displayDOM(root){
+    var str = "";
+    str+="<table>";
+    str += treeTraversal(root,0);
+    // to make table columns work well.
+    str += "<tr>";
+    for (var i=0; i < maxColumns; i++) {
+        str+= "<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
+    }
+    str += "</tr>";
+    str += "</table>";
+    return str;
+}
+
+function checkForChildren(element){
+    if(!element.hasChildNodes())
+        return false;
+    
+    var nodes = element.childNodes;
+    var size = nodes.length;
+    var count=0;
+    
+    for(var i=0; i< size; i++){
+        var node = nodes.item(i);
+        //if(node.toString()=="[object Text]"){
+        //this is equalent to the above
+        //but will work with more browsers
+        if(node.nodeType!=1){
+            count++;
+        }
+    }
+    
+    if(count == size)
+        return false;
+    else
+        return true;
+}
+
+function treeTraversal(root, level){
+    var str = "";
+    var nodes= null;
+    var size = null;
+    //it is supposed to show the last node, 
+    //but the last node is always nodeText type
+    //and we don't show it
+    if(!root.hasChildNodes())
+        return "";//displayNode(root,level,false);
+    
+    nodes = root.childNodes;
+    size = nodes.length;
+
+    for(var i=0; i< size; i++){
+        var element = nodes.item(i);
+        //if the node is textNode, don't display
+        if(element.nodeType==1){
+            str+= displayNode(element,level,checkForChildren(element));
+            str+=treeTraversal(element, level+1);	
+        }
+    }
+    return str;
+}
+
+function displayNode(element, level, isLink){
+    nodeContent = getNodeContent(element);
+    columns = Math.round((nodeContent.length / 12) + 0.5);
+    if (columns + level > maxColumns) {
+        maxColumns = columns + level;
+    }
+    var str ="<tr class='"+LEVEL+level+"'>";
+    for (var i=0; i < level; i++)
+        str+= "<td> </td>";
+    str+="<td colspan='"+ columns +"' class='box"+" boxlevel"+level+"' >";
+    if(isLink){
+        str+='<a onclick="hide(this);return false;" href="javascript:void();">';
+        str+='<img src="'+MIN_SRC+'" />';
+    }
+    str += nodeContent;
+    if(isLink)
+        str+="</a></td></tr>";
+    return str;
+}
+
+function getNodeContent(element) {
+
+    str = "";
+    id ="";
+    if (element.id != null && element.id != "") {
+        id = " ID(" + element.id +")";
+    }
+    name ="";
+    if (element.name != null && element.name != "") {
+        name = " NAME(" + element.name + ")";
+    }
+    value ="";
+    if (element.value != null && element.value != "") {
+        value = " VALUE(" + element.value + ")";
+    }
+    href ="";
+    if (element.href != null && element.href != "") {
+        href = " HREF(" + element.href + ")";
+    }
+    clazz = "";
+    if (element.className != null && element.className != "") {
+        clazz = " CLASS(" + element.className + ")";
+    }
+    src = "";
+    if (element.src != null && element.src != "") {
+        src = " SRC(" + element.src + ")";
+    }
+    alt = "";
+    if (element.alt != null && element.alt != "") {
+        alt = " ALT(" + element.alt + ")";
+    }
+    type = "";
+    if (element.type != null && element.type != "") {
+        type = " TYPE(" + element.type + ")";
+    }
+    text ="";
+    if (element.text != null && element.text != "" && element.text != "undefined") {
+        text = " #TEXT(" + trim(element.text) +")";
+    }
+    str+=" <b>"+ element.nodeName + id + alt + type + clazz + name + value + href + src + text + "</b>";
+    return str;
+
+}
+
+function trim(val) {
+    val2 = val.substring(0,40) + "                   ";
+    var spaceChr = String.fromCharCode(32);
+    var length = val2.length;
+    var retVal = "";
+    var ix = length -1;
+
+    while(ix > -1){
+        if(val2.charAt(ix) == spaceChr) {
+        } else {
+            retVal = val2.substring(0, ix +1);
+            break;
+        }
+        ix = ix-1;
+    }
+    if (val.length > 40) {
+        retVal += "...";
+    }
+    return retVal;
+}
+
+function hide(hlink){
+    var isHidden = false;
+    var image = hlink.firstChild;
+    if(image.src.toString().indexOf(MIN_SRC)!=-1){
+        image.src=PLUS_SRC;
+        isHidden=true;
+    }else{
+        image.src=MIN_SRC;
+    }
+    var rowObj= hlink.parentNode.parentNode;
+    var rowLevel = parseInt(rowObj.className.substring(LEVEL.length));
+	
+    var sibling = rowObj.nextSibling;
+    var siblingLevel = sibling.className.substring(LEVEL.length);
+    if(siblingLevel.indexOf(HIDDEN)!=-1){
+        siblingLevel = siblingLevel.substring(0,siblingLevel.length - HIDDEN.length-1);
+    }
+    siblingLevel=parseInt(siblingLevel);
+    while(sibling!=null && rowLevel<siblingLevel){
+        if(isHidden){
+            sibling.className += " "+ HIDDEN;
+        }else if(!isHidden && sibling.className.indexOf(HIDDEN)!=-1){
+            var str = sibling.className;
+            sibling.className=str.substring(0, str.length - HIDDEN.length-1);
+        }
+        sibling = sibling.nextSibling;
+        siblingLevel = parseInt(sibling.className.substring(LEVEL.length));
+    }
+}
+
+function LOG(message) {
+    window.opener.LOG.warn(message);
+}
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/all.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/continue.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/continue_disabled.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/pause.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/pause_disabled.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/selected.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/step.png

Added
New image
Add a comment to this file

webapps/showcase/src/webapp/selenium/core/icons/step_disabled.png

Added
New image

webapps/showcase/src/webapp/selenium/core/iedoc-core.xml

+<?xml version="1.0" encoding="UTF-8"?>
+
+<apidoc>
+
+<top>Defines an object that runs Selenium commands.
+
+<h3><a name="locators"></a>Element Locators</h3>
+<p>
+Element Locators tell Selenium which HTML element a command refers to.
+The format of a locator is:</p>
+<blockquote>
+<em>locatorType</em><strong>=</strong><em>argument</em>
+</blockquote>
+
+<p>
+We support the following strategies for locating elements:
+</p>
+
+<ul>
+<li><strong>identifier</strong>=<em>id</em>: 
+Select the element with the specified &#64;id attribute. If no match is
+found, select the first element whose &#64;name attribute is <em>id</em>.
+(This is normally the default; see below.)</li>
+<li><strong>id</strong>=<em>id</em>:
+Select the element with the specified &#64;id attribute.</li>
+
+<li><strong>name</strong>=<em>name</em>:
+Select the first element with the specified &#64;name attribute.
+<ul class="first last simple">
+<li>username</li>
+<li>name=username</li>
+</ul>
+
+<p>The name may optionally be followed by one or more <em>element-filters</em>, separated from the name by whitespace.  If the <em>filterType</em> is not specified, <strong>value</strong> is assumed.</p>
+
+<ul class="first last simple">
+<li>name=flavour value=chocolate</li>
+</ul>
+</li>
+<li><strong>dom</strong>=<em>javascriptExpression</em>: 
+
+Find an element by evaluating the specified string.  This allows you to traverse the HTML Document Object
+Model using JavaScript.  Note that you must not return a value in this string; simply make it the last expression in the block.
+<ul class="first last simple">
+<li>dom=document.forms['myForm'].myDropdown</li>
+<li>dom=document.images[56]</li>
+<li>dom=function foo() { return document.links[1]; }; foo();</li>
+</ul>
+
+</li>
+
+<li><strong>xpath</strong>=<em>xpathExpression</em>: 
+Locate an element using an XPath expression.
+<ul class="first last simple">
+<li>xpath=//img[&#64;alt='The image alt text']</li>
+<li>xpath=//table[&#64;id='table1']//tr[4]/td[2]</li>
+<li>xpath=//a[contains(&#64;href,'#id1')]</li>
+<li>xpath=//a[contains(&#64;href,'#id1')]/&#64;class</li>
+<li>xpath=(//table[&#64;class='stylee'])//th[text()='theHeaderText']/../td</li>
+<li>xpath=//input[&#64;name='name2' and &#64;value='yes']</li>
+<li>xpath=//*[text()="right"]</li>
+
+</ul>
+</li>
+<li><strong>link</strong>=<em>textPattern</em>:
+Select the link (anchor) element which contains text matching the
+specified <em>pattern</em>.
+<ul class="first last simple">
+<li>link=The link text</li>
+</ul>
+
+</li>
+
+<li><strong>css</strong>=<em>cssSelectorSyntax</em>:
+Select the element using css selectors. Please refer to <a href="http://www.w3.org/TR/REC-CSS2/selector.html">CSS2 selectors</a>, <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">CSS3 selectors</a> for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
+<ul class="first last simple">
+<li>css=a[href="#id3"]</li>
+<li>css=span#firstChild + span</li>
+</ul>
+<p>Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after). </p>
+</li>
+</ul>
+
+<p>
+Without an explicit locator prefix, Selenium uses the following default
+strategies:
+</p>
+
+<ul class="simple">
+<li><strong>dom</strong>, for locators starting with &quot;document.&quot;</li>
+<li><strong>xpath</strong>, for locators starting with &quot;//&quot;</li>
+<li><strong>identifier</strong>, otherwise</li>
+</ul>
+
+<h3><a name="element-filters">Element Filters</a></h3>
+<blockquote>
+<p>Element filters can be used with a locator to refine a list of candidate elements.  They are currently used only in the 'name' element-locator.</p>
+<p>Filters look much like locators, ie.</p>
+<blockquote>
+<em>filterType</em><strong>=</strong><em>argument</em></blockquote>
+
+<p>Supported element-filters are:</p>
+<p><strong>value=</strong><em>valuePattern</em></p>
+<blockquote>
+Matches elements based on their values.  This is particularly useful for refining a list of similarly-named toggle-buttons.</blockquote>
+<p><strong>index=</strong><em>index</em></p>
+<blockquote>
+Selects a single element based on its position in the list (offset from zero).</blockquote>
+</blockquote>
+
+<h3><a name="patterns"></a>String-match Patterns</h3>
+
+<p>
+Various Pattern syntaxes are available for matching string values:
+</p>
+<ul>
+<li><strong>glob:</strong><em>pattern</em>:
+Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a
+kind of limited regular-expression syntax typically used in command-line
+shells. In a glob pattern, "*" represents any sequence of characters, and "?"
+represents any single character. Glob patterns match against the entire
+string.</li>
+<li><strong>regexp:</strong><em>regexp</em>:
+Match a string using a regular-expression. The full power of JavaScript
+regular-expressions is available.</li>
+<li><strong>exact:</strong><em>string</em>:
+
+Match a string exactly, verbatim, without any of that fancy wildcard
+stuff.</li>
+</ul>
+<p>
+If no pattern prefix is specified, Selenium assumes that it's a "glob"
+pattern.
+</p></top>
+
+<function name="click">
+
+<param name="locator">an element locator</param>
+
+<comment>Clicks on a link, button, checkbox or radio button. If the click action
+causes a new page to load (like a link usually does), call
+waitForPageToLoad.</comment>
+
+</function>
+
+<function name="doubleClick">
+
+<param name="locator">an element locator</param>
+
+<comment>Double clicks on a link, button, checkbox or radio button. If the double click action
+causes a new page to load (like a link usually does), call
+waitForPageToLoad.</comment>
+
+</function>
+
+<function name="clickAt">
+
+<param name="locator">an element locator</param>
+
+<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.</param>
+
+<comment>Clicks on a link, button, checkbox or radio button. If the click action
+causes a new page to load (like a link usually does), call
+waitForPageToLoad.</comment>
+
+</function>
+
+<function name="doubleClickAt">
+
+<param name="locator">an element locator</param>
+
+<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.</param>
+
+<comment>Doubleclicks on a link, button, checkbox or radio button. If the action
+causes a new page to load (like a link usually does), call
+waitForPageToLoad.</comment>
+
+</function>
+
+<function name="fireEvent">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="eventName">the event name, e.g. "focus" or "blur"</param>
+
+<comment>Explicitly simulate an event, to trigger the corresponding &quot;on<em>event</em>&quot;
+handler.</comment>
+
+</function>
+
+<function name="keyPress">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="keySequence">Either be a string("\" followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: "w", "\119".</param>
+
+<comment>Simulates a user pressing and releasing a key.</comment>
+
+</function>
+
+<function name="shiftKeyDown">
+
+<comment>Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.</comment>
+
+</function>
+
+<function name="shiftKeyUp">
+
+<comment>Release the shift key.</comment>
+
+</function>
+
+<function name="metaKeyDown">
+
+<comment>Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.</comment>
+
+</function>
+
+<function name="metaKeyUp">
+
+<comment>Release the meta key.</comment>
+
+</function>
+
+<function name="altKeyDown">
+
+<comment>Press the alt key and hold it down until doAltUp() is called or a new page is loaded.</comment>
+
+</function>
+
+<function name="altKeyUp">
+
+<comment>Release the alt key.</comment>
+
+</function>
+
+<function name="controlKeyDown">
+
+<comment>Press the control key and hold it down until doControlUp() is called or a new page is loaded.</comment>
+
+</function>
+
+<function name="controlKeyUp">
+
+<comment>Release the control key.</comment>
+
+</function>
+
+<function name="keyDown">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="keySequence">Either be a string("\" followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: "w", "\119".</param>
+
+<comment>Simulates a user pressing a key (without releasing it yet).</comment>
+
+</function>
+
+<function name="keyUp">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="keySequence">Either be a string("\" followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: "w", "\119".</param>
+
+<comment>Simulates a user releasing a key.</comment>
+
+</function>
+
+<function name="mouseOver">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<comment>Simulates a user hovering a mouse over the specified element.</comment>
+
+</function>
+
+<function name="mouseOut">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<comment>Simulates a user moving the mouse pointer away from the specified element.</comment>
+
+</function>
+
+<function name="mouseDown">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="mouseDownAt">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.</param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="mouseUp">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="mouseUpAt">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.</param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="mouseMove">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="mouseMoveAt">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.</param>
+
+<comment>Simulates a user pressing the mouse button (without releasing it yet) on
+the specified element.</comment>
+
+</function>
+
+<function name="type">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="value">the value to type</param>
+
+<comment>Sets the value of an input field, as though you typed it in.
+
+<p>Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
+value should be the value of the option selected, not the visible text.</p></comment>
+
+</function>
+
+<function name="typeKeys">
+
+<param name="locator">an <a href="#locators">element locator</a></param>
+
+<param name="value">the value to type</param>
+
+<comment>Simulates keystroke events on the specified element, as though you typed the value key-by-key.
+
+<p>This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;
+this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.</p>
+
+<p>Unlike the simple "type" command, which forces the specified value into the page directly, this command
+may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.
+For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in
+the field.</p>
+<p>In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to
+send the keystroke events corresponding to what you just typed.</p></comment>
+
+</function>
+
+<function name="setSpeed">
+
+<param name="value">the number of milliseconds to pause after operation</param>
+
+<comment>Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).  By default, there is no such delay, i.e.,
+the delay is 0 milliseconds.</comment>
+
+</function>
+
+<function name="getSpeed">
+
+<comment>Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).  By default, there is no such delay, i.e.,
+the delay is 0 milliseconds.
+
+See also setSpeed.</comment>
+
+</function>
+
+<function name="check">