You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/09/22 06:00:23 UTC

svn commit: r817493 - in /ofbiz/trunk: applications/content/data/ framework/testtools/ framework/testtools/config/ framework/testtools/documents/ framework/testtools/entitydef/ framework/testtools/script/ framework/testtools/script/org/ framework/testt...

Author: hansbak
Date: Tue Sep 22 04:00:22 2009
New Revision: 817493

URL: http://svn.apache.org/viewvc?rev=817493&view=rev
Log:
added a selenium option to webtools which partially tests if all settings have been done and will now automatically download the selenium server. Sponsored by Antwebsystems, programmed by employee Gan

Added:
    ofbiz/trunk/framework/testtools/documents/
    ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml   (with props)
    ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml   (with props)
    ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml   (with props)
    ofbiz/trunk/framework/testtools/entitydef/
    ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml   (with props)
    ofbiz/trunk/framework/testtools/script/
    ofbiz/trunk/framework/testtools/script/org/
    ofbiz/trunk/framework/testtools/script/org/ofbiz/
    ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/
    ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml   (with props)
    ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java   (with props)
    ofbiz/trunk/framework/testtools/webapp/
    ofbiz/trunk/framework/testtools/webapp/testtools/
    ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl   (with props)
    ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/
    ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml   (with props)
    ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml   (with props)
    ofbiz/trunk/framework/testtools/widget/
    ofbiz/trunk/framework/testtools/widget/CommonScreens.xml   (with props)
    ofbiz/trunk/framework/testtools/widget/Menus.xml   (with props)
    ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml   (with props)
Modified:
    ofbiz/trunk/applications/content/data/ContentTypeData.xml
    ofbiz/trunk/framework/testtools/build.xml
    ofbiz/trunk/framework/testtools/config/seleniumXml.properties
    ofbiz/trunk/framework/testtools/ofbiz-component.xml
    ofbiz/trunk/framework/testtools/runSeleniumServer.sh
    ofbiz/trunk/framework/testtools/runSeleniumXml.sh
    ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
    ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl

Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/data/ContentTypeData.xml (original)
+++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Tue Sep 22 04:00:22 2009
@@ -267,5 +267,5 @@
 
     <!-- localization example file -->
     <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
-    
+   
 </entity-engine-xml>

Modified: ofbiz/trunk/framework/testtools/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/build.xml?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/build.xml (original)
+++ ofbiz/trunk/framework/testtools/build.xml Tue Sep 22 04:00:22 2009
@@ -32,6 +32,7 @@
     <path id="local.class.path">
         <fileset dir="${lib.dir}" includes="*.jar"/>
         <fileset dir="../base/lib" includes="*.jar"/>
+    	<fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
         <fileset dir="../base/lib/scripting" includes="*.jar"/>
         <fileset dir="../base/lib/commons" includes="*.jar"/>
         <fileset dir="../base/build/lib" includes="*.jar"/>

Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/config/seleniumXml.properties?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/config/seleniumXml.properties (original)
+++ ofbiz/trunk/framework/testtools/config/seleniumXml.properties Tue Sep 22 04:00:22 2009
@@ -1,5 +1,5 @@
 serverHost=localhost
 proxyPort=4444
-browser=*firefox
+browser=*firefox /usr/lib/firefox-3.0.14/firefox
 startUrl=http://localhost:8080/
-log4jFile=./config/log4j.properties
+log4jFile=./config/log4j.properties
\ No newline at end of file

Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml (added)
+++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+    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.
+-->
+<section xmlns="http://docbook.org/ns/docbook"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
+    
+    <title>OFBiz SeleniumXml Introduction</title>
+    <para>
+        This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a copy of the presentation that was given at the ApacheCon2008 OFBiz Conference that describes more about the project:<ulink>http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf</ulink>
+    </para>
+    <section>
+        <title>Installing SeleniumXml</title>
+        <para>1. From the ofbiz directory run the following ant command to download the needed selenium- server.jar file.</para>
+        <para>2. ant download-selenium</para>
+        <para>3. ant run-install-extseed (For run install help data and example test)</para>
+        <para>4. Build the source by running “ant” in the testtools directory or your OFBIZ_HOME</para>
+        <para>You should now have everything you need to run a seleniumXml test.</para> 
+    </section>
+    
+    <section>
+    <title>Running the Example Test</title>
+    
+        <para>SeleniumXml requires the selenium server to be running. The selenium server uses a default proxy port of 4444. The default port can be changed when you start the server. Selenium tries to automatically change the proxy settings in the testing browser. If you are getting communication errors with the server you may have to manually change your proxy settings in your browser.</para>
+        <section>
+            <title>1. Start ofbiz as normal.</title>
+            <para>Note: Before run ofbiz with selenium should changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties) . Instead everything just works through port 8080. Selenium supports https but it is more complicated so for this introduction I have turned https off.</para>
+        </section>
+        <section>
+            <title>2. Start the selenium server:</title>
+            <para>runSeleniumServer.bat / runSeleniumServer.sh </para>
+        </section>
+        <section>
+            <title>3. Change the configuration for your preferred browser in the testtools/config/seleniumxml.properties file. The default is firefox (e.g. browser=*firefox) but you can change it to any of the selenium supported browsers.</title>
+            <para>Selenium supported browsers: <ulink>http://seleniumhq.org/about/platforms.html#browsers</ulink></para> 
+        </section>
+        <section>
+            <title>4. Run the Example test</title>
+            <section>
+                <title>4.1 run the Example test  .bat/.sh file</title>
+                        <para>runSeleniumXml.bat / runSeleniumXml.sh testdef/seleniumxml/example/example_testsuite.xml</para>
+                        <para>The above test combines three different tests into a single test suite. Data is passed from one test to another to allow you to share generated data.</para>
+                        <para>You will get an assertion (or other exception) if the test fails.</para>
+                        <para>The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed value="500"  command). You can remove this at the start of the test if you don't want the delay</para>
+                        <para>- Here are some screen shots of what you should be seeing.</para>
+                            <!--para>
+                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup1.jpeg" height="150" width="400"></graphic>
+                            </para>
+                            <para>
+                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup2.jpeg" height="150" width="400"></graphic> <graphic fileref="/images/seleniums/ofbizSeleniumSetup3.jpeg" height="150" width="400"></graphic>/>
+                            </para-->
+            </section>
+            <section>
+                <title>4.2 run the Example test  webtools/Run Selenium</title>
+                        <para>
+                            First you need to open the file example_testsuite.xml and comment out first part.. and enable the bottom one
+                            Here is another way to run the selenium test suite and you can create new test suite for your web application. Scroll up on this page then you will see the link "Run Selenium" next to "Selenium Intro" click on that link. 
+                            On that page you will see the list of available test suites. So you can click on "Run" to run the test suite you want but please remember that the Selenium server should be started before you "run" any test.
+                            You can also create new test suite by fill in the information to the form and put the directory location of your test suite in the field "Test Suite Path" then submit. If you want to know how the test is created you can take a look at the file example_testsuite.xml for more info.
+                        </para>
+            </section>
+        </section>
+    </section>
+    <section>
+        <title>Creating New Tests :</title> 
+        <para>The easiest way to create a new test is to use the Selenium IDE plugin for Firefox. This allows you to records your own Selenium tests. You can then save the test and convert it to a seleniumXml test easily.</para>
+        <para>1. Install the latest plugin at <ulink>http://seleniumhq.org/projects/ide/</ulink></para>
+        <para>2. Record your steps as you run through your ofbiz application.</para>
+        <para>3. Then convert the saved XML file using the convertSeleniumIDE.bat script.</para>
+    </section>
+    <section>
+        <title>For example:</title> 
+        <para>1. convertSeleniumIDE.bat testdef/seleniumxml/example/recorded/AjaxExample.html testdef/seleniumxml/example/recorded/AjaxExample.xml</para>
+        <para>2. Manually modify the commands to suit your needs.</para>
+    </section>
+</section>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml (added)
+++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+    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.
+-->
+<section xmlns="http://docbook.org/ns/docbook"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
+    <section>
+        <title>OFBiz SeleniumXml Introduction with HTTPS</title>
+        <para>How to setup in firefox browser?</para>
+        <para>
+            The problem for https is that the selenium­RC 1.0 and later will be runs in a separate profile 
+            automatically when the Selenium test is opening a new session for the Firefox browser the browser will 
+            need a security certificate every time. When this occurs the browser displays security pop up, and these 
+            pop up cannot be closed using Selenium­RC .  So how to solve this?
+        </para>
+        <para>
+            Create a separate Firefox profile for your tests ( adding a https certificate or install some add­ons)
+        </para>
+        <section>
+            <title>For Ubuntu Linux : </title>
+            <para> -  Make sure all your Firefox instances are closed .</para>
+            <para> -  Open a new Terminal and type the command firefox -p -no-remote  in the terminal then press enter. The pop up window will appear.</para>
+            <!--screenshot>
+                <graphic fileref="/images/seleniums/profile1.png" width="300" height="300"></graphic>
+                <caption>
+                    <para>
+                        Clicking on “Create Profile” to Create the new profile using the dialog , enter new profile name , choose folder  to store your new profile and then click finish.
+                    </para>
+                </caption>
+            </screenshot-->
+            <!--screenshot>
+                <graphic fileref="/images/seleniums/profile3.png" width="400"></graphic>
+                <caption-->
+                    <para>
+                        After that click “Start Firefox” and configure settings based on suggestion below 
+                    </para>
+                    <section>
+                        <title>warrning*</title>
+                        <para>
+                            Be sure to put your profile in a new folder separate from the default!!!
+                        </para>
+                        <para>
+                            The Firefox profile manager tool will delete all files in a folder if you delete 
+                        </para>
+                        <para>
+                            a profile, regardless of whether they are profile files or not.
+                        </para>
+                    </section>
+                <!--/caption>
+            </screenshot-->
+        </section>
+        <section>
+            <title>- Suggested settings for your Selenium Profile</title>
+            <para>From “View\Toolbars” tab, uncheck “Bookmarks Toolbar” </para>
+            <para>Right click from toolbar and click “Customize” </para>
+            <para>Remove “Google search” by dragging it to the “Customize Toolbar” window </para>
+            <para>From the “Customize Toolbar” window, click “Use Small Icons” check box then hit “Done”</para>
+            <para>Click “Edit\Preferences” then set the following:</para>
+                <section>
+                    <title>“Main” tab</title>
+                    <para>- set Home Page to “about:blank”</para>
+                    <para>- uncheck “Show the Downloads..” option</para>
+                </section>   
+                <section>
+                    <title>“Tabs” tab</title>
+                    <para>- Select “a new window” for new pages</para>
+                    <para>- Uncheck all warning options</para>
+                </section>
+                <section>
+                    <title>“Content” tab</title>
+                    <para>- uncheck “Block pop-up” windows option</para>
+                </section>
+                <section>
+                    <title> “Privacy” tab</title>
+                    <para>- uncheck all “History” options</para>
+                </section>
+                <section>
+                    <title>“Security” tab</title>
+                    <para>- uncheck all “Security” options</para>
+                    <para>- click “Settings” and uncheck all warning options</para>
+                </section>
+                <section>
+                    <title>“Advanced” tab</title>
+                    <para>- Uncheck “autoscrolling” option from “General” tab</para>
+                    <para>- uncheck “warn me …” and “Ssearch Engines”option from “Update” tab </para>
+                </section>
+            
+                    <!--listitem>1.From “Tools\Add-ons” install the following:
+                        <para>- Firebug: allows you to edit, debug, and monitor CSS, HTML, and JavaScript on your application under test</para>
+                        <para>- Selenium IDE: allows you to record, edit, and debug Selenium tests</para>
+                        <para>- ScreenGrab: saves entire webpages as images. </para>
+                    </listitem>
+                    <listitem>1.From the address bar type “about:config” and add the following by right-click anywhere on the page and selecting “new”
+                        <para>- extensions.update.notifyUser (type=boolean; value=false)</para>
+                        <para>- extensions.newAddons (type=boolean; value=false) </para>
+                    </listitem>
+                    
+                </orderedlist-->
+        </section>
+        
+    </section>
+    <section>
+        <title></title>
+        <para></para>
+        <!--para>
+            Set certificate for your firefox profile type and enter <ulink type="http" url="https://localhost:8443/"></ulink>
+            (* An url you  want to get certificate.)  then add an exception
+        </para>
+        
+        <screenshot>
+            <graphic fileref="/images/seleniums/profile2.png" width="400"></graphic>
+        </screenshot-->
+    </section>
+    <section>
+        <title></title>
+        <para>At the file “seleniumXml.properties”.</para> 
+        <para>Change browser=*firefox</para> 
+        <para>To   browser=*firefox /usr/lib/firefox-3.0.8/firefox</para>  
+        <para>(*** firefox path)</para>
+    </section>
+    <section>
+        <title></title>
+        <para>At the file “runSeleniumServer.sh” </para>
+        <para>"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar 	</para> 
+        <para>-firefoxProfileTemplate "put path to the profile dir"  </para>  
+        <para>-trustAllSSLCertificates -singleWindow  -timeout 240 
+        </para>
+    </section>
+    <section>
+        <title>Note : Please follows the link</title>
+        <para>
+            <!--ulink> http://docs.ofbiz.org/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink-->
+        </para>
+        <para>
+            if your found the problem “ofbiz.org cert is expired causes peer not authenticated“.
+        </para>
+    </section>
+</section>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml (added)
+++ ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,38 @@
+<?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.
+-->
+
+<entity-engine-xml>
+    <!-- example test suite -->
+    <SeleniumTestSuitePath testSuiteId="EXAMPLE_TESTSUITE" testSuiteName="example_testsuite" testSuitePath="framework/testtools/testdef/seleniumxml/example/example_testsuite.xml" description="test suite for example component"/>
+    
+    <!--Selenium Help  Load in contentTypeData.xml file -->
+    <!-- selenium test tool-->   
+    <DataResource dataResourceId="SELENIUM_INTRO" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumIntro.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium Setup" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="SELENIUM_INTRO" contentTypeId="DOCUMENT" contentName="OFBiz Selenium" templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_INTRO" localeString="en" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>    
+    <ContentAssoc contentId="DOCUMENTS"  mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
+    
+    <DataResource dataResourceId="SELENIUM_HTTPS" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium HTTPS" mimeTypeId="text/xml" isPublic="Y" />
+    <Content contentId="SELENIUM_HTTPS" contentTypeId="DOCUMENT" contentName="OFBiz Selenium with HTTPS" templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_HTTPS" localeString="en" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>    
+    <ContentAssoc contentId="DOCUMENTS" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
+    
+    <ContentAssoc contentId="SELENIUM_INTRO" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>    
+    <ContentAssoc contentId="HELP_ROOT" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
+     
+ </entity-engine-xml>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml (added)
+++ ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,42 @@
+<?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.
+-->
+
+<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
+    <!-- ========================================================= -->
+    <!-- ======================== Defaults ======================= -->
+    <!-- ========================================================= -->
+    <title>Entity of an Open For Business Project Component</title>
+    <description>None</description>
+    <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright>
+    <author>None</author>
+    <version>1.0</version>
+    
+    <entity entity-name="SeleniumTestSuitePath"
+        package-name="org.ofbiz.selenium.test"
+        default-resource-name="ExampleEntityLabels"
+        title="Selenium Test suite file">
+        <field name="testSuiteId" type="id-ne"></field>
+        <field name="testSuiteName" type="name"></field>
+        <field name="testSuitePath" type="description"></field>
+        <field name="description" type="very-long"></field>
+        <prim-key field="testSuiteId"/>
+    </entity>
+</entitymodel>

Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/framework/testtools/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/ofbiz-component.xml?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/ofbiz-component.xml (original)
+++ ofbiz/trunk/framework/testtools/ofbiz-component.xml Tue Sep 22 04:00:22 2009
@@ -1,37 +1,43 @@
 <?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.
+    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.
 -->
 
 <ofbiz-component name="testtools"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
     <!-- define resource loaders; most common is to use the component resource loader -->
     <resource-loader name="main" type="component"/>
     <classpath type="dir" location="config"/>
-
+    
     <!-- place the config directory on the classpath to access configuration files -->
     <classpath type="dir" location="dtd"/>
-
+    
     <!-- load single or multiple external libraries -->
     <classpath type="jar" location="lib/*"/>
     <classpath type="jar" location="build/lib/*"/>
-
+    
+    <!-- entitydef -->
+    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
+    
+    <entity-resource type="data" reader-name="seed" loader="main" location="documents/SeleniumHelpData.xml"/>
+    
     <!-- service resources: model(s), eca(s) and group definitions -->
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
-</ofbiz-component>
+    
+</ofbiz-component>
\ No newline at end of file

Modified: ofbiz/trunk/framework/testtools/runSeleniumServer.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumServer.sh?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/runSeleniumServer.sh (original)
+++ ofbiz/trunk/framework/testtools/runSeleniumServer.sh Tue Sep 22 04:00:22 2009
@@ -6,6 +6,6 @@
   JAVA=java
 fi
 
-"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -timeout 240
+"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -singleWindow  -trustAllSSLCertificates -timeout 240
 exit 0
 

Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original)
+++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Tue Sep 22 04:00:22 2009
@@ -9,6 +9,7 @@
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar
 
 echo $CP
 

Added: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml (added)
+++ ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,46 @@
+<?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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+    <simple-method method-name="updateSeleniumTestSuitePath"  short-description="add new test suite path file ">
+
+        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
+        <if-not-empty field="lookedUpValue.testSuiteId">
+            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+            <store-value value-field="lookedUpValue"/>
+        </if-not-empty>
+        <if-empty field="lookedUpValue.testSuiteId">
+            <set-nonpk-fields map="parameters" value-field="lookupPKMap"/>
+            <create-value value-field="lookupPKMap"/>
+        </if-empty>
+    </simple-method>
+    <simple-method method-name="removeSeleniumTestSuitePath"  short-description="remove test suite path file ">
+        
+        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
+        <if-not-empty field="lookedUpValue.testSuiteId">
+            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+            <remove-value value-field="lookedUpValue"/>
+        </if-not-empty>
+    </simple-method>
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java (added)
+++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java Tue Sep 22 04:00:22 2009
@@ -0,0 +1,179 @@
+package org.ofbiz.testtools;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilURL;
+
+
+import javolution.util.FastMap;
+
+
+import net.sf.json.JSONObject;
+
+
+public class VerifySeleniumSetups {
+
+	public static final String module = VerifySeleniumSetups.class.getName();
+	private static int currentValue  = 0;
+	private static int contentLength = 0;
+	private static Map<String,Object> josonMap = null;
+	private static String urlSite = "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=";
+	private static String libPath = "framework/testtools/lib/selenium-server.jar";
+
+	public VerifySeleniumSetups(){
+
+	}
+
+	/* prepare lib for selenium test 
+	 * Check & download selenium-server.jar from http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=
+	 * Check a change use HTTP as the default at file framework/webapp/config/url.properties  
+	 * Check correct the config/seleniumXml.properties and firefox  path
+	 */
+
+	public static String verifyConfig(HttpServletRequest request, HttpServletResponse response){
+		boolean lib = false;
+		boolean urlset = false;
+		Map<String,Object> msgMap = FastMap.newInstance();
+		Properties urlProps = null;
+		try{
+			/* Check and down load selenium-server.jar */ 
+			File file = new File(libPath);
+			URL url = new URL(urlSite);
+			URLConnection connection = url.openConnection();
+			contentLength = connection.getContentLength();
+			if(contentLength == -1){
+				 request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet");
+			}
+			Debug.log("file size. "+contentLength,module);
+			if(file.exists()){
+				if(contentLength == file.length()){
+					lib = true;
+				}else lib = false;
+			}
+			msgMap.put("LIBFLAG",lib);
+
+			/* Check a change use HTTP as the default */
+			String httpStatus = null;
+			URL urlProp = UtilURL.fromResource("url.properties");
+			if (urlProps == null) {
+				urlProps = new Properties();
+				if (urlProp == null) {
+					String errMsg = "variable with name " + urlProp.toString() + " is not set, cannot resolve location.";
+					throw new MalformedURLException(errMsg);
+				}
+				urlProps = UtilProperties.getProperties(urlProp);
+				if(urlProps != null){
+					httpStatus = urlProps.getProperty("port.https.enabled");
+					if(httpStatus != null && httpStatus.equals("N")){
+						urlset = true;
+					}
+				}
+			}
+			msgMap.put("URLFLAG",urlset);
+			request.setAttribute("MSGMAP", msgMap);
+		}catch(Exception e){
+			Debug.logError(e.getMessage(), module);
+		}
+		return "success";
+	}
+
+	public  static void doDownload( HttpServletRequest request, HttpServletResponse response){
+		URL url = null;
+		long bytesRead= 0;
+		currentValue  = 0;
+		contentLength = 0;
+		BufferedInputStream in = null;
+		BufferedOutputStream out = null;
+		try {
+			url = new URL(urlSite);
+
+			URLConnection connection = url.openConnection();
+			contentLength = connection.getContentLength();
+			InputStream stream = connection.getInputStream();
+			Debug.log("getContentLength is :"+contentLength);
+
+			in = new BufferedInputStream(stream);
+
+			long totalBytes = in.available();
+			Debug.log("totalBytes is : "+totalBytes);
+
+			byte[] b = new byte[1024];
+
+			FileOutputStream file = new FileOutputStream(libPath);
+			out = new BufferedOutputStream(file);
+
+			int r;
+			Debug.log("currentValue is : "+currentValue+" bytes");
+			while ((r = in.read(b,0,b.length)) != -1) {
+				out.write(b,0,r);
+				bytesRead += r;
+				currentValue = (int)(bytesRead * 100 / contentLength);
+				// Debug.log("loading.. :"+bytesRead);
+			}
+			out.flush();
+		} catch (IOException ex) {
+			Debug.logError("Error message :"+ex.getMessage(),module);
+		}finally {
+			try {
+				if (in != null) in.close();
+				if (out != null) out.close();
+			}catch (Exception ex) {
+				Debug.logError("Error message :"+ex.getMessage(),module);
+			}
+		}
+	}
+
+	public static String checkProgressDownloadStatus(HttpServletRequest request, HttpServletResponse response){
+		if(josonMap == null){
+			josonMap = FastMap.newInstance();
+		}
+
+		josonMap.put("loadPercent", currentValue);
+		josonMap.put("contentLength", contentLength);
+		toJsonObject(josonMap,response);
+
+		return "success";
+	}
+
+	public static void toJsonObject(Map<String,Object> attrMap, HttpServletResponse response){
+		JSONObject json = JSONObject.fromObject(attrMap);
+		String jsonStr = json.toString();
+		if (jsonStr == null) {
+			Debug.logError("JSON Object was empty; fatal error!",module);
+		}
+		// set the X-JSON content type
+		response.setContentType("application/json");
+		// jsonStr.length is not reliable for unicode characters
+		try {
+			response.setContentLength(jsonStr.getBytes("UTF8").length);
+		} catch (UnsupportedEncodingException e) {
+			Debug.logError("Problems with Json encoding",module);
+		}
+		// return the JSON String
+		Writer out;
+		try {
+			out = response.getWriter();
+			out.write(jsonStr);
+			out.flush();
+		} catch (IOException e) {
+			Debug.logError("Unable to get response writer",module);
+		}
+	}
+}

Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original)
+++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Tue Sep 22 04:00:22 2009
@@ -18,11 +18,17 @@
  */
 package org.ofbiz.testtools.seleniumxml;
 
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.DataInputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -31,10 +37,12 @@
 import java.util.regex.Pattern;
 import java.lang.reflect.*;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javolution.util.FastMap;
-
 import junit.framework.Assert;
 
+import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -43,9 +51,12 @@
 import org.jdom.Element;
 import org.jdom.JDOMException;
 import org.jdom.input.SAXBuilder;
+import org.ofbiz.testtools.seleniumxml.util.TestUtils;
 
 import org.ofbiz.base.util.UtilGenerics;
-import org.ofbiz.testtools.seleniumxml.util.TestUtils;
+import org.ofbiz.base.util.UtilHttp;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilURL;
 
 import com.thoughtworks.selenium.DefaultSelenium;
 //import com.thoughtworks.selenium.SeleniumException;
@@ -53,7 +64,8 @@
 
 public class SeleniumXml {
     
-    public static final String PROPS_NAME = "selenium.config";
+    //public static final String PROPS_NAME = "selenium.config";
+    public static String PROPS_NAME = "selenium.config";
     Logger  logger = Logger.getLogger(SeleniumXml.class.getName());
 
     public static final int MAX_STR_LENGTH = 15;
@@ -83,6 +95,35 @@
             sel.runTest(args[0]);
         }
     }
+   
+    /* call run test suite from webtool selenium */
+    public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){
+    	Map parameters = UtilHttp.getParameterMap(request);
+    	String para = (String)parameters.get("testSuitePath");
+    	if(para == null){
+    		System.out.println("Error message : Test suite Path  is null");
+    		return "success";
+    	}
+    	if(para.length()==0){
+    		System.out.println("Error message : Test suite Path  is null");
+    		return "success";
+    	}
+    	 try{
+    		 URL url = UtilURL.fromResource("seleniumXml.properties");
+    		 if (props == null) {
+	            props = new Properties();
+	            initConfig(url);
+    		 }
+    		 SeleniumXml sel = new SeleniumXml();
+    		 sel.runTest(para.trim());
+        }catch(JDOMException jdome){
+    		 System.out.println(jdome.getMessage());
+    	 }catch(IOException ioe){
+    		 System.out.println("Error message : "+ioe.getMessage());
+    	 }finally{
+    		 return "success";
+    	 }
+    }
     
     public SeleniumXml() throws IOException {
         this.map = FastMap.newInstance();
@@ -95,7 +136,12 @@
 
     private static void initConfig() throws IOException {
         try {
-            String configFile = System.getProperty(PROPS_NAME);
+        	String configFile  = "";
+        	if(System.getProperty(PROPS_NAME)==null){
+        		configFile = PROPS_NAME;
+        	}else{
+        		configFile = System.getProperty(PROPS_NAME);
+        	}
             if (configFile == null) {
                 String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot resolve location.";
                 throw new MalformedURLException(errMsg);
@@ -111,6 +157,19 @@
             throw e;
         }
     }
+    private static void initConfig(URL url) throws IOException {
+        try {
+            if (url == null) {
+                String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, cannot resolve location.";
+                throw new MalformedURLException(errMsg);
+            }
+           // BasicConfigurator.configure();
+            props = UtilProperties.getProperties(url);
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw e;
+        }
+    }
     
     /**
      * Constructor to preset with an existing Map of parameters.  Intended to be used 
@@ -136,7 +195,8 @@
 
     public void runCommands() {
         Element root = this.doc.getRootElement();
-        List<Element> nodes = UtilGenerics.cast(root.getChildren());
+        //List<Element> nodes = UtilGenerics.cast(root.getChildren());
+        List<Element> nodes = root.getChildren();
         runCommands(nodes);
     }
     
@@ -734,5 +794,4 @@
     public Map <String, Object> getMap() {
         return this.map;
     }
-}
-
+}
\ No newline at end of file

Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml (original)
+++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml Tue Sep 22 04:00:22 2009
@@ -1,8 +1,14 @@
 <?xml version="1.0"?>
 <testcase>
     <setSpeed value="500" />
-    <testcase file="testdef/seleniumxml/example/example_login.xml"/>
+    
+    <!-- start from runSeleniumXml.sh -->
+    <!--testcase file="testdef/seleniumxml/example/example_login.xml"/>
     <testcase file="testdef/seleniumxml/example/example_new.xml"/>
-    <testcase file="testdef/seleniumxml/example/example_search.xml"/>
+    <testcase file="testdef/seleniumxml/example/example_search.xml"/-->
+    <!-- start from webtools/run selenium -->
+    <testcase file="framework/testtools/testdef/seleniumxml/example/example_login.xml"/>
+    <testcase file="framework/testtools/testdef/seleniumxml/example/example_new.xml"/>
+    <testcase file="framework/testtools/testdef/seleniumxml/example/example_search.xml"/>
 </testcase>
 

Added: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl (added)
+++ ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl Tue Sep 22 04:00:22 2009
@@ -0,0 +1,117 @@
+<#--
+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.
+-->
+
+<#assign  libcheck  =  "">
+<#assign  urlcheck  =  "">
+<#assign msg = request.getAttribute("MSGMAP")?if_exists>
+<#if msg?has_content>
+    <#if msg.LIBFLAG?exists><#assign  libcheck  =  msg.LIBFLAG?if_exists?string></#if>
+    <#if msg.URLFLAG?exists><#assign  urlcheck  =  msg.URLFLAG?if_exists?string></#if>
+</#if>
+<a id="verifly" href="<@o...@ofbizUrl>" class="buttontext">Verify</a>
+<table class="basic-table hover-bar" cellspacing="0">
+        <tr class="header-row" >
+          <td>Description</td>
+          <td>Status</td>
+        </tr>
+        <tr>
+          <td>- selenium_server.jar </td>
+          <td>
+                <#if libcheck == "true">
+                    success
+                <#else>
+                    <div style="color:red;" id="message">please click download this lib for run the selenium application!</div>
+                    <div id="loadpercent"><a id="download" href="javascript:clickDownLoad('<@o...@ofbizUrl>');" class="buttontext">download</a></div>
+                    <div id="progress_bar"  style="display:none"></div>
+                    <div id="filesize"  style="display:none"></div>
+                </#if>
+          </td>
+        </tr>
+        <tr valign="middle" class="alternate-row">
+          <td>- Changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties)</td>
+          <td>
+                <#if  urlcheck == "true">
+                    success
+                <#else>
+                    <div style="color:red;">Not success!</div>
+                </#if>
+          </td>
+        </tr>
+        <tr>
+          <td> 
+            <ol>
+            <li>Edit 'framework/testtools/config/seleniumXml.properties' and  add your firefox path, replace the example in the file</li>
+            <li>Then save and restart ofbiz.</li>
+            <li>Then open a new terminal to start the seleniumserver. (cd framework/testtools;./runSeleniumServer.sh)</li>
+            <li>Then run the test below.</li>
+            </ol>
+          </td>
+          <td>
+          </td>
+        </tr>
+      </table>
+<script type="text/javascript"> 
+    var progressBar;
+    // click start load call servlet & new progressBar
+    function clickDownLoad(url){
+         startDownLoad(url);
+         $('progress_bar').style.display = "";
+         $('filesize').style.display = "";
+         progressBar = new Control.ProgressBar('progress_bar');
+    }
+    
+    function startDownLoad(url){
+        var pars = '';
+        var myAjax = new Ajax.Request( url, {
+                method: 'post', 
+                parameters: pars, 
+                onLoading:getProgressDownloadStatus,
+                onComplete : $('download').innerHTML = 'loading....'
+            } );            
+    }
+    
+    //function PeriodicalExecuter check download status
+    function getProgressDownloadStatus(){
+        new PeriodicalExecuter(function(event){
+            var pars = '';
+            var myAjax = new Ajax.Request( '<@o...@ofbizUrl>', {
+                    method: 'get', 
+                    parameters: pars, 
+                    onSuccess:function check(transfer){
+                       var data = transfer.responseText.evalJSON(true);
+                       if( data != null ){
+                           if(data.contentLength != null && data.loadPercent != null){
+                               var loadPercent = data.loadPercent;
+                               $('loadpercent').innerHTML = ''+loadPercent+'%';
+                               var contentLength  = data.contentLength;
+                               //$('filesize').innerHTML = '<b>'+contentLength/1000 + ' k</b>';
+                               progressBar.setProgress(loadPercent);
+                               if(loadPercent > 99){
+                                    $('download').innerHTML = 'download';
+                                    event.stop();
+                               }
+                           }
+                       }
+                    }
+            } );
+        },1);
+       $('message').innerHTML = 'success';
+       $('message').style.color = "black";
+    }
+</script>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml (added)
+++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,76 @@
+<?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.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
+    <!-- The controller elements that are common to all OFBiz components
+        can be found in the following xml file. A component can override the
+        elements found in the common-controller.xml file. -->
+    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+    
+    <!--  selenium Test Case -->
+    <request-map uri="selenium">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    <request-map uri="verify">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    <request-map uri="downloadSeleniumlib">
+        <security https="true" auth="true"/>
+        <!-- validate Install all libs want to use in selenium -->
+        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="doDownload"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    <request-map uri="progressDownloadStatus">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="checkProgressDownloadStatus"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    <request-map uri="runTestSuite">
+        <security https="false" auth="false"/>
+        <event type="java" path="org.ofbiz.testtools.seleniumxml.SeleniumXml" invoke="runTestSuite"/>
+        <response name="success" type="request-redirect" value="selenium" />
+    </request-map>
+    
+    <request-map uri="updateSeleniumTestSuitePath">
+        <security https="true" auth="true"/>
+        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" invoke="updateSeleniumTestSuitePath"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    <request-map uri="removeSeleniumTestSuitePath">
+        <security https="true" auth="true"/>
+        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" invoke="removeSeleniumTestSuitePath"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    
+    <request-map uri="editSeleniumTestSuitePath">
+    <security https="true" auth="true"/>
+        <response name="success" type="view" value="selenium"/>
+    </request-map>
+    
+    <!--  selenium Test Case -->
+    <view-map name="selenium" type="screen" page="component://testtools/widget/CommonScreens.xml#selenium"/>
+    <view-map name="runSelenium" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
+    <view-map name="test" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
+</site-conf>

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml (added)
+++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+    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.
+-->
+
+<web-app>
+    <display-name>Open For Business - Example Application</display-name>
+    <description>Example Application of the Open For Business Project</description>
+    
+    <context-param>
+        <param-name>webSiteId</param-name>
+        <param-value>TESTTOOLS</param-value>
+        <description>A unique ID used to look up the WebSite entity</description>
+    </context-param>
+    <context-param>
+        <param-name>localDispatcherName</param-name><param-value>testtools</param-value>
+        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
+    </context-param>
+    <context-param>
+        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
+        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
+    </context-param>
+    <context-param>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://example/widget/example/CommonScreens.xml</param-value>
+        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+    </context-param>
+    <context-param>
+        <param-name>widgetVerbose</param-name>
+        <param-value>false</param-value>
+        <description>Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
+    </context-param>
+    <context-param>
+        <param-name>compressHTML</param-name>
+        <param-value>false</param-value>
+        <description>Remove unnecessary whitespace from HTML output.</description>
+    </context-param>
+    
+    <filter>
+        <filter-name>ContextFilter</filter-name>
+        <display-name>ContextFilter</display-name>
+        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
+        <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
+        <init-param>
+            <param-name>allowedPaths</param-name>
+            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
+        </init-param>
+        <init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
+        <init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>
+    </filter>
+    <filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
+    
+    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
+    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
+    
+    <servlet>
+        <servlet-name>ControlServlet</servlet-name>
+        <display-name>ControlServlet</display-name>
+        <description>Main Control Servlet</description>
+        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
+    
+    <session-config><session-timeout>60</session-timeout><!-- in minutes --></session-config>
+    
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+</web-app>

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/CommonScreens.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/widget/CommonScreens.xml (added)
+++ ofbiz/trunk/framework/testtools/widget/CommonScreens.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,96 @@
+<?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://ofbiz.apache.org/dtds/widget-screen.xsd">
+    <screen name="main-decorator">
+        <section>
+            <actions>
+                <!-- base/top/specific map first, then more common map added for shared labels -->
+                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.WebtoolsCompanyName" global="true"/>
+                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.WebtoolsCompanySubtitle" global="true"/>
+                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
+                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
+                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
+                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
+                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
+                <set field="activeApp" value="webtools" global="true"/>
+                <!-- <set field="appheaderTemplate" value="component://webtools/webapp/webtools/includes/appheader.ftl" global="true"/> -->
+                
+                <set field="applicationMenuLocation" value="component://webtools/widget/Menus.xml" global="true"/>
+                <set field="applicationMenuName" value="WebtoolsAppBar" global="true"/>
+                <set field="applicationTitle" value="${uiLabelMap.FrameworkWebTools}" global="true"/>
+            </actions>
+            <widgets>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="main">
+        <section>
+            <actions>
+                <set field="titleProperty" value="WebtoolsMainPage"/>
+                <set field="headerItem" value="main"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://webtools/webapp/webtools/main.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="selenium">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="selenium"/> 
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>
+                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
+                <entity-one entity-name="SeleniumTestSuitePath"  value-field="testSuitePath">
+                    <field-map field-name="testSuiteId" value="${parameters.testSuiteId}"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <!--include-menu name="SeleniumTabBar" location="component://testtools/widget/Menus.xml"/-->
+                        <screenlet title="OFBiz SeleniumXml Verify">
+                            <platform-specific><html><html-template location="component://testtools/webapp/testtools/SeleniumTest.ftl"/></html></platform-specific>
+                        </screenlet>
+                        <screenlet title="Test Suite List">
+                            <include-form name="seleniumTestSuitePathList" location="component://testtools/widget/RunSeleniumForms.xml"/>
+                        </screenlet>
+                        <link target="runSelenium"  style="buttontext" text="New Test Suite"></link>
+                        <screenlet title="New Test Suite">
+                            <include-form name="editSeleniumTestSuitePath" location="component://testtools/widget/RunSeleniumForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/Menus.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/widget/Menus.xml (added)
+++ ofbiz/trunk/framework/testtools/widget/Menus.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,31 @@
+<?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.
+-->
+
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    
+    <menu name="SeleniumTabBar"  extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="selenium" title="Selenium Intro">
+            <link target="selenium"/>
+        </menu-item>
+        <menu-item name="runSelenium" title="Run Selenium">
+            <link target="runSelenium"/>
+        </menu-item>
+    </menu>    
+</menus>

Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml?rev=817493&view=auto
==============================================================================
--- ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml (added)
+++ ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml Tue Sep 22 04:00:22 2009
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+
+    <form name="editSeleniumTestSuitePath" target="updateSeleniumTestSuitePath" type="single" title="Add new selenium test suite" default-map-name="testSuitePath"
+        header-row-style="header-row" default-table-style="basic-table">
+        
+        <!--alt-target use-when="testSuitePath==null" target="createSeleniumTestSuitePath"/--> 
+        
+        <field name="testSuiteId" use-when="testSuitePath ==  null"><text></text></field>
+        <field name="testSuiteId" use-when="testSuitePath != null"><display></display></field>
+        <field name="testSuiteName"><text></text></field>
+        <field name="testSuitePath"><text></text></field>
+        <field name="description"><textarea rows="3"/></field>
+        <field name="submitButton" title=""><submit button-type="button"/></field>
+    </form>
+    <form name="seleniumTestSuitePathList"  paginate-target="editSeleniumTestSuitePath" type="list" title="path file of selenium test suite"  separate-columns="true" list-name="listIt"
+        view-size="15" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <set field="parameters" default-value=""></set>
+            <set field="parameters.noConditionFind" default-value="Y"></set>
+            
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="SeleniumTestSuitePath"/>
+                <field-map field-name="orderBy" value="createdStamp"/>
+            </service>
+        </actions>
+        <field name="testSuiteId" widget-style="buttontext">
+            <hyperlink also-hidden="true" description="${testSuiteId}" target="editSeleniumTestSuitePath">
+                <parameter param-name="testSuiteId"/>
+            </hyperlink>
+        </field>
+        <field name="testSuiteName"><display></display></field>
+        <field name="testSuitePath"><display></display></field>
+        <field name="description"><display></display></field>
+        
+        <field name="runTest" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="runTestSuite"  description="${uiLabelMap.CommonRun}">
+                <parameter param-name="testSuiteId"/>
+                <parameter param-name="testSuitePath" />
+            </hyperlink>
+        </field>
+        <field name="remove" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="removeSeleniumTestSuitePath" description="${uiLabelMap.CommonDelete}">
+                <parameter param-name="testSuiteId"/>
+            </hyperlink>
+        </field>
+    </form>
+</forms>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
@@ -23,6 +23,7 @@
     <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
     <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
     <include location="component://common/webcommon/WEB-INF/tempexpr-controller.xml"/>
+    <include location="component://testtools/webapp/testtools/WEB-INF/controller.xml"/>
     <description>WebTools Site Configuration File</description>
     <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
 

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=817493&r1=817492&r2=817493&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Tue Sep 22 04:00:22 2009
@@ -109,6 +109,8 @@
         </#if>
         <li><h3>${uiLabelMap.WebtoolsCertsX509}</h3></li>
         <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsMyCertificates}</a></li>
+        <li><h3>Selenium</h3></li>
+        <li><a href="<@o...@ofbizUrl>">Selenium</a></li>
       </ul>
     </#if>
   </div>



Re: svn commit: r817493 - in /ofbiz/trunk: applications/content/data/ framework/testtools/ framework/testtools/config/ framework/testtools/documents/ framework/testtools/entitydef/ framework/testtools/script/ framework/testtools/script/org/ framework/testt

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Hans!

Jacques

From: "Hans Bakker" <ma...@antwebsystems.com>
> yes, was fixed about 3-4 hour later....
>
> Regards,
> Hans
>
> On Mon, 2009-09-28 at 12:08 +0200, Jacques Le Roux wrote:
>> Has a Jira issue been created or this bug already fixed ?
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Deepak Dixit" <de...@hotwaxmedia.com>
>> > Hello Hans,
>> >
>> > This commit generate error for loading data.In this statusId used in SeleniumHelpData.xml but statusId's  define
>> > (ContentTypeData.xml) in  content component in application and application is loaded after framework so statusId generate 
>> > error.
>> >
>> > Thanks & Regards
>> > -----
>> > Deepak Dixit
>> >
>> > hansbak@apache.org wrote:
>> >> Author: hansbak
>> >> Date: Tue Sep 22 04:00:22 2009
>> >> New Revision: 817493
>> >>
>> >> URL: http://svn.apache.org/viewvc?rev=817493&view=rev
>> >> Log:
>> >> added a selenium option to webtools which partially tests if all settings have been done and will now automatically download 
>> >> the
>> >> selenium server. Sponsored by Antwebsystems, programmed by employee Gan
>> >>
>> >> Added:
>> >>     ofbiz/trunk/framework/testtools/documents/
>> >>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/entitydef/
>> >>     ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/script/
>> >>     ofbiz/trunk/framework/testtools/script/org/
>> >>     ofbiz/trunk/framework/testtools/script/org/ofbiz/
>> >>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/
>> >>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java   (with props)
>> >>     ofbiz/trunk/framework/testtools/webapp/
>> >>     ofbiz/trunk/framework/testtools/webapp/testtools/
>> >>     ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl   (with props)
>> >>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/
>> >>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/widget/
>> >>     ofbiz/trunk/framework/testtools/widget/CommonScreens.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/widget/Menus.xml   (with props)
>> >>     ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml   (with props)
>> >> Modified:
>> >>     ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> >>     ofbiz/trunk/framework/testtools/build.xml
>> >>     ofbiz/trunk/framework/testtools/config/seleniumXml.properties
>> >>     ofbiz/trunk/framework/testtools/ofbiz-component.xml
>> >>     ofbiz/trunk/framework/testtools/runSeleniumServer.sh
>> >>     ofbiz/trunk/framework/testtools/runSeleniumXml.sh
>> >>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
>> >>     ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
>> >>     ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
>> >>     ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
>> >>
>> >> Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/applications/content/data/ContentTypeData.xml (original)
>> >> +++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Tue Sep 22 04:00:22 2009
>> >> @@ -267,5 +267,5 @@
>> >>  <!-- localization example file -->
>> >>      <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl" dataResourceTypeId="OFBIZ_FILE"
>> >> objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >> dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
>> >> -    +   </entity-engine-xml>
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/build.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/build.xml?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/build.xml (original)
>> >> +++ ofbiz/trunk/framework/testtools/build.xml Tue Sep 22 04:00:22 2009
>> >> @@ -32,6 +32,7 @@
>> >>      <path id="local.class.path">
>> >>          <fileset dir="${lib.dir}" includes="*.jar"/>
>> >>          <fileset dir="../base/lib" includes="*.jar"/>
>> >> +    <fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
>> >>          <fileset dir="../base/lib/scripting" includes="*.jar"/>
>> >>          <fileset dir="../base/lib/commons" includes="*.jar"/>
>> >>          <fileset dir="../base/build/lib" includes="*.jar"/>
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/config/seleniumXml.properties?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/config/seleniumXml.properties (original)
>> >> +++ ofbiz/trunk/framework/testtools/config/seleniumXml.properties Tue Sep 22 04:00:22 2009
>> >> @@ -1,5 +1,5 @@
>> >>  serverHost=localhost
>> >>  proxyPort=4444
>> >> -browser=*firefox
>> >> +browser=*firefox /usr/lib/firefox-3.0.14/firefox
>> >>  startUrl=http://localhost:8080/
>> >> -log4jFile=./config/log4j.properties
>> >> +log4jFile=./config/log4j.properties
>> >> \ No newline at end of file
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,92 @@
>> >> +<?xml version="1.0"?>
>> >> +<!--
>> >> +    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.
>> >> +-->
>> >> +<section xmlns="http://docbook.org/ns/docbook"
>> >> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
>> >> +    +    <title>OFBiz SeleniumXml Introduction</title>
>> >> +    <para>
>> >> +        This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a copy of 
>> >> the
>> >> presentation that was given at the ApacheCon2008 OFBiz Conference that describes more about the
>> >> project:<ulink>http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf</ulink>
>> >> +    </para>
>> >> +    <section>
>> >> +        <title>Installing SeleniumXml</title>
>> >> +        <para>1. From the ofbiz directory run the following ant command to download the needed selenium- server.jar 
>> >> file.</para>
>> >> +        <para>2. ant download-selenium</para>
>> >> +        <para>3. ant run-install-extseed (For run install help data and example test)</para>
>> >> +        <para>4. Build the source by running “ant” in the testtools directory or your OFBIZ_HOME</para>
>> >> +        <para>You should now have everything you need to run a seleniumXml test.</para> +    </section>
>> >> +    +    <section>
>> >> +    <title>Running the Example Test</title>
>> >> +    +        <para>SeleniumXml requires the selenium server to be running. The selenium server uses a default proxy port of
>> >> 4444. The default port can be changed when you start the server. Selenium tries to automatically change the proxy settings in 
>> >> the
>> >> testing browser. If you are getting communication errors with the server you may have to manually change your proxy settings 
>> >> in
>> >> your browser.</para>
>> >> +        <section>
>> >> +            <title>1. Start ofbiz as normal.</title>
>> >> +            <para>Note: Before run ofbiz with selenium should changes ofbiz to use HTTP as the default at file
>> >> (framework/webapp/config/url.properties) . Instead everything just works through port 8080. Selenium supports https but it is
>> >> more complicated so for this introduction I have turned https off.</para>
>> >> +        </section>
>> >> +        <section>
>> >> +            <title>2. Start the selenium server:</title>
>> >> +            <para>runSeleniumServer.bat / runSeleniumServer.sh </para>
>> >> +        </section>
>> >> +        <section>
>> >> +            <title>3. Change the configuration for your preferred browser in the testtools/config/seleniumxml.properties 
>> >> file.
>> >> The default is firefox (e.g. browser=*firefox) but you can change it to any of the selenium supported browsers.</title>
>> >> +            <para>Selenium supported browsers: <ulink>http://seleniumhq.org/about/platforms.html#browsers</ulink></para> +
>> >> </section>
>> >> +        <section>
>> >> +            <title>4. Run the Example test</title>
>> >> +            <section>
>> >> +                <title>4.1 run the Example test  .bat/.sh file</title>
>> >> +                        <para>runSeleniumXml.bat / runSeleniumXml.sh testdef/seleniumxml/example/example_testsuite.xml</para>
>> >> +                        <para>The above test combines three different tests into a single test suite. Data is passed from one
>> >> test to another to allow you to share generated data.</para>
>> >> +                        <para>You will get an assertion (or other exception) if the test fails.</para>
>> >> +                        <para>The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed
>> >> value="500"  command). You can remove this at the start of the test if you don't want the delay</para>
>> >> +                        <para>- Here are some screen shots of what you should be seeing.</para>
>> >> +                            <!--para>
>> >> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup1.jpeg" height="150"
>> >> width="400"></graphic>
>> >> +                            </para>
>> >> +                            <para>
>> >> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup2.jpeg" height="150"
>> >> width="400"></graphic> <graphic fileref="/images/seleniums/ofbizSeleniumSetup3.jpeg" height="150" width="400"></graphic>/>
>> >> +                            </para-->
>> >> +            </section>
>> >> +            <section>
>> >> +                <title>4.2 run the Example test  webtools/Run Selenium</title>
>> >> +                        <para>
>> >> +                            First you need to open the file example_testsuite.xml and comment out first part.. and enable the
>> >> bottom one
>> >> +                            Here is another way to run the selenium test suite and you can create new test suite for your web
>> >> application. Scroll up on this page then you will see the link "Run Selenium" next to "Selenium Intro" click on that link. +
>> >> On that page you will see the list of available test suites. So you can click on "Run" to run the test suite you want but 
>> >> please
>> >> remember that the Selenium server should be started before you "run" any test.
>> >> +                            You can also create new test suite by fill in the information to the form and put the directory
>> >> location of your test suite in the field "Test Suite Path" then submit. If you want to know how the test is created you can 
>> >> take
>> >> a look at the file example_testsuite.xml for more info.
>> >> +                        </para>
>> >> +            </section>
>> >> +        </section>
>> >> +    </section>
>> >> +    <section>
>> >> +        <title>Creating New Tests :</title> +        <para>The easiest way to create a new test is to use the Selenium IDE
>> >> plugin for Firefox. This allows you to records your own Selenium tests. You can then save the test and convert it to a
>> >> seleniumXml test easily.</para>
>> >> +        <para>1. Install the latest plugin at <ulink>http://seleniumhq.org/projects/ide/</ulink></para>
>> >> +        <para>2. Record your steps as you run through your ofbiz application.</para>
>> >> +        <para>3. Then convert the saved XML file using the convertSeleniumIDE.bat script.</para>
>> >> +    </section>
>> >> +    <section>
>> >> +        <title>For example:</title> +        <para>1. convertSeleniumIDE.bat
>> >> testdef/seleniumxml/example/recorded/AjaxExample.html testdef/seleniumxml/example/recorded/AjaxExample.xml</para>
>> >> +        <para>2. Manually modify the commands to suit your needs.</para>
>> >> +    </section>
>> >> +</section>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,154 @@
>> >> +<?xml version="1.0"?>
>> >> +<!--
>> >> +    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.
>> >> +-->
>> >> +<section xmlns="http://docbook.org/ns/docbook"
>> >> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
>> >> +    <section>
>> >> +        <title>OFBiz SeleniumXml Introduction with HTTPS</title>
>> >> +        <para>How to setup in firefox browser?</para>
>> >> +        <para>
>> >> +            The problem for https is that the selenium­RC 1.0 and later will be runs in a separate profile +
>> >> automatically when the Selenium test is opening a new session for the Firefox browser the browser will +            need a
>> >> security certificate every time. When this occurs the browser displays security pop up, and these +            pop up cannot 
>> >> be
>> >> closed using Selenium­RC .  So how to solve this?
>> >> +        </para>
>> >> +        <para>
>> >> +            Create a separate Firefox profile for your tests ( adding a https certificate or install some add­ons)
>> >> +        </para>
>> >> +        <section>
>> >> +            <title>For Ubuntu Linux : </title>
>> >> +            <para> -  Make sure all your Firefox instances are closed .</para>
>> >> +            <para> -  Open a new Terminal and type the command firefox -p -no-remote  in the terminal then press enter. The 
>> >> pop
>> >> up window will appear.</para>
>> >> +            <!--screenshot>
>> >> +                <graphic fileref="/images/seleniums/profile1.png" width="300" height="300"></graphic>
>> >> +                <caption>
>> >> +                    <para>
>> >> +                        Clicking on “Create Profile” to Create the new profile using the dialog , enter new profile name 
>> >> ,
>> >> choose folder  to store your new profile and then click finish.
>> >> +                    </para>
>> >> +                </caption>
>> >> +            </screenshot-->
>> >> +            <!--screenshot>
>> >> +                <graphic fileref="/images/seleniums/profile3.png" width="400"></graphic>
>> >> +                <caption-->
>> >> +                    <para>
>> >> +                        After that click “Start Firefox” and configure settings based on suggestion below +
>> >> </para>
>> >> +                    <section>
>> >> +                        <title>warrning*</title>
>> >> +                        <para>
>> >> +                            Be sure to put your profile in a new folder separate from the default!!!
>> >> +                        </para>
>> >> +                        <para>
>> >> +                            The Firefox profile manager tool will delete all files in a folder if you delete +
>> >> </para>
>> >> +                        <para>
>> >> +                            a profile, regardless of whether they are profile files or not.
>> >> +                        </para>
>> >> +                    </section>
>> >> +                <!--/caption>
>> >> +            </screenshot-->
>> >> +        </section>
>> >> +        <section>
>> >> +            <title>- Suggested settings for your Selenium Profile</title>
>> >> +            <para>From “View\Toolbars” tab, uncheck “Bookmarks Toolbar” </para>
>> >> +            <para>Right click from toolbar and click “Customize” </para>
>> >> +            <para>Remove “Google search” by dragging it to the “Customize Toolbar” window </para>
>> >> +            <para>From the “Customize Toolbar” window, click “Use Small Icons” check box then hit “Done”</para>
>> >> +            <para>Click “Edit\Preferences” then set the following:</para>
>> >> +                <section>
>> >> +                    <title>“Main” tab</title>
>> >> +                    <para>- set Home Page to “about:blank”</para>
>> >> +                    <para>- uncheck “Show the Downloads..” option</para>
>> >> +                </section>   +                <section>
>> >> +                    <title>“Tabs” tab</title>
>> >> +                    <para>- Select “a new window” for new pages</para>
>> >> +                    <para>- Uncheck all warning options</para>
>> >> +                </section>
>> >> +                <section>
>> >> +                    <title>“Content” tab</title>
>> >> +                    <para>- uncheck “Block pop-up” windows option</para>
>> >> +                </section>
>> >> +                <section>
>> >> +                    <title> “Privacy” tab</title>
>> >> +                    <para>- uncheck all “History” options</para>
>> >> +                </section>
>> >> +                <section>
>> >> +                    <title>“Security” tab</title>
>> >> +                    <para>- uncheck all “Security” options</para>
>> >> +                    <para>- click “Settings” and uncheck all warning options</para>
>> >> +                </section>
>> >> +                <section>
>> >> +                    <title>“Advanced” tab</title>
>> >> +                    <para>- Uncheck “autoscrolling” option from “General” tab</para>
>> >> +                    <para>- uncheck “warn me …” and “Ssearch Engines”option from “Update” tab </para>
>> >> +                </section>
>> >> +            +                    <!--listitem>1.From “Tools\Add-ons” install the following:
>> >> +                        <para>- Firebug: allows you to edit, debug, and monitor CSS, HTML, and JavaScript on your application
>> >> under test</para>
>> >> +                        <para>- Selenium IDE: allows you to record, edit, and debug Selenium tests</para>
>> >> +                        <para>- ScreenGrab: saves entire webpages as images. </para>
>> >> +                    </listitem>
>> >> +                    <listitem>1.From the address bar type “about:config” and add the following by right-click anywhere on
>> >> the page and selecting “new”
>> >> +                        <para>- extensions.update.notifyUser (type=boolean; value=false)</para>
>> >> +                        <para>- extensions.newAddons (type=boolean; value=false) </para>
>> >> +                    </listitem>
>> >> +                    +                </orderedlist-->
>> >> +        </section>
>> >> +        +    </section>
>> >> +    <section>
>> >> +        <title></title>
>> >> +        <para></para>
>> >> +        <!--para>
>> >> +            Set certificate for your firefox profile type and enter <ulink type="http" url="https://localhost:8443/"></ulink>
>> >> +            (* An url you  want to get certificate.)  then add an exception
>> >> +        </para>
>> >> +        +        <screenshot>
>> >> +            <graphic fileref="/images/seleniums/profile2.png" width="400"></graphic>
>> >> +        </screenshot-->
>> >> +    </section>
>> >> +    <section>
>> >> +        <title></title>
>> >> +        <para>At the file “seleniumXml.properties”.</para> +        <para>Change browser=*firefox</para> + 
>> >> <para>To
>> >> browser=*firefox /usr/lib/firefox-3.0.8/firefox</para>  +        <para>(*** firefox path)</para>
>> >> +    </section>
>> >> +    <section>
>> >> +        <title></title>
>> >> +        <para>At the file “runSeleniumServer.sh” </para>
>> >> +        <para>"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar </para> +        <para>-firefoxProfileTemplate 
>> >> "put
>> >> path to the profile dir"  </para>  +        <para>-trustAllSSLCertificates -singleWindow  -timeout 240 +        </para>
>> >> +    </section>
>> >> +    <section>
>> >> +        <title>Note : Please follows the link</title>
>> >> +        <para>
>> >> +            <!--ulink> http://docs.ofbiz.org/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink-->
>> >> +        </para>
>> >> +        <para>
>> >> +            if your found the problem “ofbiz.org cert is expired causes peer not authenticated“.
>> >> +        </para>
>> >> +    </section>
>> >> +</section>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,38 @@
>> >> +<?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.
>> >> +-->
>> >> +
>> >> +<entity-engine-xml>
>> >> +    <!-- example test suite -->
>> >> +    <SeleniumTestSuitePath testSuiteId="EXAMPLE_TESTSUITE" testSuiteName="example_testsuite"
>> >> testSuitePath="framework/testtools/testdef/seleniumxml/example/example_testsuite.xml" description="test suite for example
>> >> component"/>
>> >> +    +    <!--Selenium Help  Load in contentTypeData.xml file -->
>> >> +    <!-- selenium test tool-->   +    <DataResource dataResourceId="SELENIUM_INTRO" localeString="en"
>> >> dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumIntro.xml" dataTemplateTypeId="NONE"
>> >> statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium Setup" mimeTypeId="text/xml" isPublic="Y" />
>> >> +    <Content contentId="SELENIUM_INTRO" contentTypeId="DOCUMENT" contentName="OFBiz Selenium"
>> >> templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_INTRO" localeString="en" statusId="CTNT_IN_PROGRESS"
>> >> mimeTypeId="text/html"/>/>    +    <ContentAssoc contentId="DOCUMENTS"  mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO"
>> >> contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
>> >> +    +    <DataResource dataResourceId="SELENIUM_HTTPS" localeString="en" dataResourceTypeId="OFBIZ_FILE"
>> >> objectInfo="framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
>> >> dataResourceName="Ofbiz Selenium HTTPS" mimeTypeId="text/xml" isPublic="Y" />
>> >> +    <Content contentId="SELENIUM_HTTPS" contentTypeId="DOCUMENT" contentName="OFBiz Selenium with HTTPS"
>> >> templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_HTTPS" localeString="en" statusId="CTNT_IN_PROGRESS"
>> >> mimeTypeId="text/html"/>/>    +    <ContentAssoc contentId="DOCUMENTS" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS"
>> >> contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
>> >> +    +    <ContentAssoc contentId="SELENIUM_INTRO" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS"
>> >> contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>    +    <ContentAssoc contentId="HELP_ROOT"
>> >> mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01"
>> >> sequenceNum=""/>
>> >> +     + </entity-engine-xml>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,42 @@
>> >> +<?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.
>> >> +-->
>> >> +
>> >> +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
>> >> +    <!-- ========================================================= -->
>> >> +    <!-- ======================== Defaults ======================= -->
>> >> +    <!-- ========================================================= -->
>> >> +    <title>Entity of an Open For Business Project Component</title>
>> >> +    <description>None</description>
>> >> +    <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright>
>> >> +    <author>None</author>
>> >> +    <version>1.0</version>
>> >> +    +    <entity entity-name="SeleniumTestSuitePath"
>> >> +        package-name="org.ofbiz.selenium.test"
>> >> +        default-resource-name="ExampleEntityLabels"
>> >> +        title="Selenium Test suite file">
>> >> +        <field name="testSuiteId" type="id-ne"></field>
>> >> +        <field name="testSuiteName" type="name"></field>
>> >> +        <field name="testSuitePath" type="description"></field>
>> >> +        <field name="description" type="very-long"></field>
>> >> +        <prim-key field="testSuiteId"/>
>> >> +    </entity>
>> >> +</entitymodel>
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/ofbiz-component.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/ofbiz-component.xml?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/ofbiz-component.xml (original)
>> >> +++ ofbiz/trunk/framework/testtools/ofbiz-component.xml Tue Sep 22 04:00:22 2009
>> >> @@ -1,37 +1,43 @@
>> >>  <?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.
>> >> +    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.
>> >>  -->
>> >>  <ofbiz-component name="testtools"
>> >> -        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> -        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
>> >> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
>> >>      <!-- define resource loaders; most common is to use the component resource loader -->
>> >>      <resource-loader name="main" type="component"/>
>> >>      <classpath type="dir" location="config"/>
>> >> -
>> >> +    <!-- place the config directory on the classpath to access configuration files -->
>> >>      <classpath type="dir" location="dtd"/>
>> >> -
>> >> +    <!-- load single or multiple external libraries -->
>> >>      <classpath type="jar" location="lib/*"/>
>> >>      <classpath type="jar" location="build/lib/*"/>
>> >> -
>> >> +    +    <!-- entitydef -->
>> >> +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
>> >> +    +    <entity-resource type="data" reader-name="seed" loader="main" location="documents/SeleniumHelpData.xml"/>
>> >> +    <!-- service resources: model(s), eca(s) and group definitions -->
>> >>      <service-resource type="model" loader="main" location="servicedef/services.xml"/>
>> >> -</ofbiz-component>
>> >> +    +</ofbiz-component>
>> >> \ No newline at end of file
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/runSeleniumServer.sh
>> >> URL: 
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumServer.sh?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/runSeleniumServer.sh (original)
>> >> +++ ofbiz/trunk/framework/testtools/runSeleniumServer.sh Tue Sep 22 04:00:22 2009
>> >> @@ -6,6 +6,6 @@
>> >>    JAVA=java
>> >>  fi
>> >>  -"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -timeout 240
>> >> +"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -singleWindow  -trustAllSSLCertificates -timeout 240
>> >>  exit 0
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original)
>> >> +++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Tue Sep 22 04:00:22 2009
>> >> @@ -9,6 +9,7 @@
>> >>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
>> >>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar
>> >>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar
>> >> +export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar
>> >>  echo $CP
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,46 @@
>> >> +<?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.
>> >> +-->
>> >> +
>> >> +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
>> >> +    <simple-method method-name="updateSeleniumTestSuitePath"  short-description="add new test suite path file ">
>> >> +
>> >> +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
>> >> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
>> >> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
>> >> +        <if-not-empty field="lookedUpValue.testSuiteId">
>> >> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
>> >> +            <store-value value-field="lookedUpValue"/>
>> >> +        </if-not-empty>
>> >> +        <if-empty field="lookedUpValue.testSuiteId">
>> >> +            <set-nonpk-fields map="parameters" value-field="lookupPKMap"/>
>> >> +            <create-value value-field="lookupPKMap"/>
>> >> +        </if-empty>
>> >> +    </simple-method>
>> >> +    <simple-method method-name="removeSeleniumTestSuitePath"  short-description="remove test suite path file ">
>> >> +        +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
>> >> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
>> >> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
>> >> +        <if-not-empty field="lookedUpValue.testSuiteId">
>> >> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
>> >> +            <remove-value value-field="lookedUpValue"/>
>> >> +        </if-not-empty>
>> >> +    </simple-method>
>> >> +</simple-methods>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java (added)
>> >> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,179 @@
>> >> +package org.ofbiz.testtools;
>> >> +
>> >> +import java.io.BufferedInputStream;
>> >> +import java.io.BufferedOutputStream;
>> >> +import java.io.File;
>> >> +import java.io.FileOutputStream;
>> >> +import java.io.IOException;
>> >> +import java.io.InputStream;
>> >> +import java.io.UnsupportedEncodingException;
>> >> +import java.io.Writer;
>> >> +import java.net.MalformedURLException;
>> >> +import java.net.URL;
>> >> +import java.net.URLConnection;
>> >> +import java.util.Map;
>> >> +import java.util.Properties;
>> >> +
>> >> +import javax.servlet.http.HttpServletRequest;
>> >> +import javax.servlet.http.HttpServletResponse;
>> >> +
>> >> +import org.ofbiz.base.util.Debug;
>> >> +import org.ofbiz.base.util.UtilProperties;
>> >> +import org.ofbiz.base.util.UtilURL;
>> >> +
>> >> +
>> >> +import javolution.util.FastMap;
>> >> +
>> >> +
>> >> +import net.sf.json.JSONObject;
>> >> +
>> >> +
>> >> +public class VerifySeleniumSetups {
>> >> +
>> >> + public static final String module = VerifySeleniumSetups.class.getName();
>> >> + private static int currentValue  = 0;
>> >> + private static int contentLength = 0;
>> >> + private static Map<String,Object> josonMap = null;
>> >> + private static String urlSite =
>> >> "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=";
>> >> + private static String libPath = "framework/testtools/lib/selenium-server.jar";
>> >> +
>> >> + public VerifySeleniumSetups(){
>> >> +
>> >> + }
>> >> +
>> >> + /* prepare lib for selenium test + * Check & download selenium-server.jar from
>> >> http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=
>> >> + * Check a change use HTTP as the default at file framework/webapp/config/url.properties  + * Check correct the
>> >> config/seleniumXml.properties and firefox  path
>> >> + */
>> >> +
>> >> + public static String verifyConfig(HttpServletRequest request, HttpServletResponse response){
>> >> + boolean lib = false;
>> >> + boolean urlset = false;
>> >> + Map<String,Object> msgMap = FastMap.newInstance();
>> >> + Properties urlProps = null;
>> >> + try{
>> >> + /* Check and down load selenium-server.jar */ + File file = new File(libPath);
>> >> + URL url = new URL(urlSite);
>> >> + URLConnection connection = url.openConnection();
>> >> + contentLength = connection.getContentLength();
>> >> + if(contentLength == -1){
>> >> + request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet");
>> >> + }
>> >> + Debug.log("file size. "+contentLength,module);
>> >> + if(file.exists()){
>> >> + if(contentLength == file.length()){
>> >> + lib = true;
>> >> + }else lib = false;
>> >> + }
>> >> + msgMap.put("LIBFLAG",lib);
>> >> +
>> >> + /* Check a change use HTTP as the default */
>> >> + String httpStatus = null;
>> >> + URL urlProp = UtilURL.fromResource("url.properties");
>> >> + if (urlProps == null) {
>> >> + urlProps = new Properties();
>> >> + if (urlProp == null) {
>> >> + String errMsg = "variable with name " + urlProp.toString() + " is not set, cannot resolve location.";
>> >> + throw new MalformedURLException(errMsg);
>> >> + }
>> >> + urlProps = UtilProperties.getProperties(urlProp);
>> >> + if(urlProps != null){
>> >> + httpStatus = urlProps.getProperty("port.https.enabled");
>> >> + if(httpStatus != null && httpStatus.equals("N")){
>> >> + urlset = true;
>> >> + }
>> >> + }
>> >> + }
>> >> + msgMap.put("URLFLAG",urlset);
>> >> + request.setAttribute("MSGMAP", msgMap);
>> >> + }catch(Exception e){
>> >> + Debug.logError(e.getMessage(), module);
>> >> + }
>> >> + return "success";
>> >> + }
>> >> +
>> >> + public  static void doDownload( HttpServletRequest request, HttpServletResponse response){
>> >> + URL url = null;
>> >> + long bytesRead= 0;
>> >> + currentValue  = 0;
>> >> + contentLength = 0;
>> >> + BufferedInputStream in = null;
>> >> + BufferedOutputStream out = null;
>> >> + try {
>> >> + url = new URL(urlSite);
>> >> +
>> >> + URLConnection connection = url.openConnection();
>> >> + contentLength = connection.getContentLength();
>> >> + InputStream stream = connection.getInputStream();
>> >> + Debug.log("getContentLength is :"+contentLength);
>> >> +
>> >> + in = new BufferedInputStream(stream);
>> >> +
>> >> + long totalBytes = in.available();
>> >> + Debug.log("totalBytes is : "+totalBytes);
>> >> +
>> >> + byte[] b = new byte[1024];
>> >> +
>> >> + FileOutputStream file = new FileOutputStream(libPath);
>> >> + out = new BufferedOutputStream(file);
>> >> +
>> >> + int r;
>> >> + Debug.log("currentValue is : "+currentValue+" bytes");
>> >> + while ((r = in.read(b,0,b.length)) != -1) {
>> >> + out.write(b,0,r);
>> >> + bytesRead += r;
>> >> + currentValue = (int)(bytesRead * 100 / contentLength);
>> >> + // Debug.log("loading.. :"+bytesRead);
>> >> + }
>> >> + out.flush();
>> >> + } catch (IOException ex) {
>> >> + Debug.logError("Error message :"+ex.getMessage(),module);
>> >> + }finally {
>> >> + try {
>> >> + if (in != null) in.close();
>> >> + if (out != null) out.close();
>> >> + }catch (Exception ex) {
>> >> + Debug.logError("Error message :"+ex.getMessage(),module);
>> >> + }
>> >> + }
>> >> + }
>> >> +
>> >> + public static String checkProgressDownloadStatus(HttpServletRequest request, HttpServletResponse response){
>> >> + if(josonMap == null){
>> >> + josonMap = FastMap.newInstance();
>> >> + }
>> >> +
>> >> + josonMap.put("loadPercent", currentValue);
>> >> + josonMap.put("contentLength", contentLength);
>> >> + toJsonObject(josonMap,response);
>> >> +
>> >> + return "success";
>> >> + }
>> >> +
>> >> + public static void toJsonObject(Map<String,Object> attrMap, HttpServletResponse response){
>> >> + JSONObject json = JSONObject.fromObject(attrMap);
>> >> + String jsonStr = json.toString();
>> >> + if (jsonStr == null) {
>> >> + Debug.logError("JSON Object was empty; fatal error!",module);
>> >> + }
>> >> + // set the X-JSON content type
>> >> + response.setContentType("application/json");
>> >> + // jsonStr.length is not reliable for unicode characters
>> >> + try {
>> >> + response.setContentLength(jsonStr.getBytes("UTF8").length);
>> >> + } catch (UnsupportedEncodingException e) {
>> >> + Debug.logError("Problems with Json encoding",module);
>> >> + }
>> >> + // return the JSON String
>> >> + Writer out;
>> >> + try {
>> >> + out = response.getWriter();
>> >> + out.write(jsonStr);
>> >> + out.flush();
>> >> + } catch (IOException e) {
>> >> + Debug.logError("Unable to get response writer",module);
>> >> + }
>> >> + }
>> >> +}
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/plain
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original)
>> >> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Tue Sep 22 04:00:22 2009
>> >> @@ -18,11 +18,17 @@
>> >>   */
>> >>  package org.ofbiz.testtools.seleniumxml;
>> >>  +import java.io.BufferedInputStream;
>> >> +import java.io.BufferedOutputStream;
>> >> +import java.io.DataInputStream;
>> >>  import java.io.File;
>> >>  import java.io.FileInputStream;
>> >> +import java.io.FileOutputStream;
>> >>  import java.io.IOException;
>> >>  import java.io.InputStream;
>> >>  import java.net.MalformedURLException;
>> >> +import java.net.URL;
>> >> +import java.net.URLConnection;
>> >>  import java.util.List;
>> >>  import java.util.ArrayList;
>> >>  import java.util.Map;
>> >> @@ -31,10 +37,12 @@
>> >>  import java.util.regex.Pattern;
>> >>  import java.lang.reflect.*;
>> >>  +import javax.servlet.http.HttpServletRequest;
>> >> +import javax.servlet.http.HttpServletResponse;
>> >>  import javolution.util.FastMap;
>> >> -
>> >>  import junit.framework.Assert;
>> >>  +import org.apache.commons.io.output.ByteArrayOutputStream;
>> >>  import org.apache.commons.lang.RandomStringUtils;
>> >>  import org.apache.log4j.Level;
>> >>  import org.apache.log4j.Logger;
>> >> @@ -43,9 +51,12 @@
>> >>  import org.jdom.Element;
>> >>  import org.jdom.JDOMException;
>> >>  import org.jdom.input.SAXBuilder;
>> >> +import org.ofbiz.testtools.seleniumxml.util.TestUtils;
>> >>  import org.ofbiz.base.util.UtilGenerics;
>> >> -import org.ofbiz.testtools.seleniumxml.util.TestUtils;
>> >> +import org.ofbiz.base.util.UtilHttp;
>> >> +import org.ofbiz.base.util.UtilProperties;
>> >> +import org.ofbiz.base.util.UtilURL;
>> >>  import com.thoughtworks.selenium.DefaultSelenium;
>> >>  //import com.thoughtworks.selenium.SeleniumException;
>> >> @@ -53,7 +64,8 @@
>> >>  public class SeleniumXml {
>> >>      -    public static final String PROPS_NAME = "selenium.config";
>> >> +    //public static final String PROPS_NAME = "selenium.config";
>> >> +    public static String PROPS_NAME = "selenium.config";
>> >>      Logger  logger = Logger.getLogger(SeleniumXml.class.getName());
>> >>  public static final int MAX_STR_LENGTH = 15;
>> >> @@ -83,6 +95,35 @@
>> >>              sel.runTest(args[0]);
>> >>          }
>> >>      }
>> >> +   +    /* call run test suite from webtool selenium */
>> >> +    public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){
>> >> +    Map parameters = UtilHttp.getParameterMap(request);
>> >> +    String para = (String)parameters.get("testSuitePath");
>> >> +    if(para == null){
>> >> +    System.out.println("Error message : Test suite Path  is null");
>> >> +    return "success";
>> >> +    }
>> >> +    if(para.length()==0){
>> >> +    System.out.println("Error message : Test suite Path  is null");
>> >> +    return "success";
>> >> +    }
>> >> +    try{
>> >> +    URL url = UtilURL.fromResource("seleniumXml.properties");
>> >> +    if (props == null) {
>> >> +             props = new Properties();
>> >> +             initConfig(url);
>> >> +    }
>> >> +    SeleniumXml sel = new SeleniumXml();
>> >> +    sel.runTest(para.trim());
>> >> +        }catch(JDOMException jdome){
>> >> +    System.out.println(jdome.getMessage());
>> >> +    }catch(IOException ioe){
>> >> +    System.out.println("Error message : "+ioe.getMessage());
>> >> +    }finally{
>> >> +    return "success";
>> >> +    }
>> >> +    }
>> >>      public SeleniumXml() throws IOException {
>> >>          this.map = FastMap.newInstance();
>> >> @@ -95,7 +136,12 @@
>> >>  private static void initConfig() throws IOException {
>> >>          try {
>> >> -            String configFile = System.getProperty(PROPS_NAME);
>> >> +        String configFile  = "";
>> >> +        if(System.getProperty(PROPS_NAME)==null){
>> >> +        configFile = PROPS_NAME;
>> >> +        }else{
>> >> +        configFile = System.getProperty(PROPS_NAME);
>> >> +        }
>> >>              if (configFile == null) {
>> >>                  String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot
>> >> resolve location.";
>> >>                  throw new MalformedURLException(errMsg);
>> >> @@ -111,6 +157,19 @@
>> >>              throw e;
>> >>          }
>> >>      }
>> >> +    private static void initConfig(URL url) throws IOException {
>> >> +        try {
>> >> +            if (url == null) {
>> >> +                String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, 
>> >> cannot
>> >> resolve location.";
>> >> +                throw new MalformedURLException(errMsg);
>> >> +            }
>> >> +           // BasicConfigurator.configure();
>> >> +            props = UtilProperties.getProperties(url);
>> >> +        } catch (IOException e) {
>> >> +            e.printStackTrace();
>> >> +            throw e;
>> >> +        }
>> >> +    }
>> >>      /**
>> >>       * Constructor to preset with an existing Map of parameters.  Intended to be used @@ -136,7 +195,8 @@
>> >>  public void runCommands() {
>> >>          Element root = this.doc.getRootElement();
>> >> -        List<Element> nodes = UtilGenerics.cast(root.getChildren());
>> >> +        //List<Element> nodes = UtilGenerics.cast(root.getChildren());
>> >> +        List<Element> nodes = root.getChildren();
>> >>          runCommands(nodes);
>> >>      }
>> >>      @@ -734,5 +794,4 @@
>> >>      public Map <String, Object> getMap() {
>> >>          return this.map;
>> >>      }
>> >> -}
>> >> -
>> >> +}
>> >> \ No newline at end of file
>> >>
>> >> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml (original)
>> >> +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml Tue Sep 22 04:00:22 2009
>> >> @@ -1,8 +1,14 @@
>> >>  <?xml version="1.0"?>
>> >>  <testcase>
>> >>      <setSpeed value="500" />
>> >> -    <testcase file="testdef/seleniumxml/example/example_login.xml"/>
>> >> +    +    <!-- start from runSeleniumXml.sh -->
>> >> +    <!--testcase file="testdef/seleniumxml/example/example_login.xml"/>
>> >>      <testcase file="testdef/seleniumxml/example/example_new.xml"/>
>> >> -    <testcase file="testdef/seleniumxml/example/example_search.xml"/>
>> >> +    <testcase file="testdef/seleniumxml/example/example_search.xml"/-->
>> >> +    <!-- start from webtools/run selenium -->
>> >> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_login.xml"/>
>> >> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_new.xml"/>
>> >> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_search.xml"/>
>> >>  </testcase>
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl (added)
>> >> +++ ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,117 @@
>> >> +<#--
>> >> +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.
>> >> +-->
>> >> +
>> >> +<#assign  libcheck  =  "">
>> >> +<#assign  urlcheck  =  "">
>> >> +<#assign msg = request.getAttribute("MSGMAP")?if_exists>
>> >> +<#if msg?has_content>
>> >> +    <#if msg.LIBFLAG?exists><#assign  libcheck  =  msg.LIBFLAG?if_exists?string></#if>
>> >> +    <#if msg.URLFLAG?exists><#assign  urlcheck  =  msg.URLFLAG?if_exists?string></#if>
>> >> +</#if>
>> >> +<a id="verifly" href="<@o...@ofbizUrl>" class="buttontext">Verify</a>
>> >> +<table class="basic-table hover-bar" cellspacing="0">
>> >> +        <tr class="header-row" >
>> >> +          <td>Description</td>
>> >> +          <td>Status</td>
>> >> +        </tr>
>> >> +        <tr>
>> >> +          <td>- selenium_server.jar </td>
>> >> +          <td>
>> >> +                <#if libcheck == "true">
>> >> +                    success
>> >> +                <#else>
>> >> +                    <div style="color:red;" id="message">please click download this lib for run the selenium 
>> >> application!</div>
>> >> +                    <div id="loadpercent"><a id="download"
>> >> href="javascript:clickDownLoad('<@o...@ofbizUrl>');" class="buttontext">download</a></div>
>> >> +                    <div id="progress_bar"  style="display:none"></div>
>> >> +                    <div id="filesize"  style="display:none"></div>
>> >> +                </#if>
>> >> +          </td>
>> >> +        </tr>
>> >> +        <tr valign="middle" class="alternate-row">
>> >> +          <td>- Changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties)</td>
>> >> +          <td>
>> >> +                <#if  urlcheck == "true">
>> >> +                    success
>> >> +                <#else>
>> >> +                    <div style="color:red;">Not success!</div>
>> >> +                </#if>
>> >> +          </td>
>> >> +        </tr>
>> >> +        <tr>
>> >> +          <td> +            <ol>
>> >> +            <li>Edit 'framework/testtools/config/seleniumXml.properties' and  add your firefox path, replace the example in 
>> >> the
>> >> file</li>
>> >> +            <li>Then save and restart ofbiz.</li>
>> >> +            <li>Then open a new terminal to start the seleniumserver. (cd framework/testtools;./runSeleniumServer.sh)</li>
>> >> +            <li>Then run the test below.</li>
>> >> +            </ol>
>> >> +          </td>
>> >> +          <td>
>> >> +          </td>
>> >> +        </tr>
>> >> +      </table>
>> >> +<script type="text/javascript"> +    var progressBar;
>> >> +    // click start load call servlet & new progressBar
>> >> +    function clickDownLoad(url){
>> >> +         startDownLoad(url);
>> >> +         $('progress_bar').style.display = "";
>> >> +         $('filesize').style.display = "";
>> >> +         progressBar = new Control.ProgressBar('progress_bar');
>> >> +    }
>> >> +    +    function startDownLoad(url){
>> >> +        var pars = '';
>> >> +        var myAjax = new Ajax.Request( url, {
>> >> +                method: 'post', +                parameters: pars, +                onLoading:getProgressDownloadStatus,
>> >> +                onComplete : $('download').innerHTML = 'loading....'
>> >> +            } );            +    }
>> >> +    +    //function PeriodicalExecuter check download status
>> >> +    function getProgressDownloadStatus(){
>> >> +        new PeriodicalExecuter(function(event){
>> >> +            var pars = '';
>> >> +            var myAjax = new Ajax.Request( '<@o...@ofbizUrl>', {
>> >> +                    method: 'get', +                    parameters: pars, +                    onSuccess:function
>> >> check(transfer){
>> >> +                       var data = transfer.responseText.evalJSON(true);
>> >> +                       if( data != null ){
>> >> +                           if(data.contentLength != null && data.loadPercent != null){
>> >> +                               var loadPercent = data.loadPercent;
>> >> +                               $('loadpercent').innerHTML = ''+loadPercent+'%';
>> >> +                               var contentLength  = data.contentLength;
>> >> +                               //$('filesize').innerHTML = '<b>'+contentLength/1000 + ' k</b>';
>> >> +                               progressBar.setProgress(loadPercent);
>> >> +                               if(loadPercent > 99){
>> >> +                                    $('download').innerHTML = 'download';
>> >> +                                    event.stop();
>> >> +                               }
>> >> +                           }
>> >> +                       }
>> >> +                    }
>> >> +            } );
>> >> +        },1);
>> >> +       $('message').innerHTML = 'success';
>> >> +       $('message').style.color = "black";
>> >> +    }
>> >> +</script>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/plain
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,76 @@
>> >> +<?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.
>> >> +-->
>> >> +
>> >> +<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
>> >> +    <!-- The controller elements that are common to all OFBiz components
>> >> +        can be found in the following xml file. A component can override the
>> >> +        elements found in the common-controller.xml file. -->
>> >> +    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>> >> +    +    <!--  selenium Test Case -->
>> >> +    <request-map uri="selenium">
>> >> +        <security https="true" auth="true"/>
>> >> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    <request-map uri="verify">
>> >> +        <security https="true" auth="true"/>
>> >> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    <request-map uri="downloadSeleniumlib">
>> >> +        <security https="true" auth="true"/>
>> >> +        <!-- validate Install all libs want to use in selenium -->
>> >> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="doDownload"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    <request-map uri="progressDownloadStatus">
>> >> +        <security https="true" auth="true"/>
>> >> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="checkProgressDownloadStatus"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    <request-map uri="runTestSuite">
>> >> +        <security https="false" auth="false"/>
>> >> +        <event type="java" path="org.ofbiz.testtools.seleniumxml.SeleniumXml" invoke="runTestSuite"/>
>> >> +        <response name="success" type="request-redirect" value="selenium" />
>> >> +    </request-map>
>> >> +    +    <request-map uri="updateSeleniumTestSuitePath">
>> >> +        <security https="true" auth="true"/>
>> >> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml"
>> >> invoke="updateSeleniumTestSuitePath"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    <request-map uri="removeSeleniumTestSuitePath">
>> >> +        <security https="true" auth="true"/>
>> >> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml"
>> >> invoke="removeSeleniumTestSuitePath"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    +    <request-map uri="editSeleniumTestSuitePath">
>> >> +    <security https="true" auth="true"/>
>> >> +        <response name="success" type="view" value="selenium"/>
>> >> +    </request-map>
>> >> +    +    <!--  selenium Test Case -->
>> >> +    <view-map name="selenium" type="screen" page="component://testtools/widget/CommonScreens.xml#selenium"/>
>> >> +    <view-map name="runSelenium" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
>> >> +    <view-map name="test" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
>> >> +</site-conf>
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,90 @@
>> >> +<?xml version="1.0" encoding="UTF-8"?>
>> >> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
>> >> +<!--
>> >> +    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.
>> >> +-->
>> >> +
>> >> +<web-app>
>> >> +    <display-name>Open For Business - Example Application</display-name>
>> >> +    <description>Example Application of the Open For Business Project</description>
>> >> +    +    <context-param>
>> >> +        <param-name>webSiteId</param-name>
>> >> +        <param-value>TESTTOOLS</param-value>
>> >> +        <description>A unique ID used to look up the WebSite entity</description>
>> >> +    </context-param>
>> >> +    <context-param>
>> >> +        <param-name>localDispatcherName</param-name><param-value>testtools</param-value>
>> >> +        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
>> >> +    </context-param>
>> >> +    <context-param>
>> >> +        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
>> >> +        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
>> >> +    </context-param>
>> >> +    <context-param>
>> >> +        <param-name>mainDecoratorLocation</param-name>
>> >> +        <param-value>component://example/widget/example/CommonScreens.xml</param-value>
>> >> +        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in
>> >> screen def XML files.</description>
>> >> +    </context-param>
>> >> +    <context-param>
>> >> +        <param-name>widgetVerbose</param-name>
>> >> +        <param-value>false</param-value>
>> >> +        <description>Enable widget boundary comments. See
>> >> org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
>> >> +    </context-param>
>> >> +    <context-param>
>> >> +        <param-name>compressHTML</param-name>
>> >> +        <param-value>false</param-value>
>> >> +        <description>Remove unnecessary whitespace from HTML output.</description>
>> >> +    </context-param>
>> >> +    +    <filter>
>> >> +        <filter-name>ContextFilter</filter-name>
>> >> +        <display-name>ContextFilter</display-name>
>> >> +        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
>> >> +        <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
>> >> +        <init-param>
>> >> +            <param-name>allowedPaths</param-name>
>> >> +
>> >> <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
>> >> +        </init-param>
>> >> +        <init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
>> >> +        <init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>
>> >> +    </filter>
>> >> +    <filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
>> >> +    +    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
>> >> +    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
>> >> +    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
>> >> +    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
>> >> +    +    <servlet>
>> >> +        <servlet-name>ControlServlet</servlet-name>
>> >> +        <display-name>ControlServlet</display-name>
>> >> +        <description>Main Control Servlet</description>
>> >> +        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
>> >> +        <load-on-startup>1</load-on-startup>
>> >> +    </servlet>
>> >> +    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
>> >> +    +    <session-config><session-timeout>60</session-timeout><!-- in minutes --></session-config>
>> >> +    +    <welcome-file-list>
>> >> +        <welcome-file>index.jsp</welcome-file>
>> >> +        <welcome-file>index.html</welcome-file>
>> >> +        <welcome-file>index.htm</welcome-file>
>> >> +    </welcome-file-list>
>> >> +</web-app>
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/CommonScreens.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/widget/CommonScreens.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/widget/CommonScreens.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,96 @@
>> >> +<?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://ofbiz.apache.org/dtds/widget-screen.xsd">
>> >> +    <screen name="main-decorator">
>> >> +        <section>
>> >> +            <actions>
>> >> +                <!-- base/top/specific map first, then more common map added for shared labels -->
>> >> +                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
>> >> +                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
>> >> +                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
>> >> +                <set field="layoutSettings.companyName" from-field="uiLabelMap.WebtoolsCompanyName" global="true"/>
>> >> +                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.WebtoolsCompanySubtitle" global="true"/>
>> >> +                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
>> >> +                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
>> >> +                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
>> >> +                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>> >> +                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>> >> +                <set field="activeApp" value="webtools" global="true"/>
>> >> +                <!-- <set field="appheaderTemplate" value="component://webtools/webapp/webtools/includes/appheader.ftl"
>> >> global="true"/> -->
>> >> +                +                <set field="applicationMenuLocation" value="component://webtools/widget/Menus.xml"
>> >> global="true"/>
>> >> +                <set field="applicationMenuName" value="WebtoolsAppBar" global="true"/>
>> >> +                <set field="applicationTitle" value="${uiLabelMap.FrameworkWebTools}" global="true"/>
>> >> +            </actions>
>> >> +            <widgets>
>> >> +                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>> >> +            </widgets>
>> >> +        </section>
>> >> +    </screen>
>> >> +    +    <screen name="main">
>> >> +        <section>
>> >> +            <actions>
>> >> +                <set field="titleProperty" value="WebtoolsMainPage"/>
>> >> +                <set field="headerItem" value="main"/>
>> >> +            </actions>
>> >> +            <widgets>
>> >> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
>> >> +                    <decorator-section name="body">
>> >> +                        <platform-specific><html><html-template
>> >> location="component://webtools/webapp/webtools/main.ftl"/></html></platform-specific>
>> >> +                    </decorator-section>
>> >> +                </decorator-screen>
>> >> +            </widgets>
>> >> +        </section>
>> >> +    </screen>
>> >> +    +    <screen name="selenium">
>> >> +        <section>
>> >> +            <actions>
>> >> +                <set field="tabButtonItem" value="selenium"/> +                <set field="layoutSettings.javaScripts[]"
>> >> value="/images/prototypejs/prototype.js" global="true"/>
>> >> +                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>
>> >> +                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
>> >> +                <entity-one entity-name="SeleniumTestSuitePath"  value-field="testSuitePath">
>> >> +                    <field-map field-name="testSuiteId" value="${parameters.testSuiteId}"/>
>> >> +                </entity-one>
>> >> +            </actions>
>> >> +            <widgets>
>> >> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
>> >> +                    <decorator-section name="body">
>> >> +                        <!--include-menu name="SeleniumTabBar" location="component://testtools/widget/Menus.xml"/-->
>> >> +                        <screenlet title="OFBiz SeleniumXml Verify">
>> >> +                            <platform-specific><html><html-template
>> >> location="component://testtools/webapp/testtools/SeleniumTest.ftl"/></html></platform-specific>
>> >> +                        </screenlet>
>> >> +                        <screenlet title="Test Suite List">
>> >> +                            <include-form name="seleniumTestSuitePathList"
>> >> location="component://testtools/widget/RunSeleniumForms.xml"/>
>> >> +                        </screenlet>
>> >> +                        <link target="runSelenium"  style="buttontext" text="New Test Suite"></link>
>> >> +                        <screenlet title="New Test Suite">
>> >> +                            <include-form name="editSeleniumTestSuitePath"
>> >> location="component://testtools/widget/RunSeleniumForms.xml"/>
>> >> +                        </screenlet>
>> >> +                    </decorator-section>
>> >> +                </decorator-screen>
>> >> +            </widgets>
>> >> +        </section>
>> >> +    </screen>
>> >> +</screens>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/Menus.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/widget/Menus.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/widget/Menus.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,31 @@
>> >> +<?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.
>> >> +-->
>> >> +
>> >> +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
>> >> +    +    <menu name="SeleniumTabBar"  extends="CommonTabBarMenu" 
>> >> extends-resource="component://common/widget/CommonMenus.xml">
>> >> +        <menu-item name="selenium" title="Selenium Intro">
>> >> +            <link target="selenium"/>
>> >> +        </menu-item>
>> >> +        <menu-item name="runSelenium" title="Run Selenium">
>> >> +            <link target="runSelenium"/>
>> >> +        </menu-item>
>> >> +    </menu>    +</menus>
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Added: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml?rev=817493&view=auto
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml (added)
>> >> +++ ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml Tue Sep 22 04:00:22 2009
>> >> @@ -0,0 +1,69 @@
>> >> +<?xml version="1.0" encoding="ISO-8859-1"?>
>> >> +<!--
>> >> +    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.
>> >> +-->
>> >> +
>> >> +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +
>> >> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
>> >> +
>> >> +    <form name="editSeleniumTestSuitePath" target="updateSeleniumTestSuitePath" type="single" title="Add new selenium test
>> >> suite" default-map-name="testSuitePath"
>> >> +        header-row-style="header-row" default-table-style="basic-table">
>> >> +        +        <!--alt-target use-when="testSuitePath==null" target="createSeleniumTestSuitePath"/--> +        + 
>> >> <field
>> >> name="testSuiteId" use-when="testSuitePath ==  null"><text></text></field>
>> >> +        <field name="testSuiteId" use-when="testSuitePath != null"><display></display></field>
>> >> +        <field name="testSuiteName"><text></text></field>
>> >> +        <field name="testSuitePath"><text></text></field>
>> >> +        <field name="description"><textarea rows="3"/></field>
>> >> +        <field name="submitButton" title=""><submit button-type="button"/></field>
>> >> +    </form>
>> >> +    <form name="seleniumTestSuitePathList"  paginate-target="editSeleniumTestSuitePath" type="list" title="path file of 
>> >> selenium
>> >> test suite"  separate-columns="true" list-name="listIt"
>> >> +        view-size="15" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table
>> >> hover-bar">
>> >> +        <actions>
>> >> +            <set field="parameters" default-value=""></set>
>> >> +            <set field="parameters.noConditionFind" default-value="Y"></set>
>> >> +            +            <service service-name="performFind" result-map="result" result-map-list="listIt">
>> >> +                <field-map field-name="inputFields" from-field="parameters"/>
>> >> +                <field-map field-name="entityName" value="SeleniumTestSuitePath"/>
>> >> +                <field-map field-name="orderBy" value="createdStamp"/>
>> >> +            </service>
>> >> +        </actions>
>> >> +        <field name="testSuiteId" widget-style="buttontext">
>> >> +            <hyperlink also-hidden="true" description="${testSuiteId}" target="editSeleniumTestSuitePath">
>> >> +                <parameter param-name="testSuiteId"/>
>> >> +            </hyperlink>
>> >> +        </field>
>> >> +        <field name="testSuiteName"><display></display></field>
>> >> +        <field name="testSuitePath"><display></display></field>
>> >> +        <field name="description"><display></display></field>
>> >> +        +        <field name="runTest" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
>> >> +            <hyperlink target="runTestSuite"  description="${uiLabelMap.CommonRun}">
>> >> +                <parameter param-name="testSuiteId"/>
>> >> +                <parameter param-name="testSuitePath" />
>> >> +            </hyperlink>
>> >> +        </field>
>> >> +        <field name="remove" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
>> >> +            <hyperlink target="removeSeleniumTestSuitePath" description="${uiLabelMap.CommonDelete}">
>> >> +                <parameter param-name="testSuiteId"/>
>> >> +            </hyperlink>
>> >> +        </field>
>> >> +    </form>
>> >> +</forms>
>> >> \ No newline at end of file
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:eol-style = native
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:keywords = "Date Rev Author URL Id"
>> >>
>> >> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> >> ------------------------------------------------------------------------------
>> >>     svn:mime-type = text/xml
>> >>
>> >> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
>> >> +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
>> >> @@ -23,6 +23,7 @@
>> >>      <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>> >>      <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
>> >>      <include location="component://common/webcommon/WEB-INF/tempexpr-controller.xml"/>
>> >> +    <include location="component://testtools/webapp/testtools/WEB-INF/controller.xml"/>
>> >>      <description>WebTools Site Configuration File</description>
>> >>      <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
>> >>
>> >> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
>> >> URL:
>> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=817493&r1=817492&r2=817493&view=diff
>> >> ==============================================================================
>> >> --- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original)
>> >> +++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Tue Sep 22 04:00:22 2009
>> >> @@ -109,6 +109,8 @@
>> >>          </#if>
>> >>          <li><h3>${uiLabelMap.WebtoolsCertsX509}</h3></li>
>> >>          <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsMyCertificates}</a></li>
>> >> +        <li><h3>Selenium</h3></li>
>> >> +        <li><a href="<@o...@ofbizUrl>">Selenium</a></li>
>> >>        </ul>
>> >>      </#if>
>> >>    </div>
>> >>
>> >>
>> >>
>> >
>>
>>
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive rates
> 



Re: svn commit: r817493 - in /ofbiz/trunk: applications/content/data/ framework/testtools/ framework/testtools/config/ framework/testtools/documents/ framework/testtools/entitydef/ framework/testtools/script/ framework/testtools/script/org/ framework/testt

Posted by Jacques Le Roux <ja...@les7arts.com>.
Has a Jira issue been created or this bug already fixed ?

Thanks

Jacques

From: "Deepak Dixit" <de...@hotwaxmedia.com>
> Hello Hans,
>
> This commit generate error for loading data.In this statusId used in SeleniumHelpData.xml but statusId's  define 
> (ContentTypeData.xml) in  content component in application and application is loaded after framework so statusId generate error.
>
> Thanks & Regards
> -----
> Deepak Dixit
>
> hansbak@apache.org wrote:
>> Author: hansbak
>> Date: Tue Sep 22 04:00:22 2009
>> New Revision: 817493
>>
>> URL: http://svn.apache.org/viewvc?rev=817493&view=rev
>> Log:
>> added a selenium option to webtools which partially tests if all settings have been done and will now automatically download the 
>> selenium server. Sponsored by Antwebsystems, programmed by employee Gan
>>
>> Added:
>>     ofbiz/trunk/framework/testtools/documents/
>>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml   (with props)
>>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml   (with props)
>>     ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml   (with props)
>>     ofbiz/trunk/framework/testtools/entitydef/
>>     ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml   (with props)
>>     ofbiz/trunk/framework/testtools/script/
>>     ofbiz/trunk/framework/testtools/script/org/
>>     ofbiz/trunk/framework/testtools/script/org/ofbiz/
>>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/
>>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml   (with props)
>>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java   (with props)
>>     ofbiz/trunk/framework/testtools/webapp/
>>     ofbiz/trunk/framework/testtools/webapp/testtools/
>>     ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl   (with props)
>>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/
>>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml   (with props)
>>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml   (with props)
>>     ofbiz/trunk/framework/testtools/widget/
>>     ofbiz/trunk/framework/testtools/widget/CommonScreens.xml   (with props)
>>     ofbiz/trunk/framework/testtools/widget/Menus.xml   (with props)
>>     ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml   (with props)
>> Modified:
>>     ofbiz/trunk/applications/content/data/ContentTypeData.xml
>>     ofbiz/trunk/framework/testtools/build.xml
>>     ofbiz/trunk/framework/testtools/config/seleniumXml.properties
>>     ofbiz/trunk/framework/testtools/ofbiz-component.xml
>>     ofbiz/trunk/framework/testtools/runSeleniumServer.sh
>>     ofbiz/trunk/framework/testtools/runSeleniumXml.sh
>>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
>>     ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
>>     ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
>>     ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
>>
>> Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/content/data/ContentTypeData.xml (original)
>> +++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Tue Sep 22 04:00:22 2009
>> @@ -267,5 +267,5 @@
>>  <!-- localization example file -->
>>      <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl" dataResourceTypeId="OFBIZ_FILE" 
>> objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" 
>> dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
>> -    +   </entity-engine-xml>
>>
>> Modified: ofbiz/trunk/framework/testtools/build.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/build.xml?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/build.xml (original)
>> +++ ofbiz/trunk/framework/testtools/build.xml Tue Sep 22 04:00:22 2009
>> @@ -32,6 +32,7 @@
>>      <path id="local.class.path">
>>          <fileset dir="${lib.dir}" includes="*.jar"/>
>>          <fileset dir="../base/lib" includes="*.jar"/>
>> +    <fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
>>          <fileset dir="../base/lib/scripting" includes="*.jar"/>
>>          <fileset dir="../base/lib/commons" includes="*.jar"/>
>>          <fileset dir="../base/build/lib" includes="*.jar"/>
>>
>> Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/config/seleniumXml.properties?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/config/seleniumXml.properties (original)
>> +++ ofbiz/trunk/framework/testtools/config/seleniumXml.properties Tue Sep 22 04:00:22 2009
>> @@ -1,5 +1,5 @@
>>  serverHost=localhost
>>  proxyPort=4444
>> -browser=*firefox
>> +browser=*firefox /usr/lib/firefox-3.0.14/firefox
>>  startUrl=http://localhost:8080/
>> -log4jFile=./config/log4j.properties
>> +log4jFile=./config/log4j.properties
>> \ No newline at end of file
>>
>> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml (added)
>> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,92 @@
>> +<?xml version="1.0"?>
>> +<!--
>> +    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.
>> +-->
>> +<section xmlns="http://docbook.org/ns/docbook"
>> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
>> +    +    <title>OFBiz SeleniumXml Introduction</title>
>> +    <para>
>> +        This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a copy of the 
>> presentation that was given at the ApacheCon2008 OFBiz Conference that describes more about the 
>> project:<ulink>http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf</ulink>
>> +    </para>
>> +    <section>
>> +        <title>Installing SeleniumXml</title>
>> +        <para>1. From the ofbiz directory run the following ant command to download the needed selenium- server.jar file.</para>
>> +        <para>2. ant download-selenium</para>
>> +        <para>3. ant run-install-extseed (For run install help data and example test)</para>
>> +        <para>4. Build the source by running “ant” in the testtools directory or your OFBIZ_HOME</para>
>> +        <para>You should now have everything you need to run a seleniumXml test.</para> +    </section>
>> +    +    <section>
>> +    <title>Running the Example Test</title>
>> +    +        <para>SeleniumXml requires the selenium server to be running. The selenium server uses a default proxy port of 
>> 4444. The default port can be changed when you start the server. Selenium tries to automatically change the proxy settings in the 
>> testing browser. If you are getting communication errors with the server you may have to manually change your proxy settings in 
>> your browser.</para>
>> +        <section>
>> +            <title>1. Start ofbiz as normal.</title>
>> +            <para>Note: Before run ofbiz with selenium should changes ofbiz to use HTTP as the default at file 
>> (framework/webapp/config/url.properties) . Instead everything just works through port 8080. Selenium supports https but it is 
>> more complicated so for this introduction I have turned https off.</para>
>> +        </section>
>> +        <section>
>> +            <title>2. Start the selenium server:</title>
>> +            <para>runSeleniumServer.bat / runSeleniumServer.sh </para>
>> +        </section>
>> +        <section>
>> +            <title>3. Change the configuration for your preferred browser in the testtools/config/seleniumxml.properties file. 
>> The default is firefox (e.g. browser=*firefox) but you can change it to any of the selenium supported browsers.</title>
>> +            <para>Selenium supported browsers: <ulink>http://seleniumhq.org/about/platforms.html#browsers</ulink></para> + 
>> </section>
>> +        <section>
>> +            <title>4. Run the Example test</title>
>> +            <section>
>> +                <title>4.1 run the Example test  .bat/.sh file</title>
>> +                        <para>runSeleniumXml.bat / runSeleniumXml.sh testdef/seleniumxml/example/example_testsuite.xml</para>
>> +                        <para>The above test combines three different tests into a single test suite. Data is passed from one 
>> test to another to allow you to share generated data.</para>
>> +                        <para>You will get an assertion (or other exception) if the test fails.</para>
>> +                        <para>The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed 
>> value="500"  command). You can remove this at the start of the test if you don't want the delay</para>
>> +                        <para>- Here are some screen shots of what you should be seeing.</para>
>> +                            <!--para>
>> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup1.jpeg" height="150" 
>> width="400"></graphic>
>> +                            </para>
>> +                            <para>
>> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup2.jpeg" height="150" 
>> width="400"></graphic> <graphic fileref="/images/seleniums/ofbizSeleniumSetup3.jpeg" height="150" width="400"></graphic>/>
>> +                            </para-->
>> +            </section>
>> +            <section>
>> +                <title>4.2 run the Example test  webtools/Run Selenium</title>
>> +                        <para>
>> +                            First you need to open the file example_testsuite.xml and comment out first part.. and enable the 
>> bottom one
>> +                            Here is another way to run the selenium test suite and you can create new test suite for your web 
>> application. Scroll up on this page then you will see the link "Run Selenium" next to "Selenium Intro" click on that link. + 
>> On that page you will see the list of available test suites. So you can click on "Run" to run the test suite you want but please 
>> remember that the Selenium server should be started before you "run" any test.
>> +                            You can also create new test suite by fill in the information to the form and put the directory 
>> location of your test suite in the field "Test Suite Path" then submit. If you want to know how the test is created you can take 
>> a look at the file example_testsuite.xml for more info.
>> +                        </para>
>> +            </section>
>> +        </section>
>> +    </section>
>> +    <section>
>> +        <title>Creating New Tests :</title> +        <para>The easiest way to create a new test is to use the Selenium IDE 
>> plugin for Firefox. This allows you to records your own Selenium tests. You can then save the test and convert it to a 
>> seleniumXml test easily.</para>
>> +        <para>1. Install the latest plugin at <ulink>http://seleniumhq.org/projects/ide/</ulink></para>
>> +        <para>2. Record your steps as you run through your ofbiz application.</para>
>> +        <para>3. Then convert the saved XML file using the convertSeleniumIDE.bat script.</para>
>> +    </section>
>> +    <section>
>> +        <title>For example:</title> +        <para>1. convertSeleniumIDE.bat 
>> testdef/seleniumxml/example/recorded/AjaxExample.html testdef/seleniumxml/example/recorded/AjaxExample.xml</para>
>> +        <para>2. Manually modify the commands to suit your needs.</para>
>> +    </section>
>> +</section>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml (added)
>> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,154 @@
>> +<?xml version="1.0"?>
>> +<!--
>> +    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.
>> +-->
>> +<section xmlns="http://docbook.org/ns/docbook"
>> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
>> +    <section>
>> +        <title>OFBiz SeleniumXml Introduction with HTTPS</title>
>> +        <para>How to setup in firefox browser?</para>
>> +        <para>
>> +            The problem for https is that the selenium­RC 1.0 and later will be runs in a separate profile + 
>> automatically when the Selenium test is opening a new session for the Firefox browser the browser will +            need a 
>> security certificate every time. When this occurs the browser displays security pop up, and these +            pop up cannot be 
>> closed using Selenium­RC .  So how to solve this?
>> +        </para>
>> +        <para>
>> +            Create a separate Firefox profile for your tests ( adding a https certificate or install some add­ons)
>> +        </para>
>> +        <section>
>> +            <title>For Ubuntu Linux : </title>
>> +            <para> -  Make sure all your Firefox instances are closed .</para>
>> +            <para> -  Open a new Terminal and type the command firefox -p -no-remote  in the terminal then press enter. The pop 
>> up window will appear.</para>
>> +            <!--screenshot>
>> +                <graphic fileref="/images/seleniums/profile1.png" width="300" height="300"></graphic>
>> +                <caption>
>> +                    <para>
>> +                        Clicking on “Create Profile” to Create the new profile using the dialog , enter new profile name , 
>> choose folder  to store your new profile and then click finish.
>> +                    </para>
>> +                </caption>
>> +            </screenshot-->
>> +            <!--screenshot>
>> +                <graphic fileref="/images/seleniums/profile3.png" width="400"></graphic>
>> +                <caption-->
>> +                    <para>
>> +                        After that click “Start Firefox” and configure settings based on suggestion below + 
>> </para>
>> +                    <section>
>> +                        <title>warrning*</title>
>> +                        <para>
>> +                            Be sure to put your profile in a new folder separate from the default!!!
>> +                        </para>
>> +                        <para>
>> +                            The Firefox profile manager tool will delete all files in a folder if you delete + 
>> </para>
>> +                        <para>
>> +                            a profile, regardless of whether they are profile files or not.
>> +                        </para>
>> +                    </section>
>> +                <!--/caption>
>> +            </screenshot-->
>> +        </section>
>> +        <section>
>> +            <title>- Suggested settings for your Selenium Profile</title>
>> +            <para>From “View\Toolbars” tab, uncheck “Bookmarks Toolbar” </para>
>> +            <para>Right click from toolbar and click “Customize” </para>
>> +            <para>Remove “Google search” by dragging it to the “Customize Toolbar” window </para>
>> +            <para>From the “Customize Toolbar” window, click “Use Small Icons” check box then hit “Done”</para>
>> +            <para>Click “Edit\Preferences” then set the following:</para>
>> +                <section>
>> +                    <title>“Main” tab</title>
>> +                    <para>- set Home Page to “about:blank”</para>
>> +                    <para>- uncheck “Show the Downloads..” option</para>
>> +                </section>   +                <section>
>> +                    <title>“Tabs” tab</title>
>> +                    <para>- Select “a new window” for new pages</para>
>> +                    <para>- Uncheck all warning options</para>
>> +                </section>
>> +                <section>
>> +                    <title>“Content” tab</title>
>> +                    <para>- uncheck “Block pop-up” windows option</para>
>> +                </section>
>> +                <section>
>> +                    <title> “Privacy” tab</title>
>> +                    <para>- uncheck all “History” options</para>
>> +                </section>
>> +                <section>
>> +                    <title>“Security” tab</title>
>> +                    <para>- uncheck all “Security” options</para>
>> +                    <para>- click “Settings” and uncheck all warning options</para>
>> +                </section>
>> +                <section>
>> +                    <title>“Advanced” tab</title>
>> +                    <para>- Uncheck “autoscrolling” option from “General” tab</para>
>> +                    <para>- uncheck “warn me …” and “Ssearch Engines”option from “Update” tab </para>
>> +                </section>
>> +            +                    <!--listitem>1.From “Tools\Add-ons” install the following:
>> +                        <para>- Firebug: allows you to edit, debug, and monitor CSS, HTML, and JavaScript on your application 
>> under test</para>
>> +                        <para>- Selenium IDE: allows you to record, edit, and debug Selenium tests</para>
>> +                        <para>- ScreenGrab: saves entire webpages as images. </para>
>> +                    </listitem>
>> +                    <listitem>1.From the address bar type “about:config” and add the following by right-click anywhere on 
>> the page and selecting “new”
>> +                        <para>- extensions.update.notifyUser (type=boolean; value=false)</para>
>> +                        <para>- extensions.newAddons (type=boolean; value=false) </para>
>> +                    </listitem>
>> +                    +                </orderedlist-->
>> +        </section>
>> +        +    </section>
>> +    <section>
>> +        <title></title>
>> +        <para></para>
>> +        <!--para>
>> +            Set certificate for your firefox profile type and enter <ulink type="http" url="https://localhost:8443/"></ulink>
>> +            (* An url you  want to get certificate.)  then add an exception
>> +        </para>
>> +        +        <screenshot>
>> +            <graphic fileref="/images/seleniums/profile2.png" width="400"></graphic>
>> +        </screenshot-->
>> +    </section>
>> +    <section>
>> +        <title></title>
>> +        <para>At the file “seleniumXml.properties”.</para> +        <para>Change browser=*firefox</para> +        <para>To 
>> browser=*firefox /usr/lib/firefox-3.0.8/firefox</para>  +        <para>(*** firefox path)</para>
>> +    </section>
>> +    <section>
>> +        <title></title>
>> +        <para>At the file “runSeleniumServer.sh” </para>
>> +        <para>"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar </para> +        <para>-firefoxProfileTemplate "put 
>> path to the profile dir"  </para>  +        <para>-trustAllSSLCertificates -singleWindow  -timeout 240 +        </para>
>> +    </section>
>> +    <section>
>> +        <title>Note : Please follows the link</title>
>> +        <para>
>> +            <!--ulink> http://docs.ofbiz.org/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink-->
>> +        </para>
>> +        <para>
>> +            if your found the problem “ofbiz.org cert is expired causes peer not authenticated“.
>> +        </para>
>> +    </section>
>> +</section>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml (added)
>> +++ ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,38 @@
>> +<?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.
>> +-->
>> +
>> +<entity-engine-xml>
>> +    <!-- example test suite -->
>> +    <SeleniumTestSuitePath testSuiteId="EXAMPLE_TESTSUITE" testSuiteName="example_testsuite" 
>> testSuitePath="framework/testtools/testdef/seleniumxml/example/example_testsuite.xml" description="test suite for example 
>> component"/>
>> +    +    <!--Selenium Help  Load in contentTypeData.xml file -->
>> +    <!-- selenium test tool-->   +    <DataResource dataResourceId="SELENIUM_INTRO" localeString="en" 
>> dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumIntro.xml" dataTemplateTypeId="NONE" 
>> statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium Setup" mimeTypeId="text/xml" isPublic="Y" />
>> +    <Content contentId="SELENIUM_INTRO" contentTypeId="DOCUMENT" contentName="OFBiz Selenium" 
>> templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_INTRO" localeString="en" statusId="CTNT_IN_PROGRESS" 
>> mimeTypeId="text/html"/>/>    +    <ContentAssoc contentId="DOCUMENTS"  mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" 
>> contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
>> +    +    <DataResource dataResourceId="SELENIUM_HTTPS" localeString="en" dataResourceTypeId="OFBIZ_FILE" 
>> objectInfo="framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" 
>> dataResourceName="Ofbiz Selenium HTTPS" mimeTypeId="text/xml" isPublic="Y" />
>> +    <Content contentId="SELENIUM_HTTPS" contentTypeId="DOCUMENT" contentName="OFBiz Selenium with HTTPS" 
>> templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_HTTPS" localeString="en" statusId="CTNT_IN_PROGRESS" 
>> mimeTypeId="text/html"/>/>    +    <ContentAssoc contentId="DOCUMENTS" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" 
>> contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
>> +    +    <ContentAssoc contentId="SELENIUM_INTRO" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" 
>> contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>    +    <ContentAssoc contentId="HELP_ROOT" 
>> mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" 
>> sequenceNum=""/>
>> +     + </entity-engine-xml>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml (added)
>> +++ ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,42 @@
>> +<?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.
>> +-->
>> +
>> +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
>> +    <!-- ========================================================= -->
>> +    <!-- ======================== Defaults ======================= -->
>> +    <!-- ========================================================= -->
>> +    <title>Entity of an Open For Business Project Component</title>
>> +    <description>None</description>
>> +    <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright>
>> +    <author>None</author>
>> +    <version>1.0</version>
>> +    +    <entity entity-name="SeleniumTestSuitePath"
>> +        package-name="org.ofbiz.selenium.test"
>> +        default-resource-name="ExampleEntityLabels"
>> +        title="Selenium Test suite file">
>> +        <field name="testSuiteId" type="id-ne"></field>
>> +        <field name="testSuiteName" type="name"></field>
>> +        <field name="testSuitePath" type="description"></field>
>> +        <field name="description" type="very-long"></field>
>> +        <prim-key field="testSuiteId"/>
>> +    </entity>
>> +</entitymodel>
>>
>> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Modified: ofbiz/trunk/framework/testtools/ofbiz-component.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/ofbiz-component.xml?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/ofbiz-component.xml (original)
>> +++ ofbiz/trunk/framework/testtools/ofbiz-component.xml Tue Sep 22 04:00:22 2009
>> @@ -1,37 +1,43 @@
>>  <?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.
>> +    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.
>>  -->
>>  <ofbiz-component name="testtools"
>> -        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> -        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
>> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
>>      <!-- define resource loaders; most common is to use the component resource loader -->
>>      <resource-loader name="main" type="component"/>
>>      <classpath type="dir" location="config"/>
>> -
>> +    <!-- place the config directory on the classpath to access configuration files -->
>>      <classpath type="dir" location="dtd"/>
>> -
>> +    <!-- load single or multiple external libraries -->
>>      <classpath type="jar" location="lib/*"/>
>>      <classpath type="jar" location="build/lib/*"/>
>> -
>> +    +    <!-- entitydef -->
>> +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
>> +    +    <entity-resource type="data" reader-name="seed" loader="main" location="documents/SeleniumHelpData.xml"/>
>> +    <!-- service resources: model(s), eca(s) and group definitions -->
>>      <service-resource type="model" loader="main" location="servicedef/services.xml"/>
>> -</ofbiz-component>
>> +    +</ofbiz-component>
>> \ No newline at end of file
>>
>> Modified: ofbiz/trunk/framework/testtools/runSeleniumServer.sh
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumServer.sh?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/runSeleniumServer.sh (original)
>> +++ ofbiz/trunk/framework/testtools/runSeleniumServer.sh Tue Sep 22 04:00:22 2009
>> @@ -6,6 +6,6 @@
>>    JAVA=java
>>  fi
>>  -"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -timeout 240
>> +"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -singleWindow  -trustAllSSLCertificates -timeout 240
>>  exit 0
>>
>> Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original)
>> +++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Tue Sep 22 04:00:22 2009
>> @@ -9,6 +9,7 @@
>>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
>>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar
>>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar
>> +export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar
>>  echo $CP
>>
>> Added: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml (added)
>> +++ ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,46 @@
>> +<?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.
>> +-->
>> +
>> +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
>> +    <simple-method method-name="updateSeleniumTestSuitePath"  short-description="add new test suite path file ">
>> +
>> +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
>> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
>> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
>> +        <if-not-empty field="lookedUpValue.testSuiteId">
>> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
>> +            <store-value value-field="lookedUpValue"/>
>> +        </if-not-empty>
>> +        <if-empty field="lookedUpValue.testSuiteId">
>> +            <set-nonpk-fields map="parameters" value-field="lookupPKMap"/>
>> +            <create-value value-field="lookupPKMap"/>
>> +        </if-empty>
>> +    </simple-method>
>> +    <simple-method method-name="removeSeleniumTestSuitePath"  short-description="remove test suite path file ">
>> +        +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
>> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
>> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
>> +        <if-not-empty field="lookedUpValue.testSuiteId">
>> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
>> +            <remove-value value-field="lookedUpValue"/>
>> +        </if-not-empty>
>> +    </simple-method>
>> +</simple-methods>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java (added)
>> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,179 @@
>> +package org.ofbiz.testtools;
>> +
>> +import java.io.BufferedInputStream;
>> +import java.io.BufferedOutputStream;
>> +import java.io.File;
>> +import java.io.FileOutputStream;
>> +import java.io.IOException;
>> +import java.io.InputStream;
>> +import java.io.UnsupportedEncodingException;
>> +import java.io.Writer;
>> +import java.net.MalformedURLException;
>> +import java.net.URL;
>> +import java.net.URLConnection;
>> +import java.util.Map;
>> +import java.util.Properties;
>> +
>> +import javax.servlet.http.HttpServletRequest;
>> +import javax.servlet.http.HttpServletResponse;
>> +
>> +import org.ofbiz.base.util.Debug;
>> +import org.ofbiz.base.util.UtilProperties;
>> +import org.ofbiz.base.util.UtilURL;
>> +
>> +
>> +import javolution.util.FastMap;
>> +
>> +
>> +import net.sf.json.JSONObject;
>> +
>> +
>> +public class VerifySeleniumSetups {
>> +
>> + public static final String module = VerifySeleniumSetups.class.getName();
>> + private static int currentValue  = 0;
>> + private static int contentLength = 0;
>> + private static Map<String,Object> josonMap = null;
>> + private static String urlSite = 
>> "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=";
>> + private static String libPath = "framework/testtools/lib/selenium-server.jar";
>> +
>> + public VerifySeleniumSetups(){
>> +
>> + }
>> +
>> + /* prepare lib for selenium test + * Check & download selenium-server.jar from 
>> http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=
>> + * Check a change use HTTP as the default at file framework/webapp/config/url.properties  + * Check correct the 
>> config/seleniumXml.properties and firefox  path
>> + */
>> +
>> + public static String verifyConfig(HttpServletRequest request, HttpServletResponse response){
>> + boolean lib = false;
>> + boolean urlset = false;
>> + Map<String,Object> msgMap = FastMap.newInstance();
>> + Properties urlProps = null;
>> + try{
>> + /* Check and down load selenium-server.jar */ + File file = new File(libPath);
>> + URL url = new URL(urlSite);
>> + URLConnection connection = url.openConnection();
>> + contentLength = connection.getContentLength();
>> + if(contentLength == -1){
>> + request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet");
>> + }
>> + Debug.log("file size. "+contentLength,module);
>> + if(file.exists()){
>> + if(contentLength == file.length()){
>> + lib = true;
>> + }else lib = false;
>> + }
>> + msgMap.put("LIBFLAG",lib);
>> +
>> + /* Check a change use HTTP as the default */
>> + String httpStatus = null;
>> + URL urlProp = UtilURL.fromResource("url.properties");
>> + if (urlProps == null) {
>> + urlProps = new Properties();
>> + if (urlProp == null) {
>> + String errMsg = "variable with name " + urlProp.toString() + " is not set, cannot resolve location.";
>> + throw new MalformedURLException(errMsg);
>> + }
>> + urlProps = UtilProperties.getProperties(urlProp);
>> + if(urlProps != null){
>> + httpStatus = urlProps.getProperty("port.https.enabled");
>> + if(httpStatus != null && httpStatus.equals("N")){
>> + urlset = true;
>> + }
>> + }
>> + }
>> + msgMap.put("URLFLAG",urlset);
>> + request.setAttribute("MSGMAP", msgMap);
>> + }catch(Exception e){
>> + Debug.logError(e.getMessage(), module);
>> + }
>> + return "success";
>> + }
>> +
>> + public  static void doDownload( HttpServletRequest request, HttpServletResponse response){
>> + URL url = null;
>> + long bytesRead= 0;
>> + currentValue  = 0;
>> + contentLength = 0;
>> + BufferedInputStream in = null;
>> + BufferedOutputStream out = null;
>> + try {
>> + url = new URL(urlSite);
>> +
>> + URLConnection connection = url.openConnection();
>> + contentLength = connection.getContentLength();
>> + InputStream stream = connection.getInputStream();
>> + Debug.log("getContentLength is :"+contentLength);
>> +
>> + in = new BufferedInputStream(stream);
>> +
>> + long totalBytes = in.available();
>> + Debug.log("totalBytes is : "+totalBytes);
>> +
>> + byte[] b = new byte[1024];
>> +
>> + FileOutputStream file = new FileOutputStream(libPath);
>> + out = new BufferedOutputStream(file);
>> +
>> + int r;
>> + Debug.log("currentValue is : "+currentValue+" bytes");
>> + while ((r = in.read(b,0,b.length)) != -1) {
>> + out.write(b,0,r);
>> + bytesRead += r;
>> + currentValue = (int)(bytesRead * 100 / contentLength);
>> + // Debug.log("loading.. :"+bytesRead);
>> + }
>> + out.flush();
>> + } catch (IOException ex) {
>> + Debug.logError("Error message :"+ex.getMessage(),module);
>> + }finally {
>> + try {
>> + if (in != null) in.close();
>> + if (out != null) out.close();
>> + }catch (Exception ex) {
>> + Debug.logError("Error message :"+ex.getMessage(),module);
>> + }
>> + }
>> + }
>> +
>> + public static String checkProgressDownloadStatus(HttpServletRequest request, HttpServletResponse response){
>> + if(josonMap == null){
>> + josonMap = FastMap.newInstance();
>> + }
>> +
>> + josonMap.put("loadPercent", currentValue);
>> + josonMap.put("contentLength", contentLength);
>> + toJsonObject(josonMap,response);
>> +
>> + return "success";
>> + }
>> +
>> + public static void toJsonObject(Map<String,Object> attrMap, HttpServletResponse response){
>> + JSONObject json = JSONObject.fromObject(attrMap);
>> + String jsonStr = json.toString();
>> + if (jsonStr == null) {
>> + Debug.logError("JSON Object was empty; fatal error!",module);
>> + }
>> + // set the X-JSON content type
>> + response.setContentType("application/json");
>> + // jsonStr.length is not reliable for unicode characters
>> + try {
>> + response.setContentLength(jsonStr.getBytes("UTF8").length);
>> + } catch (UnsupportedEncodingException e) {
>> + Debug.logError("Problems with Json encoding",module);
>> + }
>> + // return the JSON String
>> + Writer out;
>> + try {
>> + out = response.getWriter();
>> + out.write(jsonStr);
>> + out.flush();
>> + } catch (IOException e) {
>> + Debug.logError("Unable to get response writer",module);
>> + }
>> + }
>> +}
>>
>> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/plain
>>
>> Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original)
>> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Tue Sep 22 04:00:22 2009
>> @@ -18,11 +18,17 @@
>>   */
>>  package org.ofbiz.testtools.seleniumxml;
>>  +import java.io.BufferedInputStream;
>> +import java.io.BufferedOutputStream;
>> +import java.io.DataInputStream;
>>  import java.io.File;
>>  import java.io.FileInputStream;
>> +import java.io.FileOutputStream;
>>  import java.io.IOException;
>>  import java.io.InputStream;
>>  import java.net.MalformedURLException;
>> +import java.net.URL;
>> +import java.net.URLConnection;
>>  import java.util.List;
>>  import java.util.ArrayList;
>>  import java.util.Map;
>> @@ -31,10 +37,12 @@
>>  import java.util.regex.Pattern;
>>  import java.lang.reflect.*;
>>  +import javax.servlet.http.HttpServletRequest;
>> +import javax.servlet.http.HttpServletResponse;
>>  import javolution.util.FastMap;
>> -
>>  import junit.framework.Assert;
>>  +import org.apache.commons.io.output.ByteArrayOutputStream;
>>  import org.apache.commons.lang.RandomStringUtils;
>>  import org.apache.log4j.Level;
>>  import org.apache.log4j.Logger;
>> @@ -43,9 +51,12 @@
>>  import org.jdom.Element;
>>  import org.jdom.JDOMException;
>>  import org.jdom.input.SAXBuilder;
>> +import org.ofbiz.testtools.seleniumxml.util.TestUtils;
>>  import org.ofbiz.base.util.UtilGenerics;
>> -import org.ofbiz.testtools.seleniumxml.util.TestUtils;
>> +import org.ofbiz.base.util.UtilHttp;
>> +import org.ofbiz.base.util.UtilProperties;
>> +import org.ofbiz.base.util.UtilURL;
>>  import com.thoughtworks.selenium.DefaultSelenium;
>>  //import com.thoughtworks.selenium.SeleniumException;
>> @@ -53,7 +64,8 @@
>>  public class SeleniumXml {
>>      -    public static final String PROPS_NAME = "selenium.config";
>> +    //public static final String PROPS_NAME = "selenium.config";
>> +    public static String PROPS_NAME = "selenium.config";
>>      Logger  logger = Logger.getLogger(SeleniumXml.class.getName());
>>  public static final int MAX_STR_LENGTH = 15;
>> @@ -83,6 +95,35 @@
>>              sel.runTest(args[0]);
>>          }
>>      }
>> +   +    /* call run test suite from webtool selenium */
>> +    public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){
>> +    Map parameters = UtilHttp.getParameterMap(request);
>> +    String para = (String)parameters.get("testSuitePath");
>> +    if(para == null){
>> +    System.out.println("Error message : Test suite Path  is null");
>> +    return "success";
>> +    }
>> +    if(para.length()==0){
>> +    System.out.println("Error message : Test suite Path  is null");
>> +    return "success";
>> +    }
>> +    try{
>> +    URL url = UtilURL.fromResource("seleniumXml.properties");
>> +    if (props == null) {
>> +             props = new Properties();
>> +             initConfig(url);
>> +    }
>> +    SeleniumXml sel = new SeleniumXml();
>> +    sel.runTest(para.trim());
>> +        }catch(JDOMException jdome){
>> +    System.out.println(jdome.getMessage());
>> +    }catch(IOException ioe){
>> +    System.out.println("Error message : "+ioe.getMessage());
>> +    }finally{
>> +    return "success";
>> +    }
>> +    }
>>      public SeleniumXml() throws IOException {
>>          this.map = FastMap.newInstance();
>> @@ -95,7 +136,12 @@
>>  private static void initConfig() throws IOException {
>>          try {
>> -            String configFile = System.getProperty(PROPS_NAME);
>> +        String configFile  = "";
>> +        if(System.getProperty(PROPS_NAME)==null){
>> +        configFile = PROPS_NAME;
>> +        }else{
>> +        configFile = System.getProperty(PROPS_NAME);
>> +        }
>>              if (configFile == null) {
>>                  String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot 
>> resolve location.";
>>                  throw new MalformedURLException(errMsg);
>> @@ -111,6 +157,19 @@
>>              throw e;
>>          }
>>      }
>> +    private static void initConfig(URL url) throws IOException {
>> +        try {
>> +            if (url == null) {
>> +                String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, cannot 
>> resolve location.";
>> +                throw new MalformedURLException(errMsg);
>> +            }
>> +           // BasicConfigurator.configure();
>> +            props = UtilProperties.getProperties(url);
>> +        } catch (IOException e) {
>> +            e.printStackTrace();
>> +            throw e;
>> +        }
>> +    }
>>      /**
>>       * Constructor to preset with an existing Map of parameters.  Intended to be used @@ -136,7 +195,8 @@
>>  public void runCommands() {
>>          Element root = this.doc.getRootElement();
>> -        List<Element> nodes = UtilGenerics.cast(root.getChildren());
>> +        //List<Element> nodes = UtilGenerics.cast(root.getChildren());
>> +        List<Element> nodes = root.getChildren();
>>          runCommands(nodes);
>>      }
>>      @@ -734,5 +794,4 @@
>>      public Map <String, Object> getMap() {
>>          return this.map;
>>      }
>> -}
>> -
>> +}
>> \ No newline at end of file
>>
>> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml (original)
>> +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml Tue Sep 22 04:00:22 2009
>> @@ -1,8 +1,14 @@
>>  <?xml version="1.0"?>
>>  <testcase>
>>      <setSpeed value="500" />
>> -    <testcase file="testdef/seleniumxml/example/example_login.xml"/>
>> +    +    <!-- start from runSeleniumXml.sh -->
>> +    <!--testcase file="testdef/seleniumxml/example/example_login.xml"/>
>>      <testcase file="testdef/seleniumxml/example/example_new.xml"/>
>> -    <testcase file="testdef/seleniumxml/example/example_search.xml"/>
>> +    <testcase file="testdef/seleniumxml/example/example_search.xml"/-->
>> +    <!-- start from webtools/run selenium -->
>> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_login.xml"/>
>> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_new.xml"/>
>> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_search.xml"/>
>>  </testcase>
>>
>> Added: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl (added)
>> +++ ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,117 @@
>> +<#--
>> +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.
>> +-->
>> +
>> +<#assign  libcheck  =  "">
>> +<#assign  urlcheck  =  "">
>> +<#assign msg = request.getAttribute("MSGMAP")?if_exists>
>> +<#if msg?has_content>
>> +    <#if msg.LIBFLAG?exists><#assign  libcheck  =  msg.LIBFLAG?if_exists?string></#if>
>> +    <#if msg.URLFLAG?exists><#assign  urlcheck  =  msg.URLFLAG?if_exists?string></#if>
>> +</#if>
>> +<a id="verifly" href="<@o...@ofbizUrl>" class="buttontext">Verify</a>
>> +<table class="basic-table hover-bar" cellspacing="0">
>> +        <tr class="header-row" >
>> +          <td>Description</td>
>> +          <td>Status</td>
>> +        </tr>
>> +        <tr>
>> +          <td>- selenium_server.jar </td>
>> +          <td>
>> +                <#if libcheck == "true">
>> +                    success
>> +                <#else>
>> +                    <div style="color:red;" id="message">please click download this lib for run the selenium application!</div>
>> +                    <div id="loadpercent"><a id="download" 
>> href="javascript:clickDownLoad('<@o...@ofbizUrl>');" class="buttontext">download</a></div>
>> +                    <div id="progress_bar"  style="display:none"></div>
>> +                    <div id="filesize"  style="display:none"></div>
>> +                </#if>
>> +          </td>
>> +        </tr>
>> +        <tr valign="middle" class="alternate-row">
>> +          <td>- Changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties)</td>
>> +          <td>
>> +                <#if  urlcheck == "true">
>> +                    success
>> +                <#else>
>> +                    <div style="color:red;">Not success!</div>
>> +                </#if>
>> +          </td>
>> +        </tr>
>> +        <tr>
>> +          <td> +            <ol>
>> +            <li>Edit 'framework/testtools/config/seleniumXml.properties' and  add your firefox path, replace the example in the 
>> file</li>
>> +            <li>Then save and restart ofbiz.</li>
>> +            <li>Then open a new terminal to start the seleniumserver. (cd framework/testtools;./runSeleniumServer.sh)</li>
>> +            <li>Then run the test below.</li>
>> +            </ol>
>> +          </td>
>> +          <td>
>> +          </td>
>> +        </tr>
>> +      </table>
>> +<script type="text/javascript"> +    var progressBar;
>> +    // click start load call servlet & new progressBar
>> +    function clickDownLoad(url){
>> +         startDownLoad(url);
>> +         $('progress_bar').style.display = "";
>> +         $('filesize').style.display = "";
>> +         progressBar = new Control.ProgressBar('progress_bar');
>> +    }
>> +    +    function startDownLoad(url){
>> +        var pars = '';
>> +        var myAjax = new Ajax.Request( url, {
>> +                method: 'post', +                parameters: pars, +                onLoading:getProgressDownloadStatus,
>> +                onComplete : $('download').innerHTML = 'loading....'
>> +            } );            +    }
>> +    +    //function PeriodicalExecuter check download status
>> +    function getProgressDownloadStatus(){
>> +        new PeriodicalExecuter(function(event){
>> +            var pars = '';
>> +            var myAjax = new Ajax.Request( '<@o...@ofbizUrl>', {
>> +                    method: 'get', +                    parameters: pars, +                    onSuccess:function 
>> check(transfer){
>> +                       var data = transfer.responseText.evalJSON(true);
>> +                       if( data != null ){
>> +                           if(data.contentLength != null && data.loadPercent != null){
>> +                               var loadPercent = data.loadPercent;
>> +                               $('loadpercent').innerHTML = ''+loadPercent+'%';
>> +                               var contentLength  = data.contentLength;
>> +                               //$('filesize').innerHTML = '<b>'+contentLength/1000 + ' k</b>';
>> +                               progressBar.setProgress(loadPercent);
>> +                               if(loadPercent > 99){
>> +                                    $('download').innerHTML = 'download';
>> +                                    event.stop();
>> +                               }
>> +                           }
>> +                       }
>> +                    }
>> +            } );
>> +        },1);
>> +       $('message').innerHTML = 'success';
>> +       $('message').style.color = "black";
>> +    }
>> +</script>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/plain
>>
>> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml (added)
>> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,76 @@
>> +<?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.
>> +-->
>> +
>> +<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
>> +    <!-- The controller elements that are common to all OFBiz components
>> +        can be found in the following xml file. A component can override the
>> +        elements found in the common-controller.xml file. -->
>> +    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>> +    +    <!--  selenium Test Case -->
>> +    <request-map uri="selenium">
>> +        <security https="true" auth="true"/>
>> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    <request-map uri="verify">
>> +        <security https="true" auth="true"/>
>> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    <request-map uri="downloadSeleniumlib">
>> +        <security https="true" auth="true"/>
>> +        <!-- validate Install all libs want to use in selenium -->
>> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="doDownload"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    <request-map uri="progressDownloadStatus">
>> +        <security https="true" auth="true"/>
>> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="checkProgressDownloadStatus"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    <request-map uri="runTestSuite">
>> +        <security https="false" auth="false"/>
>> +        <event type="java" path="org.ofbiz.testtools.seleniumxml.SeleniumXml" invoke="runTestSuite"/>
>> +        <response name="success" type="request-redirect" value="selenium" />
>> +    </request-map>
>> +    +    <request-map uri="updateSeleniumTestSuitePath">
>> +        <security https="true" auth="true"/>
>> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" 
>> invoke="updateSeleniumTestSuitePath"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    <request-map uri="removeSeleniumTestSuitePath">
>> +        <security https="true" auth="true"/>
>> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" 
>> invoke="removeSeleniumTestSuitePath"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    +    <request-map uri="editSeleniumTestSuitePath">
>> +    <security https="true" auth="true"/>
>> +        <response name="success" type="view" value="selenium"/>
>> +    </request-map>
>> +    +    <!--  selenium Test Case -->
>> +    <view-map name="selenium" type="screen" page="component://testtools/widget/CommonScreens.xml#selenium"/>
>> +    <view-map name="runSelenium" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
>> +    <view-map name="test" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
>> +</site-conf>
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml (added)
>> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,90 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
>> +<!--
>> +    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.
>> +-->
>> +
>> +<web-app>
>> +    <display-name>Open For Business - Example Application</display-name>
>> +    <description>Example Application of the Open For Business Project</description>
>> +    +    <context-param>
>> +        <param-name>webSiteId</param-name>
>> +        <param-value>TESTTOOLS</param-value>
>> +        <description>A unique ID used to look up the WebSite entity</description>
>> +    </context-param>
>> +    <context-param>
>> +        <param-name>localDispatcherName</param-name><param-value>testtools</param-value>
>> +        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
>> +    </context-param>
>> +    <context-param>
>> +        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
>> +        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
>> +    </context-param>
>> +    <context-param>
>> +        <param-name>mainDecoratorLocation</param-name>
>> +        <param-value>component://example/widget/example/CommonScreens.xml</param-value>
>> +        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in 
>> screen def XML files.</description>
>> +    </context-param>
>> +    <context-param>
>> +        <param-name>widgetVerbose</param-name>
>> +        <param-value>false</param-value>
>> +        <description>Enable widget boundary comments. See 
>> org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
>> +    </context-param>
>> +    <context-param>
>> +        <param-name>compressHTML</param-name>
>> +        <param-value>false</param-value>
>> +        <description>Remove unnecessary whitespace from HTML output.</description>
>> +    </context-param>
>> +    +    <filter>
>> +        <filter-name>ContextFilter</filter-name>
>> +        <display-name>ContextFilter</display-name>
>> +        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
>> +        <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
>> +        <init-param>
>> +            <param-name>allowedPaths</param-name>
>> + 
>> <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
>> +        </init-param>
>> +        <init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
>> +        <init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>
>> +    </filter>
>> +    <filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
>> +    +    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
>> +    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
>> +    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
>> +    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
>> +    +    <servlet>
>> +        <servlet-name>ControlServlet</servlet-name>
>> +        <display-name>ControlServlet</display-name>
>> +        <description>Main Control Servlet</description>
>> +        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
>> +        <load-on-startup>1</load-on-startup>
>> +    </servlet>
>> +    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
>> +    +    <session-config><session-timeout>60</session-timeout><!-- in minutes --></session-config>
>> +    +    <welcome-file-list>
>> +        <welcome-file>index.jsp</welcome-file>
>> +        <welcome-file>index.html</welcome-file>
>> +        <welcome-file>index.htm</welcome-file>
>> +    </welcome-file-list>
>> +</web-app>
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/CommonScreens.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/widget/CommonScreens.xml (added)
>> +++ ofbiz/trunk/framework/testtools/widget/CommonScreens.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,96 @@
>> +<?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://ofbiz.apache.org/dtds/widget-screen.xsd">
>> +    <screen name="main-decorator">
>> +        <section>
>> +            <actions>
>> +                <!-- base/top/specific map first, then more common map added for shared labels -->
>> +                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
>> +                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
>> +                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
>> +                <set field="layoutSettings.companyName" from-field="uiLabelMap.WebtoolsCompanyName" global="true"/>
>> +                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.WebtoolsCompanySubtitle" global="true"/>
>> +                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
>> +                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
>> +                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
>> +                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>> +                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>> +                <set field="activeApp" value="webtools" global="true"/>
>> +                <!-- <set field="appheaderTemplate" value="component://webtools/webapp/webtools/includes/appheader.ftl" 
>> global="true"/> -->
>> +                +                <set field="applicationMenuLocation" value="component://webtools/widget/Menus.xml" 
>> global="true"/>
>> +                <set field="applicationMenuName" value="WebtoolsAppBar" global="true"/>
>> +                <set field="applicationTitle" value="${uiLabelMap.FrameworkWebTools}" global="true"/>
>> +            </actions>
>> +            <widgets>
>> +                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>> +            </widgets>
>> +        </section>
>> +    </screen>
>> +    +    <screen name="main">
>> +        <section>
>> +            <actions>
>> +                <set field="titleProperty" value="WebtoolsMainPage"/>
>> +                <set field="headerItem" value="main"/>
>> +            </actions>
>> +            <widgets>
>> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
>> +                    <decorator-section name="body">
>> +                        <platform-specific><html><html-template 
>> location="component://webtools/webapp/webtools/main.ftl"/></html></platform-specific>
>> +                    </decorator-section>
>> +                </decorator-screen>
>> +            </widgets>
>> +        </section>
>> +    </screen>
>> +    +    <screen name="selenium">
>> +        <section>
>> +            <actions>
>> +                <set field="tabButtonItem" value="selenium"/> +                <set field="layoutSettings.javaScripts[]" 
>> value="/images/prototypejs/prototype.js" global="true"/>
>> +                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>
>> +                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
>> +                <entity-one entity-name="SeleniumTestSuitePath"  value-field="testSuitePath">
>> +                    <field-map field-name="testSuiteId" value="${parameters.testSuiteId}"/>
>> +                </entity-one>
>> +            </actions>
>> +            <widgets>
>> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
>> +                    <decorator-section name="body">
>> +                        <!--include-menu name="SeleniumTabBar" location="component://testtools/widget/Menus.xml"/-->
>> +                        <screenlet title="OFBiz SeleniumXml Verify">
>> +                            <platform-specific><html><html-template 
>> location="component://testtools/webapp/testtools/SeleniumTest.ftl"/></html></platform-specific>
>> +                        </screenlet>
>> +                        <screenlet title="Test Suite List">
>> +                            <include-form name="seleniumTestSuitePathList" 
>> location="component://testtools/widget/RunSeleniumForms.xml"/>
>> +                        </screenlet>
>> +                        <link target="runSelenium"  style="buttontext" text="New Test Suite"></link>
>> +                        <screenlet title="New Test Suite">
>> +                            <include-form name="editSeleniumTestSuitePath" 
>> location="component://testtools/widget/RunSeleniumForms.xml"/>
>> +                        </screenlet>
>> +                    </decorator-section>
>> +                </decorator-screen>
>> +            </widgets>
>> +        </section>
>> +    </screen>
>> +</screens>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/Menus.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/widget/Menus.xml (added)
>> +++ ofbiz/trunk/framework/testtools/widget/Menus.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,31 @@
>> +<?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.
>> +-->
>> +
>> +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
>> +    +    <menu name="SeleniumTabBar"  extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
>> +        <menu-item name="selenium" title="Selenium Intro">
>> +            <link target="selenium"/>
>> +        </menu-item>
>> +        <menu-item name="runSelenium" title="Run Selenium">
>> +            <link target="runSelenium"/>
>> +        </menu-item>
>> +    </menu>    +</menus>
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Added: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml?rev=817493&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml (added)
>> +++ ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml Tue Sep 22 04:00:22 2009
>> @@ -0,0 +1,69 @@
>> +<?xml version="1.0" encoding="ISO-8859-1"?>
>> +<!--
>> +    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.
>> +-->
>> +
>> +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + 
>> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
>> +
>> +    <form name="editSeleniumTestSuitePath" target="updateSeleniumTestSuitePath" type="single" title="Add new selenium test 
>> suite" default-map-name="testSuitePath"
>> +        header-row-style="header-row" default-table-style="basic-table">
>> +        +        <!--alt-target use-when="testSuitePath==null" target="createSeleniumTestSuitePath"/--> +        +        <field 
>> name="testSuiteId" use-when="testSuitePath ==  null"><text></text></field>
>> +        <field name="testSuiteId" use-when="testSuitePath != null"><display></display></field>
>> +        <field name="testSuiteName"><text></text></field>
>> +        <field name="testSuitePath"><text></text></field>
>> +        <field name="description"><textarea rows="3"/></field>
>> +        <field name="submitButton" title=""><submit button-type="button"/></field>
>> +    </form>
>> +    <form name="seleniumTestSuitePathList"  paginate-target="editSeleniumTestSuitePath" type="list" title="path file of selenium 
>> test suite"  separate-columns="true" list-name="listIt"
>> +        view-size="15" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table 
>> hover-bar">
>> +        <actions>
>> +            <set field="parameters" default-value=""></set>
>> +            <set field="parameters.noConditionFind" default-value="Y"></set>
>> +            +            <service service-name="performFind" result-map="result" result-map-list="listIt">
>> +                <field-map field-name="inputFields" from-field="parameters"/>
>> +                <field-map field-name="entityName" value="SeleniumTestSuitePath"/>
>> +                <field-map field-name="orderBy" value="createdStamp"/>
>> +            </service>
>> +        </actions>
>> +        <field name="testSuiteId" widget-style="buttontext">
>> +            <hyperlink also-hidden="true" description="${testSuiteId}" target="editSeleniumTestSuitePath">
>> +                <parameter param-name="testSuiteId"/>
>> +            </hyperlink>
>> +        </field>
>> +        <field name="testSuiteName"><display></display></field>
>> +        <field name="testSuitePath"><display></display></field>
>> +        <field name="description"><display></display></field>
>> +        +        <field name="runTest" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
>> +            <hyperlink target="runTestSuite"  description="${uiLabelMap.CommonRun}">
>> +                <parameter param-name="testSuiteId"/>
>> +                <parameter param-name="testSuitePath" />
>> +            </hyperlink>
>> +        </field>
>> +        <field name="remove" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
>> +            <hyperlink target="removeSeleniumTestSuitePath" description="${uiLabelMap.CommonDelete}">
>> +                <parameter param-name="testSuiteId"/>
>> +            </hyperlink>
>> +        </field>
>> +    </form>
>> +</forms>
>> \ No newline at end of file
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> ------------------------------------------------------------------------------
>>     svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> ------------------------------------------------------------------------------
>>     svn:keywords = "Date Rev Author URL Id"
>>
>> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
>> ------------------------------------------------------------------------------
>>     svn:mime-type = text/xml
>>
>> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
>> +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
>> @@ -23,6 +23,7 @@
>>      <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>>      <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
>>      <include location="component://common/webcommon/WEB-INF/tempexpr-controller.xml"/>
>> +    <include location="component://testtools/webapp/testtools/WEB-INF/controller.xml"/>
>>      <description>WebTools Site Configuration File</description>
>>      <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
>>
>> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=817493&r1=817492&r2=817493&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original)
>> +++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Tue Sep 22 04:00:22 2009
>> @@ -109,6 +109,8 @@
>>          </#if>
>>          <li><h3>${uiLabelMap.WebtoolsCertsX509}</h3></li>
>>          <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsMyCertificates}</a></li>
>> +        <li><h3>Selenium</h3></li>
>> +        <li><a href="<@o...@ofbizUrl>">Selenium</a></li>
>>        </ul>
>>      </#if>
>>    </div>
>>
>>
>>
> 



Re: svn commit: r817493 - in /ofbiz/trunk: applications/content/data/ framework/testtools/ framework/testtools/config/ framework/testtools/documents/ framework/testtools/entitydef/ framework/testtools/script/ framework/testtools/script/org/ framework/testt...

Posted by Deepak Dixit <de...@hotwaxmedia.com>.
Hello Hans,

This commit generate error for loading data.In this statusId used in 
SeleniumHelpData.xml but statusId's  define (ContentTypeData.xml) in  
content component in application and application is loaded after 
framework so statusId generate error.

Thanks & Regards
-----
Deepak Dixit
 
hansbak@apache.org wrote:
> Author: hansbak
> Date: Tue Sep 22 04:00:22 2009
> New Revision: 817493
>
> URL: http://svn.apache.org/viewvc?rev=817493&view=rev
> Log:
> added a selenium option to webtools which partially tests if all settings have been done and will now automatically download the selenium server. Sponsored by Antwebsystems, programmed by employee Gan
>
> Added:
>     ofbiz/trunk/framework/testtools/documents/
>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml   (with props)
>     ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml   (with props)
>     ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml   (with props)
>     ofbiz/trunk/framework/testtools/entitydef/
>     ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml   (with props)
>     ofbiz/trunk/framework/testtools/script/
>     ofbiz/trunk/framework/testtools/script/org/
>     ofbiz/trunk/framework/testtools/script/org/ofbiz/
>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/
>     ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml   (with props)
>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java   (with props)
>     ofbiz/trunk/framework/testtools/webapp/
>     ofbiz/trunk/framework/testtools/webapp/testtools/
>     ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl   (with props)
>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/
>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml   (with props)
>     ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml   (with props)
>     ofbiz/trunk/framework/testtools/widget/
>     ofbiz/trunk/framework/testtools/widget/CommonScreens.xml   (with props)
>     ofbiz/trunk/framework/testtools/widget/Menus.xml   (with props)
>     ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml   (with props)
> Modified:
>     ofbiz/trunk/applications/content/data/ContentTypeData.xml
>     ofbiz/trunk/framework/testtools/build.xml
>     ofbiz/trunk/framework/testtools/config/seleniumXml.properties
>     ofbiz/trunk/framework/testtools/ofbiz-component.xml
>     ofbiz/trunk/framework/testtools/runSeleniumServer.sh
>     ofbiz/trunk/framework/testtools/runSeleniumXml.sh
>     ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
>     ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
>     ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
>     ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
>
> Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/content/data/ContentTypeData.xml (original)
> +++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Tue Sep 22 04:00:22 2009
> @@ -267,5 +267,5 @@
>  
>      <!-- localization example file -->
>      <DataResource dataResourceId="HELP_ROOT_NL" localeString="nl" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
> -    
> +   
>  </entity-engine-xml>
>
> Modified: ofbiz/trunk/framework/testtools/build.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/build.xml?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/build.xml (original)
> +++ ofbiz/trunk/framework/testtools/build.xml Tue Sep 22 04:00:22 2009
> @@ -32,6 +32,7 @@
>      <path id="local.class.path">
>          <fileset dir="${lib.dir}" includes="*.jar"/>
>          <fileset dir="../base/lib" includes="*.jar"/>
> +    	<fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
>          <fileset dir="../base/lib/scripting" includes="*.jar"/>
>          <fileset dir="../base/lib/commons" includes="*.jar"/>
>          <fileset dir="../base/build/lib" includes="*.jar"/>
>
> Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/config/seleniumXml.properties?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/config/seleniumXml.properties (original)
> +++ ofbiz/trunk/framework/testtools/config/seleniumXml.properties Tue Sep 22 04:00:22 2009
> @@ -1,5 +1,5 @@
>  serverHost=localhost
>  proxyPort=4444
> -browser=*firefox
> +browser=*firefox /usr/lib/firefox-3.0.14/firefox
>  startUrl=http://localhost:8080/
> -log4jFile=./config/log4j.properties
> +log4jFile=./config/log4j.properties
> \ No newline at end of file
>
> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml (added)
> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,92 @@
> +<?xml version="1.0"?>
> +<!--
> +    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.
> +-->
> +<section xmlns="http://docbook.org/ns/docbook"
> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
> +    
> +    <title>OFBiz SeleniumXml Introduction</title>
> +    <para>
> +        This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a copy of the presentation that was given at the ApacheCon2008 OFBiz Conference that describes more about the project:<ulink>http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf</ulink>
> +    </para>
> +    <section>
> +        <title>Installing SeleniumXml</title>
> +        <para>1. From the ofbiz directory run the following ant command to download the needed selenium- server.jar file.</para>
> +        <para>2. ant download-selenium</para>
> +        <para>3. ant run-install-extseed (For run install help data and example test)</para>
> +        <para>4. Build the source by running “ant” in the testtools directory or your OFBIZ_HOME</para>
> +        <para>You should now have everything you need to run a seleniumXml test.</para> 
> +    </section>
> +    
> +    <section>
> +    <title>Running the Example Test</title>
> +    
> +        <para>SeleniumXml requires the selenium server to be running. The selenium server uses a default proxy port of 4444. The default port can be changed when you start the server. Selenium tries to automatically change the proxy settings in the testing browser. If you are getting communication errors with the server you may have to manually change your proxy settings in your browser.</para>
> +        <section>
> +            <title>1. Start ofbiz as normal.</title>
> +            <para>Note: Before run ofbiz with selenium should changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties) . Instead everything just works through port 8080. Selenium supports https but it is more complicated so for this introduction I have turned https off.</para>
> +        </section>
> +        <section>
> +            <title>2. Start the selenium server:</title>
> +            <para>runSeleniumServer.bat / runSeleniumServer.sh </para>
> +        </section>
> +        <section>
> +            <title>3. Change the configuration for your preferred browser in the testtools/config/seleniumxml.properties file. The default is firefox (e.g. browser=*firefox) but you can change it to any of the selenium supported browsers.</title>
> +            <para>Selenium supported browsers: <ulink>http://seleniumhq.org/about/platforms.html#browsers</ulink></para> 
> +        </section>
> +        <section>
> +            <title>4. Run the Example test</title>
> +            <section>
> +                <title>4.1 run the Example test  .bat/.sh file</title>
> +                        <para>runSeleniumXml.bat / runSeleniumXml.sh testdef/seleniumxml/example/example_testsuite.xml</para>
> +                        <para>The above test combines three different tests into a single test suite. Data is passed from one test to another to allow you to share generated data.</para>
> +                        <para>You will get an assertion (or other exception) if the test fails.</para>
> +                        <para>The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed value="500"  command). You can remove this at the start of the test if you don't want the delay</para>
> +                        <para>- Here are some screen shots of what you should be seeing.</para>
> +                            <!--para>
> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup1.jpeg" height="150" width="400"></graphic>
> +                            </para>
> +                            <para>
> +                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup2.jpeg" height="150" width="400"></graphic> <graphic fileref="/images/seleniums/ofbizSeleniumSetup3.jpeg" height="150" width="400"></graphic>/>
> +                            </para-->
> +            </section>
> +            <section>
> +                <title>4.2 run the Example test  webtools/Run Selenium</title>
> +                        <para>
> +                            First you need to open the file example_testsuite.xml and comment out first part.. and enable the bottom one
> +                            Here is another way to run the selenium test suite and you can create new test suite for your web application. Scroll up on this page then you will see the link "Run Selenium" next to "Selenium Intro" click on that link. 
> +                            On that page you will see the list of available test suites. So you can click on "Run" to run the test suite you want but please remember that the Selenium server should be started before you "run" any test.
> +                            You can also create new test suite by fill in the information to the form and put the directory location of your test suite in the field "Test Suite Path" then submit. If you want to know how the test is created you can take a look at the file example_testsuite.xml for more info.
> +                        </para>
> +            </section>
> +        </section>
> +    </section>
> +    <section>
> +        <title>Creating New Tests :</title> 
> +        <para>The easiest way to create a new test is to use the Selenium IDE plugin for Firefox. This allows you to records your own Selenium tests. You can then save the test and convert it to a seleniumXml test easily.</para>
> +        <para>1. Install the latest plugin at <ulink>http://seleniumhq.org/projects/ide/</ulink></para>
> +        <para>2. Record your steps as you run through your ofbiz application.</para>
> +        <para>3. Then convert the saved XML file using the convertSeleniumIDE.bat script.</para>
> +    </section>
> +    <section>
> +        <title>For example:</title> 
> +        <para>1. convertSeleniumIDE.bat testdef/seleniumxml/example/recorded/AjaxExample.html testdef/seleniumxml/example/recorded/AjaxExample.xml</para>
> +        <para>2. Manually modify the commands to suit your needs.</para>
> +    </section>
> +</section>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumIntro.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml (added)
> +++ ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,154 @@
> +<?xml version="1.0"?>
> +<!--
> +    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.
> +-->
> +<section xmlns="http://docbook.org/ns/docbook"
> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:schemaLocation="http://docbook.org/ns/docbook ../../../applications/content/dtd/docbook.xsd">
> +    <section>
> +        <title>OFBiz SeleniumXml Introduction with HTTPS</title>
> +        <para>How to setup in firefox browser?</para>
> +        <para>
> +            The problem for https is that the selenium­RC 1.0 and later will be runs in a separate profile 
> +            automatically when the Selenium test is opening a new session for the Firefox browser the browser will 
> +            need a security certificate every time. When this occurs the browser displays security pop up, and these 
> +            pop up cannot be closed using Selenium­RC .  So how to solve this?
> +        </para>
> +        <para>
> +            Create a separate Firefox profile for your tests ( adding a https certificate or install some add­ons)
> +        </para>
> +        <section>
> +            <title>For Ubuntu Linux : </title>
> +            <para> -  Make sure all your Firefox instances are closed .</para>
> +            <para> -  Open a new Terminal and type the command firefox -p -no-remote  in the terminal then press enter. The pop up window will appear.</para>
> +            <!--screenshot>
> +                <graphic fileref="/images/seleniums/profile1.png" width="300" height="300"></graphic>
> +                <caption>
> +                    <para>
> +                        Clicking on “Create Profile” to Create the new profile using the dialog , enter new profile name , choose folder  to store your new profile and then click finish.
> +                    </para>
> +                </caption>
> +            </screenshot-->
> +            <!--screenshot>
> +                <graphic fileref="/images/seleniums/profile3.png" width="400"></graphic>
> +                <caption-->
> +                    <para>
> +                        After that click “Start Firefox” and configure settings based on suggestion below 
> +                    </para>
> +                    <section>
> +                        <title>warrning*</title>
> +                        <para>
> +                            Be sure to put your profile in a new folder separate from the default!!!
> +                        </para>
> +                        <para>
> +                            The Firefox profile manager tool will delete all files in a folder if you delete 
> +                        </para>
> +                        <para>
> +                            a profile, regardless of whether they are profile files or not.
> +                        </para>
> +                    </section>
> +                <!--/caption>
> +            </screenshot-->
> +        </section>
> +        <section>
> +            <title>- Suggested settings for your Selenium Profile</title>
> +            <para>From “View\Toolbars” tab, uncheck “Bookmarks Toolbar” </para>
> +            <para>Right click from toolbar and click “Customize” </para>
> +            <para>Remove “Google search” by dragging it to the “Customize Toolbar” window </para>
> +            <para>From the “Customize Toolbar” window, click “Use Small Icons” check box then hit “Done”</para>
> +            <para>Click “Edit\Preferences” then set the following:</para>
> +                <section>
> +                    <title>“Main” tab</title>
> +                    <para>- set Home Page to “about:blank”</para>
> +                    <para>- uncheck “Show the Downloads..” option</para>
> +                </section>   
> +                <section>
> +                    <title>“Tabs” tab</title>
> +                    <para>- Select “a new window” for new pages</para>
> +                    <para>- Uncheck all warning options</para>
> +                </section>
> +                <section>
> +                    <title>“Content” tab</title>
> +                    <para>- uncheck “Block pop-up” windows option</para>
> +                </section>
> +                <section>
> +                    <title> “Privacy” tab</title>
> +                    <para>- uncheck all “History” options</para>
> +                </section>
> +                <section>
> +                    <title>“Security” tab</title>
> +                    <para>- uncheck all “Security” options</para>
> +                    <para>- click “Settings” and uncheck all warning options</para>
> +                </section>
> +                <section>
> +                    <title>“Advanced” tab</title>
> +                    <para>- Uncheck “autoscrolling” option from “General” tab</para>
> +                    <para>- uncheck “warn me …” and “Ssearch Engines”option from “Update” tab </para>
> +                </section>
> +            
> +                    <!--listitem>1.From “Tools\Add-ons” install the following:
> +                        <para>- Firebug: allows you to edit, debug, and monitor CSS, HTML, and JavaScript on your application under test</para>
> +                        <para>- Selenium IDE: allows you to record, edit, and debug Selenium tests</para>
> +                        <para>- ScreenGrab: saves entire webpages as images. </para>
> +                    </listitem>
> +                    <listitem>1.From the address bar type “about:config” and add the following by right-click anywhere on the page and selecting “new”
> +                        <para>- extensions.update.notifyUser (type=boolean; value=false)</para>
> +                        <para>- extensions.newAddons (type=boolean; value=false) </para>
> +                    </listitem>
> +                    
> +                </orderedlist-->
> +        </section>
> +        
> +    </section>
> +    <section>
> +        <title></title>
> +        <para></para>
> +        <!--para>
> +            Set certificate for your firefox profile type and enter <ulink type="http" url="https://localhost:8443/"></ulink>
> +            (* An url you  want to get certificate.)  then add an exception
> +        </para>
> +        
> +        <screenshot>
> +            <graphic fileref="/images/seleniums/profile2.png" width="400"></graphic>
> +        </screenshot-->
> +    </section>
> +    <section>
> +        <title></title>
> +        <para>At the file “seleniumXml.properties”.</para> 
> +        <para>Change browser=*firefox</para> 
> +        <para>To   browser=*firefox /usr/lib/firefox-3.0.8/firefox</para>  
> +        <para>(*** firefox path)</para>
> +    </section>
> +    <section>
> +        <title></title>
> +        <para>At the file “runSeleniumServer.sh” </para>
> +        <para>"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar 	</para> 
> +        <para>-firefoxProfileTemplate "put path to the profile dir"  </para>  
> +        <para>-trustAllSSLCertificates -singleWindow  -timeout 240 
> +        </para>
> +    </section>
> +    <section>
> +        <title>Note : Please follows the link</title>
> +        <para>
> +            <!--ulink> http://docs.ofbiz.org/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink-->
> +        </para>
> +        <para>
> +            if your found the problem “ofbiz.org cert is expired causes peer not authenticated“.
> +        </para>
> +    </section>
> +</section>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml (added)
> +++ ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,38 @@
> +<?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.
> +-->
> +
> +<entity-engine-xml>
> +    <!-- example test suite -->
> +    <SeleniumTestSuitePath testSuiteId="EXAMPLE_TESTSUITE" testSuiteName="example_testsuite" testSuitePath="framework/testtools/testdef/seleniumxml/example/example_testsuite.xml" description="test suite for example component"/>
> +    
> +    <!--Selenium Help  Load in contentTypeData.xml file -->
> +    <!-- selenium test tool-->   
> +    <DataResource dataResourceId="SELENIUM_INTRO" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumIntro.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium Setup" mimeTypeId="text/xml" isPublic="Y" />
> +    <Content contentId="SELENIUM_INTRO" contentTypeId="DOCUMENT" contentName="OFBiz Selenium" templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_INTRO" localeString="en" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>    
> +    <ContentAssoc contentId="DOCUMENTS"  mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
> +    
> +    <DataResource dataResourceId="SELENIUM_HTTPS" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Ofbiz Selenium HTTPS" mimeTypeId="text/xml" isPublic="Y" />
> +    <Content contentId="SELENIUM_HTTPS" contentTypeId="DOCUMENT" contentName="OFBiz Selenium with HTTPS" templateDataResourceId="HELP_TEMPL" dataResourceId="SELENIUM_HTTPS" localeString="en" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>    
> +    <ContentAssoc contentId="DOCUMENTS" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
> +    
> +    <ContentAssoc contentId="SELENIUM_INTRO" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_HTTPS" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>    
> +    <ContentAssoc contentId="HELP_ROOT" mapKey="SELENIUM_INTRO" contentIdTo="SELENIUM_INTRO" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
> +     
> + </entity-engine-xml>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/documents/SeleniumHelpData.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml (added)
> +++ ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,42 @@
> +<?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.
> +-->
> +
> +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
> +    <!-- ========================================================= -->
> +    <!-- ======================== Defaults ======================= -->
> +    <!-- ========================================================= -->
> +    <title>Entity of an Open For Business Project Component</title>
> +    <description>None</description>
> +    <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright>
> +    <author>None</author>
> +    <version>1.0</version>
> +    
> +    <entity entity-name="SeleniumTestSuitePath"
> +        package-name="org.ofbiz.selenium.test"
> +        default-resource-name="ExampleEntityLabels"
> +        title="Selenium Test suite file">
> +        <field name="testSuiteId" type="id-ne"></field>
> +        <field name="testSuiteName" type="name"></field>
> +        <field name="testSuitePath" type="description"></field>
> +        <field name="description" type="very-long"></field>
> +        <prim-key field="testSuiteId"/>
> +    </entity>
> +</entitymodel>
>
> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/entitydef/entitymodel.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Modified: ofbiz/trunk/framework/testtools/ofbiz-component.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/ofbiz-component.xml?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/ofbiz-component.xml (original)
> +++ ofbiz/trunk/framework/testtools/ofbiz-component.xml Tue Sep 22 04:00:22 2009
> @@ -1,37 +1,43 @@
>  <?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.
> +    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.
>  -->
>  
>  <ofbiz-component name="testtools"
> -        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> -        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
> +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
>      <!-- define resource loaders; most common is to use the component resource loader -->
>      <resource-loader name="main" type="component"/>
>      <classpath type="dir" location="config"/>
> -
> +    
>      <!-- place the config directory on the classpath to access configuration files -->
>      <classpath type="dir" location="dtd"/>
> -
> +    
>      <!-- load single or multiple external libraries -->
>      <classpath type="jar" location="lib/*"/>
>      <classpath type="jar" location="build/lib/*"/>
> -
> +    
> +    <!-- entitydef -->
> +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
> +    
> +    <entity-resource type="data" reader-name="seed" loader="main" location="documents/SeleniumHelpData.xml"/>
> +    
>      <!-- service resources: model(s), eca(s) and group definitions -->
>      <service-resource type="model" loader="main" location="servicedef/services.xml"/>
> -</ofbiz-component>
> +    
> +</ofbiz-component>
> \ No newline at end of file
>
> Modified: ofbiz/trunk/framework/testtools/runSeleniumServer.sh
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumServer.sh?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/runSeleniumServer.sh (original)
> +++ ofbiz/trunk/framework/testtools/runSeleniumServer.sh Tue Sep 22 04:00:22 2009
> @@ -6,6 +6,6 @@
>    JAVA=java
>  fi
>  
> -"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -timeout 240
> +"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar  -singleWindow  -trustAllSSLCertificates -timeout 240
>  exit 0
>  
>
> Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original)
> +++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Tue Sep 22 04:00:22 2009
> @@ -9,6 +9,7 @@
>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar
>  export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar
> +export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar
>  
>  echo $CP
>  
>
> Added: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml (added)
> +++ ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,46 @@
> +<?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.
> +-->
> +
> +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
> +    <simple-method method-name="updateSeleniumTestSuitePath"  short-description="add new test suite path file ">
> +
> +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
> +        <if-not-empty field="lookedUpValue.testSuiteId">
> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
> +            <store-value value-field="lookedUpValue"/>
> +        </if-not-empty>
> +        <if-empty field="lookedUpValue.testSuiteId">
> +            <set-nonpk-fields map="parameters" value-field="lookupPKMap"/>
> +            <create-value value-field="lookupPKMap"/>
> +        </if-empty>
> +    </simple-method>
> +    <simple-method method-name="removeSeleniumTestSuitePath"  short-description="remove test suite path file ">
> +        
> +        <make-value value-field="lookupPKMap" entity-name="SeleniumTestSuitePath"/>
> +        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
> +        <find-by-primary-key entity-name="SeleniumTestSuitePath" map="lookupPKMap" value-field="lookedUpValue"/>
> +        <if-not-empty field="lookedUpValue.testSuiteId">
> +            <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
> +            <remove-value value-field="lookedUpValue"/>
> +        </if-not-empty>
> +    </simple-method>
> +</simple-methods>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java (added)
> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,179 @@
> +package org.ofbiz.testtools;
> +
> +import java.io.BufferedInputStream;
> +import java.io.BufferedOutputStream;
> +import java.io.File;
> +import java.io.FileOutputStream;
> +import java.io.IOException;
> +import java.io.InputStream;
> +import java.io.UnsupportedEncodingException;
> +import java.io.Writer;
> +import java.net.MalformedURLException;
> +import java.net.URL;
> +import java.net.URLConnection;
> +import java.util.Map;
> +import java.util.Properties;
> +
> +import javax.servlet.http.HttpServletRequest;
> +import javax.servlet.http.HttpServletResponse;
> +
> +import org.ofbiz.base.util.Debug;
> +import org.ofbiz.base.util.UtilProperties;
> +import org.ofbiz.base.util.UtilURL;
> +
> +
> +import javolution.util.FastMap;
> +
> +
> +import net.sf.json.JSONObject;
> +
> +
> +public class VerifySeleniumSetups {
> +
> +	public static final String module = VerifySeleniumSetups.class.getName();
> +	private static int currentValue  = 0;
> +	private static int contentLength = 0;
> +	private static Map<String,Object> josonMap = null;
> +	private static String urlSite = "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=";
> +	private static String libPath = "framework/testtools/lib/selenium-server.jar";
> +
> +	public VerifySeleniumSetups(){
> +
> +	}
> +
> +	/* prepare lib for selenium test 
> +	 * Check & download selenium-server.jar from http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror=
> +	 * Check a change use HTTP as the default at file framework/webapp/config/url.properties  
> +	 * Check correct the config/seleniumXml.properties and firefox  path
> +	 */
> +
> +	public static String verifyConfig(HttpServletRequest request, HttpServletResponse response){
> +		boolean lib = false;
> +		boolean urlset = false;
> +		Map<String,Object> msgMap = FastMap.newInstance();
> +		Properties urlProps = null;
> +		try{
> +			/* Check and down load selenium-server.jar */ 
> +			File file = new File(libPath);
> +			URL url = new URL(urlSite);
> +			URLConnection connection = url.openConnection();
> +			contentLength = connection.getContentLength();
> +			if(contentLength == -1){
> +				 request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet");
> +			}
> +			Debug.log("file size. "+contentLength,module);
> +			if(file.exists()){
> +				if(contentLength == file.length()){
> +					lib = true;
> +				}else lib = false;
> +			}
> +			msgMap.put("LIBFLAG",lib);
> +
> +			/* Check a change use HTTP as the default */
> +			String httpStatus = null;
> +			URL urlProp = UtilURL.fromResource("url.properties");
> +			if (urlProps == null) {
> +				urlProps = new Properties();
> +				if (urlProp == null) {
> +					String errMsg = "variable with name " + urlProp.toString() + " is not set, cannot resolve location.";
> +					throw new MalformedURLException(errMsg);
> +				}
> +				urlProps = UtilProperties.getProperties(urlProp);
> +				if(urlProps != null){
> +					httpStatus = urlProps.getProperty("port.https.enabled");
> +					if(httpStatus != null && httpStatus.equals("N")){
> +						urlset = true;
> +					}
> +				}
> +			}
> +			msgMap.put("URLFLAG",urlset);
> +			request.setAttribute("MSGMAP", msgMap);
> +		}catch(Exception e){
> +			Debug.logError(e.getMessage(), module);
> +		}
> +		return "success";
> +	}
> +
> +	public  static void doDownload( HttpServletRequest request, HttpServletResponse response){
> +		URL url = null;
> +		long bytesRead= 0;
> +		currentValue  = 0;
> +		contentLength = 0;
> +		BufferedInputStream in = null;
> +		BufferedOutputStream out = null;
> +		try {
> +			url = new URL(urlSite);
> +
> +			URLConnection connection = url.openConnection();
> +			contentLength = connection.getContentLength();
> +			InputStream stream = connection.getInputStream();
> +			Debug.log("getContentLength is :"+contentLength);
> +
> +			in = new BufferedInputStream(stream);
> +
> +			long totalBytes = in.available();
> +			Debug.log("totalBytes is : "+totalBytes);
> +
> +			byte[] b = new byte[1024];
> +
> +			FileOutputStream file = new FileOutputStream(libPath);
> +			out = new BufferedOutputStream(file);
> +
> +			int r;
> +			Debug.log("currentValue is : "+currentValue+" bytes");
> +			while ((r = in.read(b,0,b.length)) != -1) {
> +				out.write(b,0,r);
> +				bytesRead += r;
> +				currentValue = (int)(bytesRead * 100 / contentLength);
> +				// Debug.log("loading.. :"+bytesRead);
> +			}
> +			out.flush();
> +		} catch (IOException ex) {
> +			Debug.logError("Error message :"+ex.getMessage(),module);
> +		}finally {
> +			try {
> +				if (in != null) in.close();
> +				if (out != null) out.close();
> +			}catch (Exception ex) {
> +				Debug.logError("Error message :"+ex.getMessage(),module);
> +			}
> +		}
> +	}
> +
> +	public static String checkProgressDownloadStatus(HttpServletRequest request, HttpServletResponse response){
> +		if(josonMap == null){
> +			josonMap = FastMap.newInstance();
> +		}
> +
> +		josonMap.put("loadPercent", currentValue);
> +		josonMap.put("contentLength", contentLength);
> +		toJsonObject(josonMap,response);
> +
> +		return "success";
> +	}
> +
> +	public static void toJsonObject(Map<String,Object> attrMap, HttpServletResponse response){
> +		JSONObject json = JSONObject.fromObject(attrMap);
> +		String jsonStr = json.toString();
> +		if (jsonStr == null) {
> +			Debug.logError("JSON Object was empty; fatal error!",module);
> +		}
> +		// set the X-JSON content type
> +		response.setContentType("application/json");
> +		// jsonStr.length is not reliable for unicode characters
> +		try {
> +			response.setContentLength(jsonStr.getBytes("UTF8").length);
> +		} catch (UnsupportedEncodingException e) {
> +			Debug.logError("Problems with Json encoding",module);
> +		}
> +		// return the JSON String
> +		Writer out;
> +		try {
> +			out = response.getWriter();
> +			out.write(jsonStr);
> +			out.flush();
> +		} catch (IOException e) {
> +			Debug.logError("Unable to get response writer",module);
> +		}
> +	}
> +}
>
> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original)
> +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Tue Sep 22 04:00:22 2009
> @@ -18,11 +18,17 @@
>   */
>  package org.ofbiz.testtools.seleniumxml;
>  
> +import java.io.BufferedInputStream;
> +import java.io.BufferedOutputStream;
> +import java.io.DataInputStream;
>  import java.io.File;
>  import java.io.FileInputStream;
> +import java.io.FileOutputStream;
>  import java.io.IOException;
>  import java.io.InputStream;
>  import java.net.MalformedURLException;
> +import java.net.URL;
> +import java.net.URLConnection;
>  import java.util.List;
>  import java.util.ArrayList;
>  import java.util.Map;
> @@ -31,10 +37,12 @@
>  import java.util.regex.Pattern;
>  import java.lang.reflect.*;
>  
> +import javax.servlet.http.HttpServletRequest;
> +import javax.servlet.http.HttpServletResponse;
>  import javolution.util.FastMap;
> -
>  import junit.framework.Assert;
>  
> +import org.apache.commons.io.output.ByteArrayOutputStream;
>  import org.apache.commons.lang.RandomStringUtils;
>  import org.apache.log4j.Level;
>  import org.apache.log4j.Logger;
> @@ -43,9 +51,12 @@
>  import org.jdom.Element;
>  import org.jdom.JDOMException;
>  import org.jdom.input.SAXBuilder;
> +import org.ofbiz.testtools.seleniumxml.util.TestUtils;
>  
>  import org.ofbiz.base.util.UtilGenerics;
> -import org.ofbiz.testtools.seleniumxml.util.TestUtils;
> +import org.ofbiz.base.util.UtilHttp;
> +import org.ofbiz.base.util.UtilProperties;
> +import org.ofbiz.base.util.UtilURL;
>  
>  import com.thoughtworks.selenium.DefaultSelenium;
>  //import com.thoughtworks.selenium.SeleniumException;
> @@ -53,7 +64,8 @@
>  
>  public class SeleniumXml {
>      
> -    public static final String PROPS_NAME = "selenium.config";
> +    //public static final String PROPS_NAME = "selenium.config";
> +    public static String PROPS_NAME = "selenium.config";
>      Logger  logger = Logger.getLogger(SeleniumXml.class.getName());
>  
>      public static final int MAX_STR_LENGTH = 15;
> @@ -83,6 +95,35 @@
>              sel.runTest(args[0]);
>          }
>      }
> +   
> +    /* call run test suite from webtool selenium */
> +    public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){
> +    	Map parameters = UtilHttp.getParameterMap(request);
> +    	String para = (String)parameters.get("testSuitePath");
> +    	if(para == null){
> +    		System.out.println("Error message : Test suite Path  is null");
> +    		return "success";
> +    	}
> +    	if(para.length()==0){
> +    		System.out.println("Error message : Test suite Path  is null");
> +    		return "success";
> +    	}
> +    	 try{
> +    		 URL url = UtilURL.fromResource("seleniumXml.properties");
> +    		 if (props == null) {
> +	            props = new Properties();
> +	            initConfig(url);
> +    		 }
> +    		 SeleniumXml sel = new SeleniumXml();
> +    		 sel.runTest(para.trim());
> +        }catch(JDOMException jdome){
> +    		 System.out.println(jdome.getMessage());
> +    	 }catch(IOException ioe){
> +    		 System.out.println("Error message : "+ioe.getMessage());
> +    	 }finally{
> +    		 return "success";
> +    	 }
> +    }
>      
>      public SeleniumXml() throws IOException {
>          this.map = FastMap.newInstance();
> @@ -95,7 +136,12 @@
>  
>      private static void initConfig() throws IOException {
>          try {
> -            String configFile = System.getProperty(PROPS_NAME);
> +        	String configFile  = "";
> +        	if(System.getProperty(PROPS_NAME)==null){
> +        		configFile = PROPS_NAME;
> +        	}else{
> +        		configFile = System.getProperty(PROPS_NAME);
> +        	}
>              if (configFile == null) {
>                  String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot resolve location.";
>                  throw new MalformedURLException(errMsg);
> @@ -111,6 +157,19 @@
>              throw e;
>          }
>      }
> +    private static void initConfig(URL url) throws IOException {
> +        try {
> +            if (url == null) {
> +                String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, cannot resolve location.";
> +                throw new MalformedURLException(errMsg);
> +            }
> +           // BasicConfigurator.configure();
> +            props = UtilProperties.getProperties(url);
> +        } catch (IOException e) {
> +            e.printStackTrace();
> +            throw e;
> +        }
> +    }
>      
>      /**
>       * Constructor to preset with an existing Map of parameters.  Intended to be used 
> @@ -136,7 +195,8 @@
>  
>      public void runCommands() {
>          Element root = this.doc.getRootElement();
> -        List<Element> nodes = UtilGenerics.cast(root.getChildren());
> +        //List<Element> nodes = UtilGenerics.cast(root.getChildren());
> +        List<Element> nodes = root.getChildren();
>          runCommands(nodes);
>      }
>      
> @@ -734,5 +794,4 @@
>      public Map <String, Object> getMap() {
>          return this.map;
>      }
> -}
> -
> +}
> \ No newline at end of file
>
> Modified: ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml (original)
> +++ ofbiz/trunk/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml Tue Sep 22 04:00:22 2009
> @@ -1,8 +1,14 @@
>  <?xml version="1.0"?>
>  <testcase>
>      <setSpeed value="500" />
> -    <testcase file="testdef/seleniumxml/example/example_login.xml"/>
> +    
> +    <!-- start from runSeleniumXml.sh -->
> +    <!--testcase file="testdef/seleniumxml/example/example_login.xml"/>
>      <testcase file="testdef/seleniumxml/example/example_new.xml"/>
> -    <testcase file="testdef/seleniumxml/example/example_search.xml"/>
> +    <testcase file="testdef/seleniumxml/example/example_search.xml"/-->
> +    <!-- start from webtools/run selenium -->
> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_login.xml"/>
> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_new.xml"/>
> +    <testcase file="framework/testtools/testdef/seleniumxml/example/example_search.xml"/>
>  </testcase>
>  
>
> Added: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl (added)
> +++ ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,117 @@
> +<#--
> +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.
> +-->
> +
> +<#assign  libcheck  =  "">
> +<#assign  urlcheck  =  "">
> +<#assign msg = request.getAttribute("MSGMAP")?if_exists>
> +<#if msg?has_content>
> +    <#if msg.LIBFLAG?exists><#assign  libcheck  =  msg.LIBFLAG?if_exists?string></#if>
> +    <#if msg.URLFLAG?exists><#assign  urlcheck  =  msg.URLFLAG?if_exists?string></#if>
> +</#if>
> +<a id="verifly" href="<@o...@ofbizUrl>" class="buttontext">Verify</a>
> +<table class="basic-table hover-bar" cellspacing="0">
> +        <tr class="header-row" >
> +          <td>Description</td>
> +          <td>Status</td>
> +        </tr>
> +        <tr>
> +          <td>- selenium_server.jar </td>
> +          <td>
> +                <#if libcheck == "true">
> +                    success
> +                <#else>
> +                    <div style="color:red;" id="message">please click download this lib for run the selenium application!</div>
> +                    <div id="loadpercent"><a id="download" href="javascript:clickDownLoad('<@o...@ofbizUrl>');" class="buttontext">download</a></div>
> +                    <div id="progress_bar"  style="display:none"></div>
> +                    <div id="filesize"  style="display:none"></div>
> +                </#if>
> +          </td>
> +        </tr>
> +        <tr valign="middle" class="alternate-row">
> +          <td>- Changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties)</td>
> +          <td>
> +                <#if  urlcheck == "true">
> +                    success
> +                <#else>
> +                    <div style="color:red;">Not success!</div>
> +                </#if>
> +          </td>
> +        </tr>
> +        <tr>
> +          <td> 
> +            <ol>
> +            <li>Edit 'framework/testtools/config/seleniumXml.properties' and  add your firefox path, replace the example in the file</li>
> +            <li>Then save and restart ofbiz.</li>
> +            <li>Then open a new terminal to start the seleniumserver. (cd framework/testtools;./runSeleniumServer.sh)</li>
> +            <li>Then run the test below.</li>
> +            </ol>
> +          </td>
> +          <td>
> +          </td>
> +        </tr>
> +      </table>
> +<script type="text/javascript"> 
> +    var progressBar;
> +    // click start load call servlet & new progressBar
> +    function clickDownLoad(url){
> +         startDownLoad(url);
> +         $('progress_bar').style.display = "";
> +         $('filesize').style.display = "";
> +         progressBar = new Control.ProgressBar('progress_bar');
> +    }
> +    
> +    function startDownLoad(url){
> +        var pars = '';
> +        var myAjax = new Ajax.Request( url, {
> +                method: 'post', 
> +                parameters: pars, 
> +                onLoading:getProgressDownloadStatus,
> +                onComplete : $('download').innerHTML = 'loading....'
> +            } );            
> +    }
> +    
> +    //function PeriodicalExecuter check download status
> +    function getProgressDownloadStatus(){
> +        new PeriodicalExecuter(function(event){
> +            var pars = '';
> +            var myAjax = new Ajax.Request( '<@o...@ofbizUrl>', {
> +                    method: 'get', 
> +                    parameters: pars, 
> +                    onSuccess:function check(transfer){
> +                       var data = transfer.responseText.evalJSON(true);
> +                       if( data != null ){
> +                           if(data.contentLength != null && data.loadPercent != null){
> +                               var loadPercent = data.loadPercent;
> +                               $('loadpercent').innerHTML = ''+loadPercent+'%';
> +                               var contentLength  = data.contentLength;
> +                               //$('filesize').innerHTML = '<b>'+contentLength/1000 + ' k</b>';
> +                               progressBar.setProgress(loadPercent);
> +                               if(loadPercent > 99){
> +                                    $('download').innerHTML = 'download';
> +                                    event.stop();
> +                               }
> +                           }
> +                       }
> +                    }
> +            } );
> +        },1);
> +       $('message').innerHTML = 'success';
> +       $('message').style.color = "black";
> +    }
> +</script>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/SeleniumTest.ftl
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml (added)
> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,76 @@
> +<?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.
> +-->
> +
> +<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
> +    <!-- The controller elements that are common to all OFBiz components
> +        can be found in the following xml file. A component can override the
> +        elements found in the common-controller.xml file. -->
> +    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
> +    
> +    <!--  selenium Test Case -->
> +    <request-map uri="selenium">
> +        <security https="true" auth="true"/>
> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    <request-map uri="verify">
> +        <security https="true" auth="true"/>
> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="verifyConfig"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    <request-map uri="downloadSeleniumlib">
> +        <security https="true" auth="true"/>
> +        <!-- validate Install all libs want to use in selenium -->
> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="doDownload"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    <request-map uri="progressDownloadStatus">
> +        <security https="true" auth="true"/>
> +        <event type="java" path="org.ofbiz.testtools.VerifySeleniumSetups" invoke="checkProgressDownloadStatus"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    <request-map uri="runTestSuite">
> +        <security https="false" auth="false"/>
> +        <event type="java" path="org.ofbiz.testtools.seleniumxml.SeleniumXml" invoke="runTestSuite"/>
> +        <response name="success" type="request-redirect" value="selenium" />
> +    </request-map>
> +    
> +    <request-map uri="updateSeleniumTestSuitePath">
> +        <security https="true" auth="true"/>
> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" invoke="updateSeleniumTestSuitePath"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    <request-map uri="removeSeleniumTestSuitePath">
> +        <security https="true" auth="true"/>
> +        <event type="simple" path="component://testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml" invoke="removeSeleniumTestSuitePath"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    
> +    <request-map uri="editSeleniumTestSuitePath">
> +    <security https="true" auth="true"/>
> +        <response name="success" type="view" value="selenium"/>
> +    </request-map>
> +    
> +    <!--  selenium Test Case -->
> +    <view-map name="selenium" type="screen" page="component://testtools/widget/CommonScreens.xml#selenium"/>
> +    <view-map name="runSelenium" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
> +    <view-map name="test" type="screen" page="component://testtools/widget/CommonScreens.xml#runSelenium"/>
> +</site-conf>
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/controller.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml (added)
> +++ ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,90 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> +<!--
> +    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.
> +-->
> +
> +<web-app>
> +    <display-name>Open For Business - Example Application</display-name>
> +    <description>Example Application of the Open For Business Project</description>
> +    
> +    <context-param>
> +        <param-name>webSiteId</param-name>
> +        <param-value>TESTTOOLS</param-value>
> +        <description>A unique ID used to look up the WebSite entity</description>
> +    </context-param>
> +    <context-param>
> +        <param-name>localDispatcherName</param-name><param-value>testtools</param-value>
> +        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
> +    </context-param>
> +    <context-param>
> +        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
> +        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
> +    </context-param>
> +    <context-param>
> +        <param-name>mainDecoratorLocation</param-name>
> +        <param-value>component://example/widget/example/CommonScreens.xml</param-value>
> +        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
> +    </context-param>
> +    <context-param>
> +        <param-name>widgetVerbose</param-name>
> +        <param-value>false</param-value>
> +        <description>Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
> +    </context-param>
> +    <context-param>
> +        <param-name>compressHTML</param-name>
> +        <param-value>false</param-value>
> +        <description>Remove unnecessary whitespace from HTML output.</description>
> +    </context-param>
> +    
> +    <filter>
> +        <filter-name>ContextFilter</filter-name>
> +        <display-name>ContextFilter</display-name>
> +        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
> +        <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
> +        <init-param>
> +            <param-name>allowedPaths</param-name>
> +            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
> +        </init-param>
> +        <init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
> +        <init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>
> +    </filter>
> +    <filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
> +    
> +    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
> +    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
> +    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
> +    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
> +    
> +    <servlet>
> +        <servlet-name>ControlServlet</servlet-name>
> +        <display-name>ControlServlet</display-name>
> +        <description>Main Control Servlet</description>
> +        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
> +        <load-on-startup>1</load-on-startup>
> +    </servlet>
> +    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
> +    
> +    <session-config><session-timeout>60</session-timeout><!-- in minutes --></session-config>
> +    
> +    <welcome-file-list>
> +        <welcome-file>index.jsp</welcome-file>
> +        <welcome-file>index.html</welcome-file>
> +        <welcome-file>index.htm</welcome-file>
> +    </welcome-file-list>
> +</web-app>
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/webapp/testtools/WEB-INF/web.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/CommonScreens.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/widget/CommonScreens.xml (added)
> +++ ofbiz/trunk/framework/testtools/widget/CommonScreens.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,96 @@
> +<?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://ofbiz.apache.org/dtds/widget-screen.xsd">
> +    <screen name="main-decorator">
> +        <section>
> +            <actions>
> +                <!-- base/top/specific map first, then more common map added for shared labels -->
> +                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
> +                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
> +                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
> +                <set field="layoutSettings.companyName" from-field="uiLabelMap.WebtoolsCompanyName" global="true"/>
> +                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.WebtoolsCompanySubtitle" global="true"/>
> +                <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
> +                    then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
> +                <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>-->
> +                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
> +                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
> +                <set field="activeApp" value="webtools" global="true"/>
> +                <!-- <set field="appheaderTemplate" value="component://webtools/webapp/webtools/includes/appheader.ftl" global="true"/> -->
> +                
> +                <set field="applicationMenuLocation" value="component://webtools/widget/Menus.xml" global="true"/>
> +                <set field="applicationMenuName" value="WebtoolsAppBar" global="true"/>
> +                <set field="applicationTitle" value="${uiLabelMap.FrameworkWebTools}" global="true"/>
> +            </actions>
> +            <widgets>
> +                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
> +            </widgets>
> +        </section>
> +    </screen>
> +    
> +    <screen name="main">
> +        <section>
> +            <actions>
> +                <set field="titleProperty" value="WebtoolsMainPage"/>
> +                <set field="headerItem" value="main"/>
> +            </actions>
> +            <widgets>
> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
> +                    <decorator-section name="body">
> +                        <platform-specific><html><html-template location="component://webtools/webapp/webtools/main.ftl"/></html></platform-specific>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>
> +    </screen>
> +    
> +    <screen name="selenium">
> +        <section>
> +            <actions>
> +                <set field="tabButtonItem" value="selenium"/> 
> +                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/>
> +                <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>
> +                <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
> +                <entity-one entity-name="SeleniumTestSuitePath"  value-field="testSuitePath">
> +                    <field-map field-name="testSuiteId" value="${parameters.testSuiteId}"/>
> +                </entity-one>
> +            </actions>
> +            <widgets>
> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
> +                    <decorator-section name="body">
> +                        <!--include-menu name="SeleniumTabBar" location="component://testtools/widget/Menus.xml"/-->
> +                        <screenlet title="OFBiz SeleniumXml Verify">
> +                            <platform-specific><html><html-template location="component://testtools/webapp/testtools/SeleniumTest.ftl"/></html></platform-specific>
> +                        </screenlet>
> +                        <screenlet title="Test Suite List">
> +                            <include-form name="seleniumTestSuitePathList" location="component://testtools/widget/RunSeleniumForms.xml"/>
> +                        </screenlet>
> +                        <link target="runSelenium"  style="buttontext" text="New Test Suite"></link>
> +                        <screenlet title="New Test Suite">
> +                            <include-form name="editSeleniumTestSuitePath" location="component://testtools/widget/RunSeleniumForms.xml"/>
> +                        </screenlet>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>
> +    </screen>
> +</screens>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/widget/CommonScreens.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/widget/Menus.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/Menus.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/widget/Menus.xml (added)
> +++ ofbiz/trunk/framework/testtools/widget/Menus.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,31 @@
> +<?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.
> +-->
> +
> +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
> +    
> +    <menu name="SeleniumTabBar"  extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
> +        <menu-item name="selenium" title="Selenium Intro">
> +            <link target="selenium"/>
> +        </menu-item>
> +        <menu-item name="runSelenium" title="Run Selenium">
> +            <link target="runSelenium"/>
> +        </menu-item>
> +    </menu>    
> +</menus>
>
> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/widget/Menus.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Added: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml?rev=817493&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml (added)
> +++ ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml Tue Sep 22 04:00:22 2009
> @@ -0,0 +1,69 @@
> +<?xml version="1.0" encoding="ISO-8859-1"?>
> +<!--
> +    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.
> +-->
> +
> +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
> +
> +    <form name="editSeleniumTestSuitePath" target="updateSeleniumTestSuitePath" type="single" title="Add new selenium test suite" default-map-name="testSuitePath"
> +        header-row-style="header-row" default-table-style="basic-table">
> +        
> +        <!--alt-target use-when="testSuitePath==null" target="createSeleniumTestSuitePath"/--> 
> +        
> +        <field name="testSuiteId" use-when="testSuitePath ==  null"><text></text></field>
> +        <field name="testSuiteId" use-when="testSuitePath != null"><display></display></field>
> +        <field name="testSuiteName"><text></text></field>
> +        <field name="testSuitePath"><text></text></field>
> +        <field name="description"><textarea rows="3"/></field>
> +        <field name="submitButton" title=""><submit button-type="button"/></field>
> +    </form>
> +    <form name="seleniumTestSuitePathList"  paginate-target="editSeleniumTestSuitePath" type="list" title="path file of selenium test suite"  separate-columns="true" list-name="listIt"
> +        view-size="15" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
> +        <actions>
> +            <set field="parameters" default-value=""></set>
> +            <set field="parameters.noConditionFind" default-value="Y"></set>
> +            
> +            <service service-name="performFind" result-map="result" result-map-list="listIt">
> +                <field-map field-name="inputFields" from-field="parameters"/>
> +                <field-map field-name="entityName" value="SeleniumTestSuitePath"/>
> +                <field-map field-name="orderBy" value="createdStamp"/>
> +            </service>
> +        </actions>
> +        <field name="testSuiteId" widget-style="buttontext">
> +            <hyperlink also-hidden="true" description="${testSuiteId}" target="editSeleniumTestSuitePath">
> +                <parameter param-name="testSuiteId"/>
> +            </hyperlink>
> +        </field>
> +        <field name="testSuiteName"><display></display></field>
> +        <field name="testSuitePath"><display></display></field>
> +        <field name="description"><display></display></field>
> +        
> +        <field name="runTest" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
> +            <hyperlink target="runTestSuite"  description="${uiLabelMap.CommonRun}">
> +                <parameter param-name="testSuiteId"/>
> +                <parameter param-name="testSuitePath" />
> +            </hyperlink>
> +        </field>
> +        <field name="remove" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
> +            <hyperlink target="removeSeleniumTestSuitePath" description="${uiLabelMap.CommonDelete}">
> +                <parameter param-name="testSuiteId"/>
> +            </hyperlink>
> +        </field>
> +    </form>
> +</forms>
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
> ------------------------------------------------------------------------------
>     svn:keywords = "Date Rev Author URL Id"
>
> Propchange: ofbiz/trunk/framework/testtools/widget/RunSeleniumForms.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
> +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Sep 22 04:00:22 2009
> @@ -23,6 +23,7 @@
>      <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>      <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
>      <include location="component://common/webcommon/WEB-INF/tempexpr-controller.xml"/>
> +    <include location="component://testtools/webapp/testtools/WEB-INF/controller.xml"/>
>      <description>WebTools Site Configuration File</description>
>      <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
>  
>
> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=817493&r1=817492&r2=817493&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original)
> +++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Tue Sep 22 04:00:22 2009
> @@ -109,6 +109,8 @@
>          </#if>
>          <li><h3>${uiLabelMap.WebtoolsCertsX509}</h3></li>
>          <li><a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsMyCertificates}</a></li>
> +        <li><h3>Selenium</h3></li>
> +        <li><a href="<@o...@ofbizUrl>">Selenium</a></li>
>        </ul>
>      </#if>
>    </div>
>
>
>