Index: framework/webtools/regression/exampleTest1.ftl
===================================================================
--- framework/webtools/regression/exampleTest1.ftl	(revision 0)
+++ framework/webtools/regression/exampleTest1.ftl	(revision 0)
@@ -0,0 +1,132 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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 http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Example Test 1</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Example Test 1 (Click around the data tools)</td></tr>
+</thead><tbody>
+<tr>
+   <td>open</td>
+   <td>/webtools/control/logout</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>//input[@value='Login']</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=XML Data Export</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=WebTools</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=XML Data Export All</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: XML Data Export All</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=WebTools</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=XML Data Import</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: XML Data Import</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=WebTools</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=XML Data Import Dir</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: XML Data Import Dir</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=WebTools</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Index: framework/webtools/regression/exampleTest2.ftl
===================================================================
--- framework/webtools/regression/exampleTest2.ftl	(revision 0)
+++ framework/webtools/regression/exampleTest2.ftl	(revision 0)
@@ -0,0 +1,90 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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 http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Example Test 2</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Searches for partyIds 1 to 20<br/>(sequence autogenerated by ftl)</td></tr>
+</thead><tbody>
+<tr>
+   <td>open</td>
+   <td>/webtools/control/logout</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>//input[@value='Login']</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools:</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>link=Entity Data Maintenance</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: Entity Data Maintenance</td>
+   <td></td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>//a[contains(@href, '/webtools/control/FindGeneric?entityName=Party')]</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: Find Values</td>
+   <td></td>
+</tr>
+
+<#list 1..20 as i>
+<tr>
+   <td>type</td>
+   <td>partyId</td>
+   <td>${i}</td>
+</tr>
+<tr>
+   <td>clickAndWait</td>
+   <td>//input[@value='Find']</td>
+   <td></td>
+</tr>
+<tr>
+   <td>assertTitle</td>
+   <td>exact:OFBiz: Web Tools: Find Values</td>
+   <td></td>
+</tr>
+</#list>
+
+</tbody></table>
+</body>
+</html>
Index: framework/webtools/widget/RegressionTestScreens.xml
===================================================================
--- framework/webtools/widget/RegressionTestScreens.xml	(revision 0)
+++ framework/webtools/widget/RegressionTestScreens.xml	(revision 0)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
+    
+    <screen name="RegressionTests">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+               <platform-specific>
+                   <html><html-template location="component://webtools/webapp/webtools/regression/RegressionTests.ftl"/></html>
+               </platform-specific>
+            </widgets>
+        </section>
+    </screen>
+</screens>
Index: framework/webtools/widget/SeleniumScreens.xml
===================================================================
--- framework/webtools/widget/SeleniumScreens.xml	(revision 0)
+++ framework/webtools/widget/SeleniumScreens.xml	(revision 0)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
+    
+    <screen name="SeleniumDecorator">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+               <section>
+                   <!-- do check for WEBTOOLS, _VIEW permission -->
+                   <condition>
+                       <if-has-permission permission="WEBTOOLS" action="_VIEW"/>
+                   </condition>
+                   <widgets>
+                       <decorator-section-include name="body"/>            
+                   </widgets>
+                   <fail-widgets>
+                       <label style="head3">${uiLabelMap.WebtoolsPermissionError}</label>
+                   </fail-widgets>
+               </section>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumHome">
+        <section>
+            <actions>
+                <script location="component://webtools/webapp/webtools/WEB-INF/actions/selenium/selenium.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://webtools/webapp/webtools/selenium/SeleniumHome.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+   
+    <screen name="SeleniumTestRunner">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/TestRunner.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumTestPrompt">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/TestPrompt.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>   
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumTestRunner-splash">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/TestRunner-splash.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumDomViewer">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/DomViewer.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumLog">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/Log.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SeleniumTestList">
+        <section>
+            <actions>
+                <script location="component://webtools/webapp/webtools/WEB-INF/actions/selenium/testList.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SeleniumDecorator">
+                    <decorator-section name="body">
+                       <platform-specific>
+                           <html><html-template location="component://webtools/webapp/webtools/selenium/TestList.ftl"/></html>
+                       </platform-specific>        
+                   </decorator-section>
+               </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="getRegressionTest">
+        <section>
+            <actions>
+                <script location="component://webtools/webapp/webtools/WEB-INF/actions/selenium/getRegressionTest.bsh"/>
+            </actions>
+            <widgets>
+               <section>
+                   <condition>
+                       <if-empty field-name="casePath" />
+                   </condition>
+                   <widgets>
+                       <label>${uiLabelMap.WebtoolsNoFileSpecified}</label>
+                   </widgets>
+                   <fail-widgets>
+                       <platform-specific>
+                           <html><html-template location="${casePath}"/></html>
+                       </platform-specific>        
+                   </fail-widgets>
+               </section>
+            </widgets>
+        </section>
+    </screen>
+
+</screens>
Index: framework/webtools/config/WebtoolsUiLabels.properties
===================================================================
--- framework/webtools/config/WebtoolsUiLabels.properties	(revision 502588)
+++ framework/webtools/config/WebtoolsUiLabels.properties	(working copy)
@@ -212,6 +212,7 @@
 WebtoolsPks=Pks
 WebtoolsPool=Pool
 WebtoolsPopupWebToolsMain=Pop up WebTools Main
+WebtoolsRegressionTests=Regression Tests
 WebtoolsRelatedEntity=Related Entity
 WebtoolsRelation=Relation
 WebtoolsRelations=Relations
@@ -233,6 +234,7 @@
 WebtoolsSchedule=Schedule
 WebtoolsScheduleJob=Schedule Job
 WebtoolsSelectDispatcher=Select Dispatcher
+WebtoolsSelenium=Selenium
 WebtoolsServerHitStatisticsTools=Server Hit Statistics Tools
 WebtoolsService=Service
 WebtoolsServiceECA=Service ECA's
@@ -293,6 +295,7 @@
 WebtoolsViewValue=View Value
 WebtoolsWarningLogLevel=Warning
 WebtoolsWarningLogLevelTooltip=The Warning level designates potentially harmful situations.
+WebtoolsWebtoolsRegressionTests=Webtools Regression Tests
 WebtoolsWithPk=With PK
 WebtoolsWorkflowEngineTools=Workflow Engine Tools
 WebtoolsWorkflowMonitor=Workflow Monitor
Index: framework/webtools/ofbiz-component.xml
===================================================================
--- framework/webtools/ofbiz-component.xml	(revision 502588)
+++ framework/webtools/ofbiz-component.xml	(working copy)
@@ -26,6 +26,8 @@
     <classpath type="dir" location="config"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/WebtoolsSecurityData.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
+    <test-suite loader="main" location="testdef/webtests.xml" />
+   
     <webapp name="webtools"
         title="WebTools"
         server="default-server"
Index: framework/webtools/webapp/webtools/selenium/TestList.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/TestList.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/TestList.ftl	(revision 0)
@@ -0,0 +1,38 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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 content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
+</head>
+
+<body>
+
+   <table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium">
+       <tbody>
+       <#if suiteName?exists>
+           <tr><td><b>${suiteName}</b></td></tr>
+           <#list seleniumTests as st>
+           <tr><td><a href="<@ofbizUrl>getRegressionTest?suiteName=${suiteName}&caseName=${st.caseName}</@ofbizUrl>">${st.caseName}</a></td></tr>
+           </#list>
+       </#if>
+       </tbody>
+    </table>
+
+</body>
+</html>
Index: framework/webtools/webapp/webtools/selenium/TestRunner-splash.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/TestRunner-splash.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/TestRunner-splash.ftl	(revision 0)
@@ -0,0 +1,55 @@
+<!--
+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>
+<link rel="stylesheet" type="text/css" href="<@ofbizContentUrl>/images/selenium/selenium.css</@ofbizContentUrl>" />
+<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="<@ofbizContentUrl>/images/selenium/selenium-logo.png</@ofbizContentUrl>" 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>
Index: framework/webtools/webapp/webtools/selenium/TestPrompt.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/TestPrompt.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/TestPrompt.ftl	(revision 0)
@@ -0,0 +1,130 @@
+<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="<@ofbizContentUrl>/images/selenium/scripts/selenium-browserdetect.js</@ofbizContentUrl>"></script>
+    <script>
+
+        function load() {
+            if (browserVersion.isHTA) {
+                document.getElementById("save-div").style.display = "inline";
+            }
+            //Reload with ofbiz SeleniumTestList
+            if(""!=parent.suite){
+               document.forms["prompt"].elements["test"].value="<@ofbizUrl>SeleniumTestList?suite=</@ofbizUrl>" + parent.suite;
+               parent.suite="";
+               document.forms["prompt"].submit();
+           }
+        }
+
+        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="<@ofbizUrl>/SeleniumTestRunner</@ofbizUrl>">
+
+    <p>
+        Test Suite:
+        <input id="test" name="test" size="30" value=""/>
+    </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>
+<html>
\ No newline at end of file
Index: framework/webtools/webapp/webtools/selenium/DomViewer.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/DomViewer.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/DomViewer.ftl	(revision 0)
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+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.
+-->
+<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="<@ofbizContentUrl>/images/selenium/domviewer/domviewer.css</@ofbizContentUrl>"/>
+        <script type="text/javascript" src="<@ofbizContentUrl>/images/selenium/domviewer/selenium-domviewer.js</@ofbizContentUrl>"></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>
Index: framework/webtools/webapp/webtools/selenium/Log.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/Log.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/Log.ftl	(revision 0)
@@ -0,0 +1,89 @@
+<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>
+<title>Selenium Log Console</title>
+<link id="cssLink" rel="stylesheet" href="<@ofbizContentUrl>/images/selenium/selenium.css</@ofbizContentUrl>" />
+
+</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>
+
Index: framework/webtools/webapp/webtools/selenium/TestRunner.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/TestRunner.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/TestRunner.ftl	(revision 0)
@@ -0,0 +1,176 @@
+<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="<@ofbizContentUrl>/images/selenium/selenium.css</@ofbizContentUrl>"/>
+        <script type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/narcissus-defs.js</@ofbizContentUrl>"></script>
+        <script type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/narcissus-parse.js</@ofbizContentUrl>"></script>
+        <script type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/narcissus-exec.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/lib/prototype.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/htmlutils.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/lib/scriptaculous/scriptaculous.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/lib/cssQuery/cssQuery-p.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-browserdetect.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-browserbot.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/find_matching_child.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-api.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-commandhandlers.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-executionloop.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-testrunner.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-logging.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/selenium-version.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/xpath/misc.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/xpath/dom.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/xpath/xpath.js</@ofbizContentUrl>"></script>
+        <script language="JavaScript" type="text/javascript" src="<@ofbizContentUrl>/images/selenium/scripts/user-extensions.js</@ofbizContentUrl>"></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) + 'SeleniumDomViewer');
+                return false;
+            }
+            
+            suite="${parameters.suite?if_exists}";
+        </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="<@ofbizUrl>SeleniumTestPrompt</@ofbizUrl>" 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="<@ofbizUrl>SeleniumTestRunner-splash</@ofbizUrl>"></iframe>
+    </td>
+</tr>
+
+    </form>
+    </table>
+
+</body>
+</html>
Index: framework/webtools/webapp/webtools/selenium/SeleniumHome.ftl
===================================================================
--- framework/webtools/webapp/webtools/selenium/SeleniumHome.ftl	(revision 0)
+++ framework/webtools/webapp/webtools/selenium/SeleniumHome.ftl	(revision 0)
@@ -0,0 +1,26 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<ul>
+<#list testSuites as ts>
+   <li>
+       <a href="<@ofbizUrl>SeleniumTestRunner?suite=${ts}</@ofbizUrl>">${ts}</a>
+   </li>
+</#list>
+</ul>
\ No newline at end of file
Index: framework/webtools/webapp/webtools/WEB-INF/actions/selenium/testList.bsh
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/actions/selenium/testList.bsh	(revision 0)
+++ framework/webtools/webapp/webtools/WEB-INF/actions/selenium/testList.bsh	(revision 0)
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+import java.util.Iterator;
+import java.util.List;
+import java.util.LinkedList;
+
+import org.ofbiz.base.component.ComponentConfig;
+import org.ofbiz.base.config.GenericConfigException;
+import org.ofbiz.base.config.ResourceHandler;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.testtools.ModelTestSuite;
+import org.ofbiz.testtools.SeleniumTest;
+import org.ofbiz.base.util.UtilMisc;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import javolution.util.FastList;
+
+String module = "selenium.bsh";
+
+List seleniumTests = FastList.newInstance();
+List testSuiteInfoList = ComponentConfig.getAllTestSuiteInfos();
+Iterator testSuiteInfoIter = testSuiteInfoList.iterator();
+List modelTestSuiteList = FastList.newInstance();
+String suiteName = "";
+suiteName = request.getParameter("suite");
+while (testSuiteInfoIter.hasNext()) {
+    ComponentConfig.TestSuiteInfo testSuiteInfo = (ComponentConfig.TestSuiteInfo) testSuiteInfoIter.next();
+    
+    ResourceHandler testSuiteResource = testSuiteInfo.createResourceHandler();
+    try {
+        Document testSuiteDocument = testSuiteResource.getDocument();
+        Element documentElement = testSuiteDocument.getDocumentElement();
+        ModelTestSuite modelTestSuite = new ModelTestSuite(documentElement);
+        if(modelTestSuite.getSuiteName().equals(suiteName)){
+           List webTestList = modelTestSuite.getWebTestList();
+           Iterator webTestListItr = webTestList.iterator();
+           while(webTestListItr.hasNext()){
+               webTest = webTestListItr.next();
+               if(webTest instanceof SeleniumTest){
+                   seleniumTests.add(UtilMisc.toMap("caseName", webTest.getCaseName(), "casePath", webTest.getTestPath()));
+               }
+           }
+       }
+    } catch (GenericConfigException e) {
+        String errMsg = "Error reading XML document from ResourceHandler for loader [" + testSuiteResource.getLoaderName() + "] and location [" + testSuiteResource.getLocation() + "]";
+        Debug.logError(e, errMsg, module);
+    }
+}
+context.put("seleniumTests",seleniumTests);
+context.put("suiteName",suiteName);
Index: framework/webtools/webapp/webtools/WEB-INF/actions/selenium/getRegressionTest.bsh
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/actions/selenium/getRegressionTest.bsh	(revision 0)
+++ framework/webtools/webapp/webtools/WEB-INF/actions/selenium/getRegressionTest.bsh	(revision 0)
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+import java.util.Iterator;
+import java.util.List;
+import java.util.LinkedList;
+
+import org.ofbiz.base.component.ComponentConfig;
+import org.ofbiz.base.config.GenericConfigException;
+import org.ofbiz.base.config.ResourceHandler;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.testtools.ModelTestSuite;
+import org.ofbiz.testtools.SeleniumTest;
+import org.ofbiz.base.util.UtilMisc;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import javolution.util.FastList;
+
+String module = "selenium.bsh";
+
+List testSuiteInfoList = ComponentConfig.getAllTestSuiteInfos();
+Iterator testSuiteInfoIter = testSuiteInfoList.iterator();
+List modelTestSuiteList = FastList.newInstance();
+String suiteName = "";
+suiteName = request.getParameter("suiteName");
+String caseName = "";
+caseName = request.getParameter("caseName");
+while (testSuiteInfoIter.hasNext()) {
+    ComponentConfig.TestSuiteInfo testSuiteInfo = (ComponentConfig.TestSuiteInfo) testSuiteInfoIter.next();
+    ResourceHandler testSuiteResource = testSuiteInfo.createResourceHandler();
+    try {
+        Document testSuiteDocument = testSuiteResource.getDocument();
+        Element documentElement = testSuiteDocument.getDocumentElement();
+        ModelTestSuite modelTestSuite = new ModelTestSuite(documentElement);
+        if(modelTestSuite.getSuiteName().equals(suiteName)){
+           List webTestList = modelTestSuite.getWebTestList();
+           Iterator webTestListItr = webTestList.iterator();
+           while(webTestListItr.hasNext()){
+               webTest = webTestListItr.next();
+               if(webTest instanceof SeleniumTest){
+                   if(webTest.getCaseName().equals(caseName)){
+                       context.put("casePath", webTest.getTestPath());
+                   }
+               }
+           }
+       }
+    } catch (GenericConfigException e) {
+        String errMsg = "Error reading XML document from ResourceHandler for loader [" + testSuiteResource.getLoaderName() + "] and location [" + testSuiteResource.getLocation() + "]";
+        Debug.logError(e, errMsg, module);
+    }
+}
Index: framework/webtools/webapp/webtools/WEB-INF/actions/selenium/selenium.bsh
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/actions/selenium/selenium.bsh	(revision 0)
+++ framework/webtools/webapp/webtools/WEB-INF/actions/selenium/selenium.bsh	(revision 0)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+import java.util.Iterator;
+import java.util.List;
+import java.util.LinkedList;
+
+import org.ofbiz.base.component.ComponentConfig;
+import org.ofbiz.base.config.GenericConfigException;
+import org.ofbiz.base.config.ResourceHandler;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.testtools.ModelTestSuite;
+import org.ofbiz.testtools.SeleniumTest;
+import org.ofbiz.base.util.UtilMisc;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import javolution.util.FastList;
+
+String module = "selenium.bsh";
+
+List testSuites = FastList.newInstance();
+List testSuiteInfoList = ComponentConfig.getAllTestSuiteInfos();
+Iterator testSuiteInfoIter = testSuiteInfoList.iterator();
+List modelTestSuiteList = FastList.newInstance();
+while (testSuiteInfoIter.hasNext()) {
+    ComponentConfig.TestSuiteInfo testSuiteInfo = (ComponentConfig.TestSuiteInfo) testSuiteInfoIter.next();
+    
+    ResourceHandler testSuiteResource = testSuiteInfo.createResourceHandler();
+    try {
+        Document testSuiteDocument = testSuiteResource.getDocument();
+        Element documentElement = testSuiteDocument.getDocumentElement();
+        ModelTestSuite modelTestSuite = new ModelTestSuite(documentElement);
+        if(modelTestSuite.getWebTestList().size()>0){
+           testSuites.add(modelTestSuite.getSuiteName());
+           modelTestSuiteList.add(modelTestSuite);
+        }
+    } catch (GenericConfigException e) {
+        String errMsg = "Error reading XML document from ResourceHandler for loader [" + testSuiteResource.getLoaderName() + "] and location [" + testSuiteResource.getLocation() + "]";
+        Debug.logError(e, errMsg, module);
+    }
+}
+context.put("testSuites",testSuites);
\ No newline at end of file
Index: framework/webtools/webapp/webtools/WEB-INF/controller.xml
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/controller.xml	(revision 502588)
+++ framework/webtools/webapp/webtools/WEB-INF/controller.xml	(working copy)
@@ -490,6 +490,40 @@
         <response name="success" type="none"/>
         <response name="error" type="none"/>
     </request-map>
+
+    <request-map uri="SeleniumHome">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumHome"/>
+    </request-map>
+    <request-map uri="SeleniumTestRunner">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumTestRunner"/>
+    </request-map>
+    <request-map uri="SeleniumTestPrompt">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumTestPrompt"/>
+    </request-map>
+    <request-map uri="SeleniumTestRunner-splash">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumTestRunner-splash"/>
+    </request-map>
+    <request-map uri="SeleniumDomViewer">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumDomViewer"/>
+    </request-map>
+    <request-map uri="SeleniumLog">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumLog"/>
+    </request-map>
+    <request-map uri="SeleniumTestList">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SeleniumTestList"/>
+    </request-map>
+   
+    <request-map uri="getRegressionTest">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="getRegressionTest"/>
+    </request-map>
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -558,5 +592,15 @@
     <view-map name="EntityImport" page="component://webtools/widget/EntityScreens.xml#EntityImport" type="screen"/>
 
     <view-map name="ViewComponents" page="component://webtools/widget/MiscScreens.xml#ViewComponents" type="screen"/>
+   
+    <view-map name="SeleniumHome" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumHome"/>
+    <view-map name="SeleniumTestRunner" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumTestRunner"/>
+    <view-map name="SeleniumTestPrompt" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumTestPrompt"/>
+    <view-map name="SeleniumTestRunner-splash" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumTestRunner-splash"/>
+    <view-map name="SeleniumDomViewer" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumDomViewer"/>
+    <view-map name="SeleniumLog" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumLog"/>
+    <view-map name="SeleniumTestList" type="screen" page="component://webtools/widget/SeleniumScreens.xml#SeleniumTestList"/>
+   
+    <view-map name="getRegressionTest" type="screen" page="component://webtools/widget/SeleniumScreens.xml#getRegressionTest"/>
     <!-- end of view mappings -->
 </site-conf>
Index: framework/webtools/webapp/webtools/main.ftl
===================================================================
--- framework/webtools/webapp/webtools/main.ftl	(revision 502588)
+++ framework/webtools/webapp/webtools/main.ftl	(working copy)
@@ -123,6 +123,10 @@
                 <ul>
                   <li><a href="<@ofbizUrl>/EntityPerformanceTest</@ofbizUrl>" class="linktext">${uiLabelMap.WebtoolsEntityEngine}</a>
                 </ul>
+                <li><div class="tabletext">${uiLabelMap.WebtoolsRegressionTests}</div>
+                <ul>
+                  <li><a href="<@ofbizUrl>/SeleniumHome</@ofbizUrl>" class="linktext">${uiLabelMap.WebtoolsSelenium}</a>
+                </ul>
               <#if security.hasPermission("SERVER_STATS_VIEW", session)>
                 <li><div class="tabletext">${uiLabelMap.WebtoolsServerHitStatisticsTools}</div>
                 <ul>
Index: framework/webtools/testdef/webtests.xml
===================================================================
--- framework/webtools/testdef/webtests.xml	(revision 0)
+++ framework/webtools/testdef/webtests.xml	(revision 0)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<test-suite suite-name="Webtools Example Tests (not proper tests, just examples!)"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/test-suite.xsd">
+    <test-case case-name="Example Test 1"><selenium-test-suite url="component://webtools/regression/exampleTest1.ftl"/></test-case>
+    <test-case case-name="Example Test 2"><selenium-test-suite url="component://webtools/regression/exampleTest2.ftl"/></test-case>
+</test-suite>
Index: framework/testtools/src/org/ofbiz/testtools/SeleniumTest.java
===================================================================
--- framework/testtools/src/org/ofbiz/testtools/SeleniumTest.java	(revision 0)
+++ framework/testtools/src/org/ofbiz/testtools/SeleniumTest.java	(revision 0)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *******************************************************************************/
+package org.ofbiz.testtools;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import javolution.util.FastList;
+
+import org.ofbiz.base.util.UtilXml;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import junit.framework.TestResult;
+
+public class SeleniumTest extends TestCaseBase {
+
+    public static final String module = SeleniumTest.class.getName();
+
+    protected String testPath=null;
+    
+    /**
+     * @param modelTestSuite
+     */
+    public SeleniumTest(String caseName, ModelTestSuite modelTestSuite, Element mainElement) {
+        super(caseName, modelTestSuite);
+        this.testPath = mainElement.getAttribute("url");
+    }
+
+    public int countTestCases() {
+        return 1;
+    }
+
+    public void run(TestResult result) {
+        // TODO Auto-generated method stub
+    }
+    
+    public String getTestPath(){
+        return this.testPath;
+    }
+    
+    public String getCaseName(){
+        return this.caseName;
+    }
+}
\ No newline at end of file
Index: framework/testtools/src/org/ofbiz/testtools/ModelTestSuite.java
===================================================================
--- framework/testtools/src/org/ofbiz/testtools/ModelTestSuite.java	(revision 502588)
+++ framework/testtools/src/org/ofbiz/testtools/ModelTestSuite.java	(working copy)
@@ -50,6 +50,7 @@
     protected LocalDispatcher dispatcher;
 
     protected List testList = FastList.newInstance();
+    protected List webTestList = FastList.newInstance();
 
     public ModelTestSuite(Element mainElement) {
         this.suiteName = mainElement.getAttribute("suite-name");
@@ -94,6 +95,8 @@
                 this.testList.add(new ServiceTest(caseName, this, childElement));
             } else if ("jython-test".equals(nodeName)) {
                 this.testList.add(new JythonTest(caseName, this, childElement));
+            } else if ("selenium-test-suite".equals(nodeName)) {
+                this.webTestList.add(new SeleniumTest(caseName, this, childElement));
             }
         }
     }
@@ -113,4 +116,8 @@
     List getTestList() {
         return testList;
     }
+    
+    List getWebTestList() {
+        return webTestList;
+    }
 }
Index: framework/testtools/dtd/test-suite.xsd
===================================================================
--- framework/testtools/dtd/test-suite.xsd	(revision 502588)
+++ framework/testtools/dtd/test-suite.xsd	(working copy)
@@ -87,4 +87,13 @@
     <xs:attributeGroup name="attlist.jython-test">
         <xs:attribute type="xs:string" name="script-location" use="required"/>
     </xs:attributeGroup>
+    
+    <xs:element name="selenium-test-suite" substitutionGroup="TestCaseTypes">
+        <xs:complexType>
+            <xs:attributeGroup ref="attlist.selenium-test-suite"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.selenium-test-suite">
+        <xs:attribute type="xs:string" name="url" use="required"/>
+    </xs:attributeGroup>
 </xs:schema>
