[portal-commits] JBoss Portal SVN: r12987 - in branches/JBoss_Portal_AS5_Deployer/testsuite: ui-tests and 4 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Fri Mar 6 18:23:01 EST 2009


Author: mwringe
Date: 2009-03-06 18:23:00 -0500 (Fri, 06 Mar 2009)
New Revision: 12987

Added:
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/end2end.xml
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/lib/jboss-test.jar
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/run.sh
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/usecaseng.xml
Modified:
   branches/JBoss_Portal_AS5_Deployer/testsuite/build.xml
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/build.xml
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/lib/selenium-java-client-driver.jar
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
   branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/testng.xml
Log:
Merge JBoss_Portal_Branch_2_7 changes (rev range 12254:12964) into JBoss_Portal_AS5_Deployer branch

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/build.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/build.xml	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/build.xml	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?><!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~ JBoss, a division of Red Hat                                              ~
-  ~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
-  ~ contributors as indicated by the @authors tag. See the                    ~
-  ~ copyright.txt in the distribution for a full listing of                   ~
-  ~ individual contributors.                                                  ~
-  ~                                                                           ~
-  ~ This is free software; you can redistribute it and/or modify it           ~
-  ~ under the terms of the GNU Lesser General Public License as               ~
-  ~ published by the Free Software Foundation; either version 2.1 of          ~
-  ~ the License, or (at your option) any later version.                       ~
-  ~                                                                           ~
-  ~ This software is distributed in the hope that it will be useful,          ~
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
-  ~ Lesser General Public License for more details.                           ~
-  ~                                                                           ~
-  ~ You should have received a copy of the GNU Lesser General Public          ~
-  ~ License along with this software; if not, write to the Free               ~
-  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
+  ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+  ~ contributors as indicated by the @authors tag. See the
+  ~ copyright.txt in the distribution for a full listing of
+  ~ individual contributors.
+  ~
+  ~ This is free software; you can redistribute it and/or modify it
+  ~ under the terms of the GNU Lesser General Public License as
+  ~ published by the Free Software Foundation; either version 2.1 of
+  ~ the License, or (at your option) any later version.
+  ~
+  ~ This software is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  ~ Lesser General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public
+  ~ License along with this software; if not, write to the Free
+  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
 
@@ -106,9 +106,11 @@
       <server:start name="default"/>
       <sequential>
          <antcall target="agent-deploy"/>
+      	<!-- cms is a module now
          <antcall target="internal-test-module">
             <param name="module" value="cms"/>
          </antcall>
+         -->
          <antcall target="internal-test-module">
             <param name="module" value="faces"/>
          </antcall>
@@ -155,8 +157,6 @@
    <target name="clean">
       <!-- remove generated test xml files -->
       <delete>
-         <fileset dir="../cms" includes="output/tests/*.log"/>
-         <fileset dir="../cms" includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
          <fileset dir="../core" includes="output/tests/*.log"/>
          <fileset dir="../core" includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
          <fileset dir="../faces" includes="*.log"/>

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/build.xml	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/build.xml	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,127 +1,216 @@
+
 <project name="Tests" default="compile" basedir="." xmlns:server="http://jboss.org/ns/test/ant/server">
 
-	<property environment="env" />
+    <property environment="env" />
 
-	<property name="java.home" location="${env.JAVA_HOME}" />
+    <property name="workspace" location="build.xml" />
+    <property name="java.home" location="${env.JAVA_HOME}" />
 
-	<property name="suitename" location="testng-files" />
-	<property name="testname" location="testng-files" />
-	
-	<property name="testng.dir" location="testng-files" />
-	<property name="testng.output.dir" location="test-output" />
-	<property name="test.build.dir" location="output/classes" />
-	<property name="test.src.dir" location="src" />
-	<property name="lib.dir" location="lib" />
-	<property name="hudson.lib.dir" location="/qa/tools/opt/" />
-	<property name="jboss-test.jar" location="${hudson.lib.dir}/jboss-test.jar" />
-	<available file="${jboss-test.jar}" property="jboss-test.jar.present" />
-	<property name="junit.report.dir" location="test-report" />
+    <property name="suitename" location="testng-files" />
+    <property name="testname" location="testng-files" />
 
-	<property name="selsrv.dir" location="selenium-rc-server" />
-	<property name="node0" value="localhost" />
-	<property name="jboss.test.home" value="${env.JBOSS_TEST_HOME}" />
-	<property name="jboss.home" value="${env.JBOSS_HOME}" />
-	<property name="jboss.test.jar" value="${env.JBOSSTESTJAR}" />
-	<property name="jboss.portal.dir" value="${env.JBOSS_UNZIPED_DIR}" />
-	<property name="portal_archive" value="${env.JBOSS_ARCHIVE}" />
-	<property name="portal.instance" value="default" />
+    <property name="testng.dir" location="testng-files" />
+    <property name="testng.output.dir" location="test-output" />
+    <property name="test.build.dir" location="output/classes" />
+    <property name="test.src.dir" location="src" />
+    <property name="lib.dir" location="lib" />
+    <property name="hudson.lib.dir" location="/qa/tools/opt/" />
+    <property name="jboss-test.jar" location="${hudson.lib.dir}/jboss-test.jar" />
+    <available file="${jboss-test.jar}" property="jboss-test.jar.present" />
+    <property name="junit.report.dir" location="test-report" />
 
-	<path id="jboss.test.classpath">
-		<pathelement path="${jboss.test.jar}" />
-	</path>
+    <property name="selsrv.dir" location="selenium-rc-server" />
+    <property name="node0" value="localhost" />
+    <property name="jboss.test.home" value="${env.JBOSS_TEST_HOME}" />
+    <property name="jboss.home" value="${env.JBOSS_HOME}" />
+    <property name="jboss.test.jar" value="lib/jboss-test.jar" />
+    <property name="jboss.portal.dir" value="${env.JBOSS_UNZIPED_DIR}" />
+    <property name="portal_archive" value="${env.JBOSS_ARCHIVE}" />
+    <property name="portal.instance" value="default" />
 
-	<path id="libraries.cp">
-		<fileset dir="${lib.dir}">
-			<include name="*.jar" />
-		</fileset>
+    <property name="test.suite" value="testng.xml" />
+    <property name="usecase.suite" value="end2end.xml" />
 
-	</path>
+    <path id="jboss.test.classpath">
+        <pathelement path="${jboss.test.jar}" />
+    </path>
 
-	<path id="test.cp">
-		<pathelement location="${test.build.dir}" />
-		<path refid="libraries.cp" />
-	</path>
+    <path id="libraries.cp">
+        <fileset dir="${lib.dir}">
+            <include name="*.jar" />
+        </fileset>
 
-	<taskdef name="testng" classpathref="libraries.cp" classname="org.testng.TestNGAntTask" />
-	
-<target name="init">
-		<echo message="Browser   : ${browser}" />
-		<echo message="Workspace : ${workspace}" />
-		<echo message="Deleting testng report directory"/>
-		<delete dir="${testng.output.dir}"/>
-	</target>
+    </path>
 
+    <path id="test.cp">
+        <pathelement location="${test.build.dir}" />
+        <path refid="libraries.cp" />
+    </path>
 
-	<target name="compile" depends="">
-		<echo message="Compiling testsuite" />
-		<mkdir dir="${test.build.dir}" />
-		<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" classpathref="libraries.cp" debug="on" />
-	</target>
+    <taskdef name="testng" classpathref="libraries.cp" classname="org.testng.TestNGAntTask" />
+    <taskdef name="config" classname="org.jboss.ant.taskdefs.server.ConfigManagerTask" uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader">
+        <classpath id="server.taskdef.classpath">
+            <path refid="jboss.test.classpath" />
+        </classpath>
+    </taskdef>
+    <taskdef name="start" classname="org.jboss.ant.taskdefs.server.StartServerTask" uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader">
+        <classpath refid="server.taskdef.classpath" />
+    </taskdef>
+    <taskdef name="stop" classname="org.jboss.ant.taskdefs.server.StopServerTask" uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader">
+        <classpath refid="server.taskdef.classpath" />
+    </taskdef>
 
-	<target name="run-src">
-		<echo message="Starting Selenium Remote Control" />
-		<java jar="${selsrv.dir}/selenium-server.jar" fork="true" spawn="true">
-			<arg value="-multiWindow" />
-			<arg value="-port" />
-			<arg value="44444" />
-			<arg value="-log" />
-			<arg value="selenium.log" />
-			<arg value="-userExtensions" />
-			<arg value="${selsrv.dir}/user-extensions.js" />
-		</java>
-	</target>
+    <target name="init">
+        <echo message="Browser   : ${browser}" />
+        <echo message="Screenshot : ${screenshot}" />
+        <echo message="Deleting testng report directory" />
+        <delete dir="${testng.output.dir}" />
+    </target>
 
-	<target name="stop-src">
-		<get taskname="selenium-shutdown" src="http://localhost:44444/selenium-server/driver/?cmd=shutDown" dest="result.txt" ignoreerrors="true" />
-		<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
-	</target>
 
-	<target name="copyApps">
-		<echo message="Copying userInterceptor portlet into the ${portal.instance} server"/>
-		<copy file="apps/userDetail-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war"/>
-	</target>
+    <target name="compile" depends="">
+        <echo message="Compiling testsuite" />
+        <mkdir dir="${test.build.dir}" />
+        <javac srcdir="${test.src.dir}" destdir="${test.build.dir}" classpathref="libraries.cp" debug="on" />
+	<copy file="${test.src.dir}/org/jboss/portal/test/selenium/locator.properties" todir="${test.build.dir}/org/jboss/portal/test/selenium/"/>
+    </target>
 
-	<target name="clean">
-		<echo message="Going to delete directory ${test.build.dir}" />
-		<delete dir="${test.build.dir}" />
-	</target>
+    <target name="run-src">
+        <echo message="Starting Selenium Remote Control" />
+        <java jar="${selsrv.dir}/selenium-server.jar" fork="true" spawn="true">
+            <arg value="-multiWindow" />
+            <arg value="-port" />
+            <arg value="44444" />
+            <arg value="-log" />
+            <arg value="selenium.log" />
+            <arg value="-debug" />
+            <arg value="-userExtensions" />
+            <arg value="${selsrv.dir}/user-extensions.js" />
+        </java>
+        <sleep seconds="20" />
+    </target>
 
-	<target name="cleanup">
-		<echo message="Cleaning up..." />
-		<antcall target="stop-src" />
+    <target name="stop-src">
+        <get taskname="selenium-shutdown" src="http://localhost:44444/selenium-server/driver/?cmd=shutDown" dest="result.txt" ignoreerrors="true" />
+        <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
+    </target>
 
-	</target>
+    <target name="copyApps">
+        <echo message="Copying userInterceptor portlet into the ${portal.instance} server" />
+        <copy file="apps/userDetail-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war" />
+    </target>
 
-	<target name="single-test" depends="init, compile, run-src">
+    <target name="clean">
+        <echo message="Going to delete directory ${test.build.dir}" />
+        <delete dir="${test.build.dir}" />
+    </target>
 
-		<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumTest" testname="org.jboss.portal.test.selenium.SingleTestCase">
-<!--			listeners="org.testng.reporters.JUnitXMLReporter"-->
-			<classfileset dir="${test.build.dir}"
-				includes="${testname}" />
-			<sysproperty key="browser" value="${browser}" />
-			<jvmarg value="-ea" />
-		</testng>
+    <server:config javaHome="${java.home}" jbossHome="${jboss.home}">
+        <server name="${portal.instance}" host="${node0}">
+			<!-- jvmarg value="${jpda.cmdline}" / -->
+            <jvmarg value="-Xmx512m" />
+            <jvmarg value="-XX:MaxPermSize=128m" />
+            <sysproperty key="java.endorsed.dirs" value="${jboss.home}/lib/endorsed" />
+        </server>
+    </server:config>
 
-	</target>
 
-	<target name="selenium-test" depends="init, compile, run-src">
+    <target name="cleanup">
+        <echo message="Cleaning up..." />
+        <antcall target="stop-src" />
 
-		<antcall target="copyApps" />
-		<echo message="Runing TestNG" />
-		<mkdir dir="test-output" />
-		<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}"
-			suitename="SeleniumSuite">
+    </target>
 
-			<xmlfileset dir="." includes="testng.xml" />
+    <target name="run-and-build" depends="init, compile, run-src">
+        <echo message="Starting portal instance : ${portal.instance}" />
+        <server:start name="${portal.instance}" />
 
-			<sysproperty key="browser" value="${browser}" />
-			<sysproperty key="workspace" value="${workspace}"/>
+        <echo message="Runing TestNG" />
+        <mkdir dir="test-output" />
+        <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="test-output" listeners="org.testng.reporters.JUnitXMLReporter" suitename="SeleniumSuite">
 
-			<jvmarg value="-ea" />
+            <xmlfileset dir="." includes="${testng.suite}" />
+            <sysproperty key="browser" value="${browser}" />
+            <sysproperty key="screenshot" value="${screenshot}" />
+            <sysproperty key="workspace" value="${workspace}" />
+            <sysproperty key="userCount" value="${userCount}" />
+            <sysproperty key="html-src" value="${html-src}" />
+        	<sysproperty key="output-dir" value="${testng.output.dir}" />
+            <jvmarg value="-ea" />
 
-		</testng>
-		<antcall target="cleanup" />
-	</target>
+        </testng>
+        <echo message="Stoping portal instance : ${portal.instance}" />
+        <server:stop name="${portal.instance}" />
+        <antcall target="cleanup" />
+    </target>
 
+    <target name="single-test" depends="init, compile, run-src, copyApps">
+        <echo message="Runing TestNG" />
+
+        <mkdir dir="test-output" />
+        <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener" suitename="SeleniumSingleTest" verbose="2">
+
+            <classfileset dir="${test.build.dir}" includes="${testname}" />
+            <sysproperty key="browser" value="${browser}" />
+            <sysproperty key="screenshot" value="${screenshot}" />
+            <sysproperty key="workspace" value="${workspace}" />
+            <sysproperty key="userCount" value="${userCount}" />
+            <sysproperty key="html-src" value="${html-src}" />
+        	<sysproperty key="output-dir" value="${testng.output.dir}" />
+            <jvmarg value="-ea" />
+        </testng>
+        <antcall target="cleanup" />
+
+    </target>
+
+    <target name="selenium-test" depends="init, compile, run-src, copyApps">
+        <echo message="Runing TestNG" />
+
+        <mkdir dir="test-output" />
+        <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
+
+            <xmlfileset dir="." includes="${test.suite}" />
+
+            <sysproperty key="browser" value="${browser}" />
+            <sysproperty key="screenshot" value="${screenshot}" />
+            <sysproperty key="workspace" value="${workspace}" />
+            <sysproperty key="userCount" value="${userCount}" />
+            <sysproperty key="html-src" value="${html-src}" />
+        	<sysproperty key="output-dir" value="${testng.output.dir}" />
+        	
+
+            <jvmarg value="-ea" />
+
+        </testng>
+        <antcall target="cleanup" />
+    </target>
+
+    <target name="selenium-usecase" depends="init, compile, run-src, copyApps">
+        <echo message="Runing TestNG" />
+
+        <mkdir dir="test-output" />
+        <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
+
+            <xmlfileset dir="." includes="${usecase.suite}" />
+
+            <sysproperty key="browser" value="${browser}" />
+            <sysproperty key="screenshot" value="${screenshot}" />
+            <sysproperty key="workspace" value="${workspace}" />
+            <sysproperty key="userCount" value="${userCount}" />
+            <sysproperty key="html-src" value="${html-src}" />
+        	<sysproperty key="output-dir" value="${testng.output.dir}" />
+            <jvmarg value="-ea" />
+
+        </testng>
+        <antcall target="cleanup" />
+    </target>
+
+    <target name="archive" >
+        <!--<touch file="touchme.txt"/>-->
+        <echo file="touchme.txt" message="pipik2"/>
+        <genkey alias="apache-group" storepass="secret" dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/>
+        <echo message=""/>
+    </target>
+
 </project>
 

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/end2end.xml (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/end2end.xml)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/end2end.xml	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/end2end.xml	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,14 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="SeleniumTest">
+
+  <test verbose="2" name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase" annotations="JDK">
+    <classes>
+      <class name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"/>
+    </classes>
+  </test>
+
+<listeners>
+<!--  	<listener class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
+	<listener class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>
+</listeners>
+</suite>

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/lib/jboss-test.jar (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/lib/jboss-test.jar)
===================================================================
(Binary files differ)

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/lib/selenium-java-client-driver.jar
===================================================================
(Binary files differ)

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/run.sh (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/run.sh)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/run.sh	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/run.sh	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+export HELPMODE=0
+
+#if [ ! -n "${1+x}" ]; then
+	#export	HELPMODE=1
+#elif [ $1 = "help" ]; then
+	#export	HELPMODE=1
+#fi
+
+if [ -z "$1" -o "$1" = "help"  ]; then
+	echo "Usage: "
+	echo " run.sh MODE FF_LOCATION [TESTCLASS_NAME]"
+	echo
+	echo "Description:"
+	echo " Command used to run selenium test of JBoss Portal. Enviroment variables JBOSS_HOME, JAVA_HOME must be set before running the script. JBoss portal must run on the same machine where the script is being run (\"http://localhost:8080/portal/\") ."
+	echo 
+	echo "FF_LOCATION - the location of firefox binary file (not the firefox running script - the binary is ussually located in \"/usr/lib*/firefox*/\" directory )"
+	echo
+	echo "MODE - one of available modes:"
+	echo " help : prints out this helpscreen"
+	echo " test : runnnig the selenium test suite defined in testng.xml"
+	echo " end2end : runnnig the selenium test suite defined in testng.xml"
+	echo " selenium : run the selenium server only (no tests are executed)"
+	echo " single : run single selenium testcase of specified class (TESTCLASS_NAME must be specified)"
+	echo
+	echo "TESTCLASS_NAME - the class specifiing single testcase (must be set when running \"single\" mode)"
+	echo
+	echo "Examples:"
+	echo " running the testsuite:"
+	echo " run.sh test /home/vrockai/opt/firefox3/firefox-bin"
+	echo
+	echo " running single testcase:"
+	echo " run.sh single /home/vrockai/opt/firefox3/firefox-bin org/jboss/portal/test/selenium/DashboardTestCase.class"
+else
+	if [ $1 != "help" ]; then
+		ant clean
+		echo "Action: $1"
+		echo "Firefox bin location: $2"
+		echo "Testclass name: $3"
+	fi
+	
+	if [ $1 = "test" ]; then
+		if [ -z "$2" -o ! -f "$2" ]; then
+			echo
+			echo "ERROR: Firefox location not set";
+			exit 0;
+		fi
+		ant -f build.xml copyApps
+		ant -f build.xml selenium-test -Dbrowser="*firefox $2" -Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true" -Dhtml-src="true"
+	elif [ $1 = "end2end" ]; then
+		if [ -z "$2" -o ! -f "$2" ]; then
+			echo
+			echo "ERROR: Firefox location not set";
+			exit 0;
+		fi
+		ant -f build.xml copyApps
+		ant -f build.xml selenium-usecase -Dbrowser="*firefox $2" -Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true" -Dhtml-src="true"
+	elif [ $1 = "perf" ]; then
+		if [ -z "$2" -o ! -f "$2" ]; then
+			echo
+			echo "ERROR: Firefox location not set";
+			exit 0;
+		fi
+		ant -f build.xml copyApps
+		ant -f build.xml selenium-test -Dbrowser="*firefox $2" -Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true" -Dhtml-src="true"
+	elif [ $1 = "selenium" ]; then	
+		ant -f build.xml run-src
+	elif [ $1 = "single" ]; then
+		if [ -z "$2" -o ! -f "$2" ]; then
+			echo
+			echo "ERROR: Firefox location not set";
+			exit 0;
+		fi
+		if [ -z "$3" ]; then
+			echo
+			echo "ERROR: Testclasss not set";
+			exit 0;
+		fi
+		ant -f build.xml single-test -Dbrowser="*firefox $2" -Dtestname="$3" -Dscreenshot="true" -Dhtml-src="true"
+	fi
+fi

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -11,206 +11,267 @@
 @Test(groups = { "cms_dashboard" }, enabled = true, description = "Dashboard issues test case.")
 public class DashboardTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String SEL_CONTENT_TYPE = "//select[contains(@id,'contentTypesForm:instanceId')]";
-	private static final String SUB_DEL_FROM_CENTER_REGION = "//input[contains(@id,'layoutForm:l_center')]";
-	private static final String SEL_CENTER_REGION = "//select[contains(@id,'layoutForm:selectMany_center')]";
-	private static final String SUB_ADDCENTER = "//input[contains(@id,'layoutForm:a_center')]";
-	private static final String SUB_ADDLEFT = "//input[contains(@id,'layoutForm:a_left')]";
-	private static final String LNK_CONFIGURE_DASHBOARD = "link=Configure dashboard";
-	private static final String LNK_DASHBOARD = "link=Dashboard";
-	private static final String SEL_PAGE = "//select[contains(@id,'pageNameSelector')]";
-	private static final String INP_PAGENAME = "//input[contains(@id,':pageName')]";
-	private static final String SUB_CREATEPAGE = "//form[contains(@id,'j_id3')]/input[@type='submit']";
-	private static final String SEL_LAYOUT = "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]";
-	private static final String SUB_LAYOUTSEL = "//form[contains(@id,'dashboardLayoutForm')]/input[@type='submit']";
-	private static final String SEL_THEME = "//select[contains(@id,'dashboardThemeForm:themeSelector')]";
-	private static final String SUB_THEMESEL = "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']";
+	public String casePfx = "dash.";
 
+	private final String SUB_LAYOUT_UPDATE = getProp(casePfx + "sub.layout.update", "//input[contains(@name,'dashboardLayoutForm:j_id12')]");
+	private final String SUB_PAGE_RENAME = getProp(casePfx + "sub.page.rename", "//form[contains(@id,'renameForm')]/input[@type='submit']");
+	private final String INP_PAGE_RENAME = getProp(casePfx + "inp.page.rename", "//input[contains(@id,'renameForm:newName')]");
+	private final String LINK_WEATHER_PORTLET = getProp(casePfx + "link.weather.portlet", "link=*WeatherPortlet*");
+	private final String LINK_PORTL2 = getProp(casePfx + "link.portl2", "link=*Who's online portlet*");
+	private final String LINK_PORTL1 = getProp(casePfx + "link.portl1", "link=*Welcome portlet*");
+	// private final String OPT_PORTL2 =
+	// getProp(casePfx+"opt.portl2","CurrentUsersPortletWindow");
+	private final String OPT_PORTL1 = getProp(casePfx + "opt.portl1", "JSPPortletWindow");
+	private final String SEL_CONTENT_TYPE = getProp(casePfx + "sel.content.type", "//select[contains(@id,'contentTypesForm:instanceId')]");
+	private final String SUB_DEL_FROM_CENTER_REGION = getProp(casePfx + "sub.del.from.center.region", "//input[contains(@id,'layoutForm:l_center')]");
+	private final String SUB_DOWN_CENTER_REGION = getProp(casePfx + "sub.down.center.region", "//input[contains(@id,'layoutForm:d_center')]");
+	private final String SUB_UP_CENTER_REGION = getProp(casePfx + "sub.up.center.region", "//input[contains(@id,'layoutForm:u_center')]");
+	private final String SEL_CENTER_REGION = getProp(casePfx + "sel.center.region", "//select[contains(@id,'layoutForm:selectMany_center')]");
+	private final String SUB_ADDCENTER = getProp(casePfx + "sub.addcenter", "//input[contains(@id,'layoutForm:a_center')]");
+	private final String SUB_ADDLEFT = getProp(casePfx + "sub.addleft", "//input[contains(@id,'layoutForm:a_left')]");
+	private final String LNK_CONFIGURE_DASHBOARD = getProp(casePfx + "lnk.configure.dashboard", "link=Configure dashboard");
+	private final String LNK_DASHBOARD = getProp(casePfx + "lnk.dashboard", "link=Dashboard");
+	private final String SEL_PAGE = getProp(casePfx + "sel.page", "//select[contains(@id,'pageNameSelector')]");
+	private final String INP_PAGENAME = getProp(casePfx + "inp.pagename", "//input[contains(@id,':pageName')]");
+	private final String SUB_CREATEPAGE = getProp(casePfx + "sub.createpage", "//form[contains(@id,'j_id3')]/input[@type='submit']");
+	private final String SEL_LAYOUT = getProp(casePfx + "sel.layout", "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]");
+
+	private final String SEL_THEME = getProp(casePfx + "sel.theme", "//select[contains(@id,'dashboardThemeForm:themeSelector')]");
+	private final String SUB_THEMESEL = getProp(casePfx + "sub.themesel", "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']");
+
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+
 	}
 
+	private void wait(int t) {
+		try {
+			Thread.sleep(t);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
 	@Test(enabled = true)
 	public void testCreatePage() {
 		selenium.click(LNK_DASHBOARD);
+
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
+
+		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		final String pageName = "DashTestPage";
+		selenium.type(INP_PAGENAME, pageName);
+
+		clickAndWait(SUB_CREATEPAGE);
+
+		selenium.click(LNK_DASHBOARD);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isElementPresent("link=" + pageName));
+		selenium.click("link=" + pageName);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent("Powered by JBoss Portal"));
+	}
+
+	@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
+	public void testRenamePage() {
+
+		// firstly create page
+
+		selenium.click(LNK_DASHBOARD);
+		wait(5000);
+
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.type(INP_PAGENAME, "DashTestPage");
-		
-		clickAndWait(SUB_CREATEPAGE);		
-		
+
+		final String pageName = "DashToRenamePage";
+		final String pageNameNew = "DashRenamedPage";
+		selenium.type(INP_PAGENAME, pageName);
+
+		clickAndWait(SUB_CREATEPAGE);
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isElementPresent("link=DashTestPage"));
-		selenium.click("link=DashTestPage");
+		Assert.assertTrue(selenium.isElementPresent("link=" + pageName));
+		selenium.click("link=" + pageName);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Powered by JBoss Portal"));
+
+		// then rename it
+		selenium.click(LNK_CONFIGURE_DASHBOARD);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selectIfNotSelected(SEL_PAGE, pageName);
+
+		selenium.type(INP_PAGE_RENAME, pageNameNew);
+		selenium.click(SUB_PAGE_RENAME);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
 	}
 
 	@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
 	public void testUpdateTheme() {
+		// selenium.setSpeed("10000");
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
 
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
 
-		for (String s: selenium.getSelectOptions(SEL_THEME))
-			System.out.println("LABEL!:"+s);
-		
 		selenium.select(SEL_THEME, "label=renaissance");
+
 		selenium.click(SUB_THEMESEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selenium.windowMaximize();
-		selenium.captureScreenshot("2x.jpg");
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
 
-		selenium.windowMaximize();		
-		selenium.captureScreenshot("2.jpg");
-		for (String s: selenium.getSelectOptions(SEL_THEME))
-			System.out.println("LABEL!:"+s);
 		Assert.assertEquals(selenium.getSelectedLabel(SEL_THEME), "renaissance", "Previously selected theme other then expected.");
 	}
 
 	@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
 	public void testUpdateLayout() {
+		// selenium.setSpeed("10000");
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
 		selenium.windowMaximize();
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
-		for (String s: selenium.getSelectOptions(SEL_LAYOUT))
-			System.out.println("LABEL!:"+s);
-		selenium.captureScreenshot("3x1.jpg");
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
+
 		selenium.select(SEL_LAYOUT, "label=generic");
-		selenium.captureScreenshot("3x2.jpg");
-		selenium.click(SUB_LAYOUTSEL);
-		selenium.captureScreenshot("3x3.jpg");
+
+		selenium.click(SUB_LAYOUT_UPDATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.captureScreenshot("3x4.jpg");
-		
-		selenium.captureScreenshot("3x.jpg");
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
-		
-		selenium.windowMaximize();
-		selenium.captureScreenshot("3.jpg");
-		for (String s: selenium.getSelectOptions(SEL_LAYOUT))
-			System.out.println("LABEL!:"+s);
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
+
 		Assert.assertEquals(selenium.getSelectedLabel(SEL_LAYOUT), "generic", "Previously selected layout other then expected.");
 	}
 
 	@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
 	public void testAddPortlet() {
-		//selenium.setSpeed("3000");
+		// selenium.setSpeed("10000");
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selenium.windowMaximize();
-		selenium.captureScreenshot("1x1.jpg");
-		
+
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
+		selenium.click(LINK_PORTL2);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.windowMaximize();
-		selenium.captureScreenshot("1x21.jpg");
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
-		selenium.click("link=Who's online portlet");
-		selenium.captureScreenshot("1x221.jpg");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.captureScreenshot("1x222.jpg");
 		waitForElement("portlet-editor-title");
-		//selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.windowMaximize();
-		selenium.captureScreenshot("1x3.jpg");
 		selenium.click(SUB_ADDCENTER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.windowMaximize();
-		selenium.captureScreenshot("1x4.jpg");
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=DashTestPage");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selenium.windowMaximize();
-		selenium.captureScreenshot("1.jpg");
-		
+
 		Assert.assertTrue(selenium.isTextPresent("Current users"));
 		Assert.assertTrue(selenium.isTextPresent("Among them: * logged-in"));
 		Assert.assertTrue(selenium.isTextPresent("[admin]"));
-		//selenium.setSpeed("0");
+		// selenium.setSpeed("0");
 	}
 
-	@Test(enabled = true, dependsOnMethods = { "testCreatePage","testAddPortlet" })
+	@Test(enabled = true, dependsOnMethods = { "testCreatePage", "testAddPortlet" })
 	public void testMovePortlet() {
 		final String pageName = "DashMovePage";
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
+
 		selenium.type(INP_PAGENAME, pageName);
 		selenium.click(SUB_CREATEPAGE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selectIfNotSelected(SEL_PAGE,pageName);
-		selenium.click("link=ExceptionPortletInstance");
+
+		selectIfNotSelected(SEL_PAGE, pageName);
+		selenium.click(LINK_PORTL1);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(SUB_ADDCENTER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selectIfNotSelected(SEL_PAGE,pageName);
-		selenium.click("link=Who's online portlet");
+
+		selectIfNotSelected(SEL_PAGE, pageName);
+		selenium.click(LINK_PORTL2);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(SUB_ADDCENTER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link="+pageName);
+		selenium.click("link=" + pageName);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertFalse(assertTextOrder("Current;Exception"));
-		Assert.assertTrue(assertTextOrder("Exception;Current"));
-		
+
+		Assert.assertFalse(assertTextOrder("Current;Greetings"));
+		Assert.assertTrue(assertTextOrder("Greetings;Current"));
+
 	}
-	
+
+	@Test(enabled = true, dependsOnMethods = { "testCreatePage", "testMovePortlet" })
+	public void testReorder() {
+		final String pageName = "DashMovePage";
+
+		selenium.click(LNK_DASHBOARD);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click(LNK_CONFIGURE_DASHBOARD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
+		selectIfNotSelected(SEL_PAGE, pageName);
+
+		selenium.addSelection(SEL_CENTER_REGION, OPT_PORTL1);
+		selenium.click(SUB_DOWN_CENTER_REGION);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click(LNK_DASHBOARD);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("link=" + pageName);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertFalse(assertTextOrder("Greetings;Current"));
+		Assert.assertTrue(assertTextOrder("Current;Greetings"));
+	}
+
 	@Test(enabled = true, dependsOnMethods = { "testAddPortlet" })
 	public void testDeletePortlet() {
 
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
 
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
 
 		selenium.addSelection(SEL_CENTER_REGION, "label=CurrentUsersPortletWindow");
 		selenium.click(SUB_DEL_FROM_CENTER_REGION);
@@ -231,8 +292,9 @@
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		selectIfNotSelected(SEL_PAGE,"DashTestPage");
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
+		selectIfNotSelected(SEL_PAGE, "DashTestPage");
 		selenium.select(SEL_CONTENT_TYPE, "label=widget/google");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Band Culinaria");
@@ -249,6 +311,7 @@
 	}
 
 	// http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143023
+	// https://jira.jboss.org/jira/browse/JBPORTAL-2177
 	@Test(enabled = true)
 	public void testBugResetPortletSetting() {
 		final String pageName = "page1";
@@ -260,7 +323,8 @@
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
 		selenium.type(INP_PAGENAME, pageName);
 		selenium.click(SUB_CREATEPAGE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -281,9 +345,9 @@
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selectIfNotSelected(SEL_PAGE,pageName);
+		selectIfNotSelected(SEL_PAGE, pageName);
 
-		selenium.click("Link=*Weather Portlet*");
+		selenium.click(LINK_WEATHER_PORTLET);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(SUB_ADDLEFT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -308,12 +372,13 @@
 		selenium.click(LNK_DASHBOARD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CONFIGURE_DASHBOARD);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		wait(5000);
 
-		selectIfNotSelected(SEL_PAGE,pageName);
+		selectIfNotSelected(SEL_PAGE, pageName);
 
-		selenium.type("renameForm:newName", pageNameNew);
-		selenium.click("renameForm:rename-button");
+		selenium.type(INP_PAGE_RENAME, pageNameNew);
+		selenium.click(SUB_PAGE_RENAME);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		// check the portlet again
@@ -324,14 +389,7 @@
 		selenium.click("link=" + pageNameNew);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertTrue(selenium.isTextPresent("Alexandria"), "Previously selected portlet settings were changes after renaming of portal page.");
-
+		Assert.assertTrue(selenium.isTextPresent("Alexandria"), "Previously selected portlet settings were changed after renaming of portal page.");
 	}
 
-	// TODO write an extension for checking of ordering of elements
-	@Test(enabled = false, dependsOnMethods = { "testCreatePage" })
-	public void testReorder() {
-
-	}
-
 }

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,242 @@
+package org.jboss.portal.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:vrockai at redhat.com">Viliam Rockai</a>
+ */
+ at Test(groups = {"end2end"}, enabled = true, description = "Creating of new portal with content.")
+public class EndToEndBeaPortlet extends JBossPortalSeleniumTestCase {
+
+
+	private static final String SUB_VIEW_PORTLETS = "//input[contains(@id,'definition-form:view-portlets')]";
+
+	private static final String SEL_CONS_TYPE = "//select[contains(@id,'definition-form:menu')]";
+
+	public static String casePfx = "e2e.wsrp.";
+	
+	private  final String ADR_HOME = getProp(casePfx+"adr.home","portal/auth/portal/default");
+	private  final String INP_CONSUMER_NAME = getProp(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
+	private  final String SUBMIT_REFRESH_CANCEL = getProp(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
+	private  final String SUBMIT_PROD_SAVE = getProp(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
+	private  final String SUBMIT_CONSDEL_CONF = getProp(casePfx+"submit.consdel.conf","//a[contains(@id,'confirm-delete-form:destroy-link')]");
+	
+	private  final String SUBMIT_CONS_REGVAL = getProp(casePfx+"submit.cons.regval","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+	private  final String SUBMIT_REFRESHFINAL = getProp(casePfx+"submit.refreshfinal","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+	
+	private  final String INPUT_CONS_REGVALUE = getProp(casePfx+"input.cons.regvalue","//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]");
+	private  final String SUBMIT_REFRESHSAVE = getProp(casePfx+"submit.refreshsave","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+	private  final String INPUT_CONSWSDL = getProp(casePfx+"input.conswsdl","//input[contains(@id,'edit-cons-form:wsdl')]");
+	private  final String INPUT_CACHEEXP = getProp(casePfx+"input.cacheexp","//input[contains(@id,'edit-cons-form:cache')]");
+	private  final String SUBMIT_ADDPROP_INIT = getProp(casePfx+"submit.addprop.init","//a[contains(@id,'producer-form:add-reg-prop')]");
+	private  final String SUBMIT_ADDPROP = getProp(casePfx+"submit.addprop","//a[contains(@id,'producer-form:add-reg-prop')]");
+	private  final String INPUT_PROPHINT = getProp(casePfx+"input.prophint","//input[contains(@id,'producer-form:reg-properties:0:hint')]");
+	private  final String INPUT_PROPLABEL = getProp(casePfx+"input.proplabel","//input[contains(@id,'producer-form:reg-properties:0:label')]");
+	private  final String INPUT_PROPNAME = getProp(casePfx+"input.propname","//input[contains(@id,'producer-form:reg-properties:0:name')]");
+	private  final String SUBMIT_CREATECONS = getProp(casePfx+"submit.createcons","//input[contains(@id,'createConsumer:createConsumerButton')]");
+	private  final String INPUT_CREATECONS = getProp(casePfx+"input.createcons","//input[contains(@id,'createConsumer:consumerName')]");
+	private  final String ID_LINK_PRODCONF = getProp(casePfx+"id.link.prodconf","//a[contains(@id,'cons-temp-form:producer-link')]");
+	private  final String ID_LINK_CONSCONF = getProp(casePfx+"id.link.consconf","//a[contains(@id,'producer-temp-form:consumersTab')]");
+	private  final String LINK_CONSUMER_HOME  =getProp(casePfx+"link.consumer.home","//a[contains(@id,'cons-temp-form1:list-cons-link')]");
+	
+	private  final String LINK_T_CONS_CON=getProp(casePfx+"link.t.cons.con","//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]");
+	private  final String LINK_T_CONS_REF=getProp(casePfx+"link.t.cons.ref","//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]");
+	private  final String LINK_T_CONS_ACT=getProp(casePfx+"link.t.cons.act","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+	private  final String LINK_T_CONS_DEA=getProp(casePfx+"link.t.cons.dea","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+	private  final String LINK_T_CONS_REG=getProp(casePfx+"link.t.cons.reg","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+	private  final String LINK_T_CONS_DER=getProp(casePfx+"link.t.cons.der","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+	private  final String LINK_T_CONS_DEL=getProp(casePfx+"link.t.cons.del","//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]");
+	
+	///
+	
+	public  final String SEL_PORTLET_TYPE = getProp(casePfx+"sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");
+    private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx+"sub.layout.add.center","//input[contains(@id,'layoutForm:a_center')]");
+    private final String INP_WINDOW_NAME = getProp(casePfx+"inp.window.name","//input[contains(@id,'windowForm:windowName')]");
+    private final String SUB_RENAME_PORTAL = getProp(casePfx+"sub.rename.portal","//input[contains(@id,'renameForm:rename')]");
+    private final String INP_RENAME_PORTAL = getProp(casePfx+"inp.rename.portal","//input[contains(@id,'renameForm:newName')]");
+    private final String SUB_DELETE_PORTAL_CONF = getProp(casePfx+"sub.delete.portal.conf","//input[contains(@id,'delete-view:confirm-form:delete')]");
+    private final String INP_SUBMIT_PAGECREATE = getProp(casePfx+"inp.submit.pagecreate","//input[contains(@id,'create-page-form:create-page')]");
+    private final String INP_PAGENAME = getProp(casePfx+"inp.pagename","//input[contains(@id,'create-page-form:pageName')]");
+    private final String INP_PORTALNAME = getProp(casePfx+"inp.portalname","//input[contains(@id,'create-portal-form:name')]");
+    private final String INP_SUBMIT_CREATEPORTAL = getProp(casePfx+"inp.submit.createportal","//input[contains(@id,'create-portal-form:create-portal')]");
+    private final String TAB_PORTALOBJ_ID = getProp(casePfx+"tab.portalobj.id","Link=Admin");
+    private final String LNK_PORTALS_ID = getProp(casePfx+"lnk.portals.id","link=*Portal Objects*");
+    private final String LNK_PORTAL_HOME = getProp(casePfx+"lnk.portal.home","//a[contains(@id,'obj-temp-form:object-link-0')]");
+    private final String TBL_PORTAL_ADMIN = getProp(casePfx+"tbl.portal.admin","//table[contains(@id,'obj-nav-form:portal-datatable')]");
+    private final String POR_TL_MAIN = getProp(casePfx+"por.tl.main","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+    private final String POR_TL_SECURITY = getProp(casePfx+"por.tl.security","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+    private final String POR_TL_PROPERTIES = getProp(casePfx+"por.tl.properties","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+    private final String POR_TL_THEME = getProp(casePfx+"por.tl.theme","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+    private final String POR_TL_RENAME = getProp(casePfx+"por.tl.rename","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+    private final String POR_TL_DELETE = getProp(casePfx+"por.tl.delete","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+    private final String POR_TL_MAKEDEF = getProp(casePfx+"por.tl.makedef","//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+    private final String TBL_PORTALPAGE_ADMIN = getProp(casePfx+"tbl.portalpage.admin","//table[contains(@id,'obj-nav-form:pages-datatable')]");
+    private final String PAG_TL_MAIN = getProp(casePfx+"pag.tl.main","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+    private final String PAG_TL_LAYOUT = getProp(casePfx+"pag.tl.layout","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+    private final String PAG_TL_SECURITY = getProp(casePfx+"pag.tl.security","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+    private final String PAG_TL_PROPERTIES = getProp(casePfx+"pag.tl.properties","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+    private final String PAG_TL_THEME = getProp(casePfx+"pag.tl.theme","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+    private final String PAG_TL_RENAME = getProp(casePfx+"pag.tl.rename","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+    private final String PAG_TL_DISPLAY = getProp(casePfx+"pag.tl.display","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+    private final String PAG_TL_DELETE = getProp(casePfx+"pag.tl.delete","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+    private final String PAG_TL_MAKEDEF = getProp(casePfx+"pag.tl.makedef","//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+
+    
+    /// def
+    
+	private static final String T_LINK_PREF = "//a[contains(@id,''def-list:portlet-pref-{0}'')]";
+	private static final String SUBMIT_CREATE_INST = "//input[contains(@name,'add_instance_form:j_id19')]";
+	private static final String INPUT_INSTANCE_NAME = "//input[contains(@id,'add_instance_form:instanceId')]";
+	private static final String T_LINK_CREATE = "//a[contains(@id,''def-list:create-instance-{0}'')]";
+	private static final String SUBMIT_PROVIDER_VIEW = "//input[contains(@id,'definition-form:view-portlets')]";
+	private static final String SELECT_PROVIDER = "//select[contains(@id,'definition-form:menu')]";
+	private static final String TABLE_PORTLET = "//form[contains(@id,'def-list')]/table";
+	private static final String LINK_NAME_ADMIN_PORT = "//a[contains(@id,'common-show-portlet-detail-form:field1:select')]";
+	private static final String LINK_ADMIN_PORT = "//a[contains(@id,'def-list:portlet-def-0')]";
+	private static final String LINK_ADMIN = "link=Admin";
+	private static final String LINK_TAB_PD = "//a[contains(@id,'admin-subtab-form:portlet-def-link')]";
+	private static final String LINK_PD_MAIN = "//a[contains(@id,'man-form:def-link')]";
+
+	public static String WSRP_CONSUMER_TABLE = "//table[contains(@id,':consumer-list-form:consumersList')]";
+	@BeforeMethod(groups = { "log" })
+	public void loginBeforeTest() {
+		logoutIfPossible();
+		login("admin", "admin");
+	}
+
+	@AfterMethod(groups = { "log" })
+	public void logoutAfterTest() {
+		//logout();
+	}
+	 
+	private String PORTLET = "";
+	
+	@Test(enabled = true, description = "Creating a standard BEA portlet.")
+	public void testEnd2EndBeaPortlet(){
+	
+		String consName = "BeaE2E";
+		String portalName = "default";
+		String pageName = "default";
+		String defName= "BEA: Hello World";
+		String  insName = "1BeaPor";
+				
+		createConsumer(consName);
+		createInstance(defName, consName, insName);
+		addPortlet(portalName, pageName, insName, "portlet");
+		
+		selenium.open(ADR_HOME);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
+		Assert.assertTrue(selenium.isTextPresent("Welcome to WebLogic Portal WSRP Demo."));
+		
+	}
+	
+	private void createConsumer(String consumerName){
+		selenium.open(ADR_HOME);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("link=WSRP");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		clickIfVisible(ID_LINK_CONSCONF);
+		
+		selenium.type(INPUT_CREATECONS, consumerName);
+		
+		selenium.click(SUBMIT_CREATECONS);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INPUT_CACHEEXP, "600");
+		
+		selenium.type(INPUT_CONSWSDL, "http://wsrp.bea.com:7001/producer/producer?WSDL");
+		selenium.click(SUBMIT_REFRESHSAVE);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent("Refresh failed (probably because the registration information was not valid)."));
+		Assert.assertTrue(selenium.isTextPresent("Missing value"));
+
+		selenium.type(INPUT_CONS_REGVALUE, "public");
+		selenium.click(SUBMIT_CONS_REGVAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent("Refresh was successful."));
+		selenium.click(SUBMIT_REFRESHFINAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent(consumerName));
+	}
+	
+	private void createInstance(String defName, String type, String insName){
+		selenium.open(ADR_HOME);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		clickIfVisible(LINK_ADMIN);
+		clickIfVisible(LINK_ADMIN);
+		clickIfVisible(LINK_TAB_PD);
+		clickIfVisible(LINK_PD_MAIN);
+		
+		selenium.select(SEL_CONS_TYPE, "label="+type);
+		selenium.click(SUB_VIEW_PORTLETS);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		int r = findTableRow(TABLE_PORTLET, defName, 0);
+		
+		selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.setSpeed("5555");
+		selenium.type(INPUT_INSTANCE_NAME, insName);
+		selenium.click(SUBMIT_CREATE_INST);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent(insName + " portlet details"));		
+	}
+	
+	private void addPortlet(String portalName, String pageName, String portletName, String type) {
+        selenium.open(ADR_HOME);
+        selenium.waitForPageToLoad(PAGE_LOAD);
+
+        selenium.click("link=Admin");
+        selenium.waitForPageToLoad(PAGE_LOAD);
+
+        clickIfVisible(TAB_PORTALOBJ_ID);
+        clickIfVisible(LNK_PORTALS_ID);
+        clickIfVisible(LNK_PORTAL_HOME);
+
+        int r = findTableRow(TBL_PORTAL_ADMIN, portalName, 0) - 1;
+        selenium.click(MessageFormat.format(POR_TL_MAIN, r));
+        selenium.waitForPageToLoad(PAGE_LOAD);
+
+        r = findTableRow(TBL_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+        // click on the page layout
+        selenium.click(MessageFormat.format(PAG_TL_LAYOUT, r));
+
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        
+        //hack
+        selenium.select(SEL_PORTLET_TYPE, "label=" + "cms");
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        
+        selenium.select(SEL_PORTLET_TYPE, "label=" + type);
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        
+        selenium.click("link=*"+portletName+"*");
+        selenium.waitForPageToLoad(PAGE_LOAD);
+
+        selenium.click(SUB_LAYOUT_ADD_CENTER);
+        selenium.waitForPageToLoad(PAGE_LOAD);
+        
+    }
+}

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -3,9 +3,7 @@
 import java.text.MessageFormat;
 
 import org.testng.Assert;
-import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -16,98 +14,110 @@
 @Test(groups = { "admin_ui" }, enabled = true)
 public class IdentityAdminTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String SUB_EDIT_PROF = "//input[contains(@id,'profile-form:submit')]";
-	private static final String SUB_EDIT_USER_EMAIL_CANCEL = "//input[contains(@id,'profile-form:cancel')]";
-	private static final String INP_EDIT_USER_EMAIL = "//input[contains(@id,'profile-form:email')]";
-	private static final String SUB_ROLE_SEARCH_USER = "//input[contains(@id,'search-user-form:search') and @type='submit']";
-	private static final String INP_ROLE_SEARCH_USER = "//input[contains(@id,'search-user-form:searchString')]";
-	private static final String SUB_EDIT_ROLE_SUBMIT = "//input[contains(@id,'edit-role-link:submit')]";
-	private static final String SUB_EDIT_ROLE_CANCEL = "//input[contains(@id,'edit-role-link:cancel')]";
-	private static final String INP_EDIT_ROLE_NAME = "//input[contains(@id,'edit-role-link:display-name')]";
-	private static final String SUB_PASS_CHANGE_SUBMIT = "//input[contains(@name,'change-pwd-form:j_id31')]";
-	private static final String SUB_PASS_CHANGE_CANCEL = "//input[contains(@id,'change-pwd-form:cancel')]";
-	private static final String INPUT_PASS_CHANGE_P2 = "//input[contains(@id,':change-pwd-form:passwordCheck')]";
-	private static final String INPUT_PASS_CHANGE_P1 = "//input[contains(@id,':change-pwd-form:password')]";
-	private static final String LINK_CHANGE_PASS = "//a[contains(@id,':profile-form:change-pwd-adm-link')]";
-	public static final String TABLE_USERLIST = "//table[contains(@id,'search-user-form1:userlist')]";
-	public static final String LINK_T_USRLIST_DEL = "//a[contains(@id,''search-user-form1:userlist:{0}:delete-user-link'')]";
-	public static final String LINK_T_USRLIST_ROLES = "//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]";
-	public static final String LINK_T_USRLIST_DIS = "//a[contains(@id,''search-user-form1:userlist:{0}:enable-user-link'')]";
-	public static final String LINK_T_USRLIST_EDIT = "//a[contains(@id,''search-user-form1:userlist:{0}:rename-link'')]";
-	
-	public static final String TABLE_ROLELIST = "//table[contains(@id,':_viewRoot:roles-form:userlist')]";
-	
-	public static final String LINK_T_ROLLIST_DEL = "//a[contains(@id,''roles-form:userlist:{0}:delete-role-link'')]";
-	public static final String LINK_T_ROLLIST_MEMBERS = "//a[contains(@id,''roles-form:userlist:{0}:view-role-link'')]";
-	public static final String LINK_T_ROLLIST_EDIT = "//a[contains(@id,''roles-form:userlist:{0}:edit-role-link'')]";
-	
-	public static final String TABLE_ROLEMEMBERS = "//table[contains(@id,'role-members-form:role-data-table')]"; 
-	
-	public static final String ID_SUBMIT_CONF_CREATE_USER = "//input[contains(@id,'confirm-form:admin')]";
-	public static final String ID_SUBMIT_DELETE_ROLE = "//input[contains(@id,'delete-role-form:confirm')]";
-	public static final String ID_SUBMIT_ROLE_CREATE = "//input[contains(@id,':_viewRoot:create-role-form:submit')]";
-	public static final String ID_INPUT_ROLEDISNAME = "//input[contains(@id,':_viewRoot:create-role-form:roledisplayname')]";
-	public static final String ID_INPUT_ROLENAME = "//input[contains(@id,':_viewRoot:create-role-form:rolename')]";
-	
-	public static final String ID_BUT_ROLE_CREATE = "//a[contains(@id, ':_viewRoot:create-role-form:create-role-link')]";
-	public static final String ID_BUT_SUBMIT_DEL_USER = "//input[contains(@id,'delete-user-form:submit')]";
-	public static final String ID_SUBMIT_ASSIGN_ROLE = "//input[contains(@id,'assign-roles-form:submit')]";
-	public static final String ID_SUBMIT_USER_ROLE = "//input[contains(@id,'register-role-form:submit')]";
-	public static final String ID_SUBMIT_CREATE_USER = "//input[contains(@id,'register-form:submit')]";
-	public static final String ID_INPUT_PASSWORD_CHK = "//input[contains(@id,'register-form:passwordCheck')]";
-	public static final String ID_INPUT_PASSWORD = "//input[contains(@id,'register-form:password')]";
-	public static final String ID_INPUT_USEREMAIL = "//input[contains(@id,'register-form:email')]";
-	public static final String ID_INPUT_USERNAME = "//input[contains(@id,'register-form:username')]";
-	public static final String ID_SUBMIT_SEARCH_USER = "//input[contains(@id,'search-user-form:search')]";
-	public static final String ID_INPUT_SEARCH_USER = "//input[contains(@id,'search-user-form:searchString')]";
-	public static final String LINK_SEARCH_USER = "//a[contains(@id,'user-form:search-user-link')]";
-	public static final String ID_LINK_USERTAB = "//a[contains(@id,'role-temp-form:manage-users')]";
-	public static final String ID_LINK_USERMAIN = "//a[contains(@id,'user-temp-form1:user-adm-link')]";
-	
-	public static final String ID_LINK_ROLETAB = "//a[contains(@id,'_viewRoot:user-temp-form:role-mgm-link')]";
-	
-	public static final String ID_LINK_ROLEMAIN = "//a[contains(@id, ':_viewRoot:role-temp-form1:role-admin-link')]";
-	public static final String LINK_USERMANG_MAIN = "//a[contains(@id,'user-temp-form1:assign-role-link')]";
-	public static final String LINK_USERMANG_MAIN2 = "//a[contains(@id,'user-temp-form1:user-mgm-link')]";
-	public static final String ID_LINK_CREATE_USER = "//a[contains(@id,':user-form:create-user-link')]";
 
-	public static final String ID_CHECK_ROLE = "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']";
-	
+	public String casePfx = "iden.man.";
 
+	private final String INP_USER_SEARCH_PREV = getProp(casePfx + "inp.user.search.prev", "//input[contains(@id,'search-user-form1:prev-page')]");
+	private final String INP_USER_SEARCH_NEXT = getProp(casePfx + "inp.user.search.next", "//input[contains(@id,'search-user-form1:next-page')]");
+
+	private final String SEL_SEARCHUSER_LIMIT = getProp(casePfx + "sel.searchuser.limit", "//select[contains(@id,'search-user-form:limit')]");
+	private final String SUB_EDIT_PROF = getProp(casePfx + "sub.edit.prof", "//input[contains(@id,'profile-form:submit')]");
+
+	private final String SUB_PAGIN_LEFT = getProp(casePfx + "sub.pagin.left", INP_USER_SEARCH_PREV);
+	private final String SUB_PAGIN_RIGHT = getProp(casePfx + "sub.pagin.right", INP_USER_SEARCH_NEXT);
+
+	private final String SUB_EDIT_USER_EMAIL_CANCEL = getProp(casePfx + "sub.edit.user.email.cancel", "//input[contains(@id,'profile-form:cancel')]");
+	private final String INP_EDIT_USER_EMAIL = getProp(casePfx + "inp.edit.user.email", "//input[contains(@id,'profile-form:email')]");
+	private final String SUB_ROLE_SEARCH_USER = getProp(casePfx + "sub.role.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+	private final String INP_ROLE_SEARCH_USER = getProp(casePfx + "inp.role.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+	private final String SUB_EDIT_ROLE_SUBMIT = getProp(casePfx + "sub.edit.role.submit", "//input[contains(@id,'edit-role-link:submit')]");
+	private final String SUB_EDIT_ROLE_CANCEL = getProp(casePfx + "sub.edit.role.cancel", "//input[contains(@id,'edit-role-link:cancel')]");
+	private final String INP_EDIT_ROLE_NAME = getProp(casePfx + "inp.edit.role.name", "//input[contains(@id,'edit-role-link:display-name')]");
+	private final String SUB_PASS_CHANGE_SUBMIT = getProp(casePfx + "sub.pass.change.submit", "//input[contains(@name,'change-pwd-form:j_id31')]");
+	private final String SUB_PASS_CHANGE_CANCEL = getProp(casePfx + "sub.pass.change.cancel", "//input[contains(@id,'change-pwd-form:cancel')]");
+	private final String INP_PASS_CHANGE_P2 = getProp(casePfx + "inp.pass.change.p2", "//input[contains(@id,':change-pwd-form:passwordCheck')]");
+	private final String INP_PASS_CHANGE_P1 = getProp(casePfx + "inp.pass.change.p1", "//input[contains(@id,':change-pwd-form:password')]");
+	private final String LNK_CHANGE_PASS = getProp(casePfx + "lnk.change.pass", "//a[contains(@id,':profile-form:change-pwd-adm-link')]");
+	public final String TBL_USERLIST = getProp(casePfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
+	public final String LNK_T_USRLIST_DEL = getProp(casePfx + "lnk.t.usrlist.del", "//a[contains(@id,''search-user-form1:userlist:{0}:delete-user-link'')]");
+	public final String LNK_T_USRLIST_ROLES = getProp(casePfx + "lnk.t.usrlist.roles", "//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]");
+	public final String LNK_T_USRLIST_DIS = getProp(casePfx + "lnk.t.usrlist.dis", "//a[contains(@id,''search-user-form1:userlist:{0}:enable-user-link'')]");
+	public final String LNK_T_USRLIST_EDIT = getProp(casePfx + "lnk.t.usrlist.edit", "//a[contains(@id,''search-user-form1:userlist:{0}:rename-link'')]");
+
+	public final String TBL_ROLELIST = getProp(casePfx + "tbl.rolelist", "//table[contains(@id,'roles-form:userlist')]");
+
+	public final String LNK_T_ROLLIST_DEL = getProp(casePfx + "lnk.t.rollist.del", "//a[contains(@id,''roles-form:userlist:{0}:delete-role-link'')]");
+	public final String LNK_T_ROLLIST_MEMBERS = getProp(casePfx + "lnk.t.rollist.members", "//a[contains(@id,''roles-form:userlist:{0}:view-role-link'')]");
+	public final String LNK_T_ROLLIST_EDIT = getProp(casePfx + "lnk.t.rollist.edit", "//a[contains(@id,''roles-form:userlist:{0}:edit-role-link'')]");
+
+	public final String TBL_ROLEMEMBERS = getProp(casePfx + "tbl.rolemembers", "//table[contains(@id,'role-members-form:role-data-table')]");
+
+	public final String SUB_CONF_CREATE_USER = getProp(casePfx + "sub.conf.create.user", "//input[contains(@id,'confirm-form:admin')]");
+	public final String SUB_DELETE_ROLE = getProp(casePfx + "sub.delete.role", "//input[contains(@id,'delete-role-form:confirm')]");
+	public final String SUB_ROLE_CREATE = getProp(casePfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
+	public final String INP_ROLEDISNAME = getProp(casePfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
+	public final String INP_ROLENAME = getProp(casePfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
+
+	public final String LNK_ROLE_CREATE = getProp(casePfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
+	public final String SUB_DEL_USER = getProp(casePfx + "sub.del.user", "//input[contains(@id,'delete-user-form:submit')]");
+	public final String SUB_ASSIGN_ROLE = getProp(casePfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
+	public final String SUB_USER_ROLE = getProp(casePfx + "sub.user.role", "//input[contains(@id,'register-role-form:submit')]");
+	public final String SUB_CREATE_USER = getProp(casePfx + "sub.create.user", "//input[contains(@id,'register-form:submit')]");
+	public final String INP_PASSWORD_CHK = getProp(casePfx + "inp.password.chk", "//input[contains(@id,'register-form:passwordCheck')]");
+	public final String INP_PASSWORD = getProp(casePfx + "inp.password", "//input[contains(@id,'register-form:password')]");
+	public final String INP_USEREMAIL = getProp(casePfx + "inp.useremail", "//input[contains(@id,'register-form:email')]");
+	public final String INP_USERNAME = getProp(casePfx + "inp.username", "//input[contains(@id,'register-form:username')]");
+	public final String SUB_SEARCH_USER = getProp(casePfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+	public final String INP_SEARCH_USER = getProp(casePfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+	public final String LNK_SEARCH_USER = getProp(casePfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
+	public final String LNK_USERTAB = getProp(casePfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
+	public final String LNK_USERMAIN = getProp(casePfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
+
+	public final String LNK_ROLETAB = getProp(casePfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
+
+	public final String LNK_ROLEMAIN = getProp(casePfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
+	public final String LNK_USERMANG_MAIN = getProp(casePfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
+	public final String LNK_USERMANG_MAIN2 = getProp(casePfx + "lnk.usermang.main2", "//a[contains(@id,'user-temp-form1:user-mgm-link')]");
+	public final String LNK_CREATE_USER = getProp(casePfx + "lnk.create.user", "//a[contains(@id,':user-form:create-user-link')]");
+
+	public final String CHK_ROLE = getProp(casePfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
+
+	public final long SEARCH_TIMEOUT = 10000;
+
 	private String butDelUsr_id(String userName) {
-		String table = TABLE_USERLIST;
+		String table = TBL_USERLIST;
 		int r = findTableRow(table, userName, 0);
-		return MessageFormat.format(LINK_T_USRLIST_DEL, r - 1);
+		return MessageFormat.format(LNK_T_USRLIST_DEL, r - 1);
 	}
 
 	private String butUsrRol_id(String userName) {
-		String table = TABLE_USERLIST;
+		String table = TBL_USERLIST;
 		int r = findTableRow(table, userName, 0);
-		return MessageFormat.format(LINK_T_USRLIST_ROLES, r - 1);
+		return MessageFormat.format(LNK_T_USRLIST_ROLES, r - 1);
 	}
 
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logoutIfPossible();
-	}
 
-/*
- 	// For this mode to be functional, the user which is logged in must be "admin" after each test
-	@BeforeClass(groups = { "single" })
-	public void loginBefore() {
-		login("admin", "admin");
 	}
 
-	@AfterClass(groups = { "single" })
-	public void logoutAfter() {
-		logout();
-	}
-*/
+	/*
+	 * // For this mode to be functional, the user which is logged in must be
+	 * "admin" after each test
+	 * 
+	 * @BeforeClass(groups = { "single" }) public void loginBefore() {
+	 * login("admin", "admin"); }
+	 * 
+	 * @AfterClass(groups = { "single" }) public void logoutAfter() { logout();
+	 * }
+	 */
+
 	@Test(enabled = true, description = "Creation of new user.")
 	public void testCreateUser() {
 		createUser("tempUser", "tempPassword", "tempUser at redhat.com");
@@ -129,360 +139,367 @@
 		createRole(role, "tempRoleDisplay");
 		deleteRole(role);
 	}
-	
+
 	@Test(enabled = true, description = "Creating and deteling a user.")
 	public void testDeleteUser() {
 		createUser("deleteMe", "deleterPass", "disableMe at redhat.com");
 		deleteUser("deleteMe", "disableMe at redhat.com");
 	}
-	
+
 	@Test(enabled = true, description = "Creating and disabling a user.")
 	public void testDisableUser() {
-		createUser("disableMe", "disablePass", "disableMe at redhat.com");
-		
+		final String userName = "disableMe";
+		final String userPass = "disablePass";
+		final String userMail = "disableMe at redhat.com";
+
+		createUser(userName, userPass, userMail);
+
 		logout();
-		login("disableMe", "disablePass");
+		login(userName, userPass);
 		logout();
-		login("admin","admin");
-		
-		searchUser("disableMe", "disableMe at redhat.com");
-		int r = findTableRow(TABLE_USERLIST, "disableMe", 0);
-		
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_DIS, r - 1 ));
-		
+		login("admin", "admin");
+
+		searchUser(userName, userMail);
+		int r = findTableRow(TBL_USERLIST, userName, 0);
+
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_DIS, r - 1));
+
 		logout();
-		
-		//trying to log in with disabled account
+
+		// trying to log in with disabled account
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		selenium.click(LINK_LOGIN);
 		selenium.selectFrame(FRAME_LOGIN_CONTENT);
-		
+
 		try {
 			Thread.sleep(2000);
 		} catch (InterruptedException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-		
-		selenium.type(INPUT_USERNAME, "disableMe");
-		selenium.type(INPUT_PASSWORD, "disablePass");
+
+		selenium.type(INPUT_USERNAME, userName);
+		selenium.type(INPUT_PASSWORD, userPass);
 		selenium.click(SUBMIT_LOGIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent("Your account is disabled"));
+		Assert.assertTrue(selenium.isTextPresent("Your account is disabled"), "Message telling that account is disabled is other then expected or missing.");
 
 		// we should be unable to login with disabled account
 		// logging as user to end the test correctly
-		
-		login("admin","admin");
-		
-		deleteUser("disableMe", "disableMe at redhat.com");
+
+		login("admin", "admin");
+
+		deleteUser(userName, userMail);
 	}
-	
-	@Test(enabled = true, dependsOnMethods = {"testDisableUser"},description = "Enabling disabled user.")
+
+	@Test(enabled = true, dependsOnMethods = { "testDisableUser" }, description = "Enabling disabled user.")
 	public void testEnableUser() {
-		createUser("enableMe", "enableMe", "enableMe at redhat.com");
-		searchUser("enableMe", "enableMe at redhat.com");
-		
-		int r = findTableRow(TABLE_USERLIST, "Enable", 5);
-		Assert.assertTrue(r<0,"No user should be disabled.");
-		r = findTableRow(TABLE_USERLIST, "enableMe", 0);
-		
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_DIS, r - 1 ));
+		final String userName = "enableMe";
+		final String userPass = "enableMe";
+		final String userMail = "enableMe at redhat.com";
+		createUser(userName, userPass, userMail);
+		searchUser(userName, userMail);
+
+		int r = findTableRow(TBL_USERLIST, "Enable", 5);
+		Assert.assertTrue(r < 0, "No user should be disabled.");
+		r = findTableRow(TBL_USERLIST, userName, 0);
+
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_DIS, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		searchUser("enableMe", "enableMe at redhat.com");
-		r = findTableRow(TABLE_USERLIST, "Enable", 5);
-		Assert.assertFalse(r<0,"One user should have been disabled.");
 
-		r = findTableRow(TABLE_USERLIST, "enableMe", 0);
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_DIS, r - 1 ));
+		searchUser(userName, userMail);
+		r = findTableRow(TBL_USERLIST, "Enable", 5);
+		Assert.assertFalse(r < 0, "One user should have been disabled.");
+
+		r = findTableRow(TBL_USERLIST, userName, 0);
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_DIS, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		searchUser("enableMe", "enableMe at redhat.com");
-		r = findTableRow(TABLE_USERLIST, "Enable", 5);
-		Assert.assertTrue(r<0,"No user should be disabled.");
-		
-		deleteUser("enableMe", "enableMe at redhat.com");
+
+		searchUser(userName, userMail);
+		r = findTableRow(TBL_USERLIST, "Enable", 5);
+		Assert.assertTrue(r < 0, "No user should be disabled.");
+
+		deleteUser(userName, userMail);
 	}
-	
+
 	@Test(enabled = true, description = "Editing a user.")
 	public void testEditUser() {
-		createUser("editMe", "editPass", "editMe at redhat.com");
-		
+		final String userName = "editMe";
+		final String userPass = "editPass";
+		final String userMail = "editMe at redhat.com";
+
+		createUser(userName, userPass, userMail);
+
 		// canceling the edit form
-		searchUser("editMe", "editMe at redhat.com");
-		
-		int r = findTableRow(TABLE_USERLIST, "editMe", 0);
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_EDIT, r - 1));
+		searchUser(userName, userMail);
+
+		int r = findTableRow(TBL_USERLIST, userName, 0);
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_EDIT, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.type(INP_EDIT_USER_EMAIL, "editMe2 at redhat.com");
 		selenium.click(SUB_EDIT_USER_EMAIL_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent("editMe at redhat.com"));
-		
+		Assert.assertTrue(selenium.isTextPresent(userMail), "User not visible after cancelling editing.");
+
 		// filling out the edit page
-		searchUser("editMe", "editMe at redhat.com");
-		
-		r = findTableRow(TABLE_USERLIST, "editMe", 0);
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_EDIT, r - 1));
-		selenium.waitForPageToLoad(PAGE_LOAD);	
-		
+		searchUser(userName, userMail);
+
+		r = findTableRow(TBL_USERLIST, userName, 0);
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_EDIT, r - 1));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
 		selenium.type(INP_EDIT_USER_EMAIL, "editMe2 at redhat.com");
 		/*
-		selenium.select("profile-form:timezone", "label=(GMT -12:00 hours) Eniwetok, Kwajalein");
-		selenium.select("profile-form:theme", "label=portal.industrial");
-		selenium.select("profile-form:locale", "label=Albanian");
-		selenium.type("profile-form:givenname", "Edit");
-		selenium.type("profile-form:lastname", "Meme");
-		selenium.type("profile-form:location", "Editoland");
-		selenium.type("profile-form:skype", "editor");
-		selenium.type("profile-form:icq", "112113114");
-		selenium.type("profile-form:aim", "83838495");
-		selenium.type("profile-form:msnm", "u8u8i9o0");
-		selenium.type("profile-form:yim", "99384875");
-		selenium.type("profile-form:xmmp", "10309128");
-		selenium.type("profile-form:homepage", "http://www.edit.com");
-		selenium.type("profile-form:occupation", "editor");
-		selenium.type("profile-form:interests", "editing");
-		selenium.type("profile-form:signature", "----\n\ni like to edit");
-		selenium.type("profile-form:extra", "me edit good");
-		*/
+		 * selenium.select("profile-form:timezone",
+		 * "label=(GMT -12:00 hours) Eniwetok, Kwajalein");
+		 * selenium.select("profile-form:theme", "label=portal.industrial");
+		 * selenium.select("profile-form:locale", "label=Albanian");
+		 * selenium.type("profile-form:givenname", "Edit");
+		 * selenium.type("profile-form:lastname", "Meme");
+		 * selenium.type("profile-form:location", "Editoland");
+		 * selenium.type("profile-form:skype", "editor");
+		 * selenium.type("profile-form:icq", "112113114");
+		 * selenium.type("profile-form:aim", "83838495");
+		 * selenium.type("profile-form:msnm", "u8u8i9o0");
+		 * selenium.type("profile-form:yim", "99384875");
+		 * selenium.type("profile-form:xmmp", "10309128");
+		 * selenium.type("profile-form:homepage", "http://www.edit.com");
+		 * selenium.type("profile-form:occupation", "editor");
+		 * selenium.type("profile-form:interests", "editing");
+		 * selenium.type("profile-form:signature", "----\n\ni like to edit");
+		 * selenium.type("profile-form:extra", "me edit good");
+		 */
 		selenium.click(SUB_EDIT_PROF);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent("editMe2 at redhat.com"));
-		Assert.assertTrue(selenium.isTextPresent("Edit"));
-		
-		deleteUser("editMe", "editMe2 at redhat.com");
-		
+		Assert.assertTrue(selenium.isTextPresent("editMe2 at redhat.com"), "Edited e-mail adress not visible.");
+
+		deleteUser(userName, "editMe2 at redhat.com");
+
 	}
-	
+
 	@Test(enabled = true, description = "Editing a user - changing of password.")
 	public void testEditUserChangePassword() {
-		createUser("changePass", "changePassPass", "changePass at redhat.com");
-		
+		final String userName = "changePass";
+		final String userPass = "changePassPass";
+		final String userPass2 = "changePass2";
+		final String userMail = "changePass at redhat.com";
+
+		createUser(userName, userPass, userMail);
+
 		logout();
-		login("changePass","changePassPass");
+		login(userName, userPass);
 		logout();
-		login("admin","admin");
-		
-		/*
-		 *  Canceling of change at the first approach
-		 */
-		
-		searchUser("changePass", "changePass at redhat.com");
-		
-		
-		int r = findTableRow(TABLE_USERLIST, "changePass", 0);
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_EDIT, r - 1));
+		login("admin", "admin");
+
+		// Canceling of change at the first approach
+
+		searchUser(userName, userMail);
+
+		int r = findTableRow(TBL_USERLIST, userName, 0);
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_EDIT, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click(LINK_CHANGE_PASS);
+		selenium.click(LNK_CHANGE_PASS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.type(INPUT_PASS_CHANGE_P1, "changePass2");
-		selenium.type(INPUT_PASS_CHANGE_P2, "changePass2");
+		selenium.type(INP_PASS_CHANGE_P1, userPass2);
+		selenium.type(INP_PASS_CHANGE_P2, userPass2);
 		selenium.click(SUB_PASS_CHANGE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertFalse(selenium.isTextPresent("Password has been updated."));
-		
+
+		Assert.assertFalse(selenium.isTextPresent("Password has been updated."), "Message telling that password has changed appeared after cancel.");
+
 		logout();
-		login("changePass","changePassPass");
+		login(userName, userPass);
 		logout();
-		login("admin","admin");
-		
-		/*
-		 *  In the second approach really change the password
-		 */
-		
-		searchUser("changePass", "changePass at redhat.com");
-		
-		r = findTableRow(TABLE_USERLIST, "changePass", 0);
-		selenium.click(MessageFormat.format(LINK_T_USRLIST_EDIT, r - 1));
+		login("admin", "admin");
+
+		// In the second approach really change the password
+
+		searchUser(userName, userMail);
+
+		r = findTableRow(TBL_USERLIST, userName, 0);
+		selenium.click(MessageFormat.format(LNK_T_USRLIST_EDIT, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click(LINK_CHANGE_PASS);
+		selenium.click(LNK_CHANGE_PASS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.type(INPUT_PASS_CHANGE_P1, "changePass2");
-		selenium.type(INPUT_PASS_CHANGE_P2, "changePass2");
+		selenium.type(INP_PASS_CHANGE_P1, userPass2);
+		selenium.type(INP_PASS_CHANGE_P2, userPass2);
 		selenium.click(SUB_PASS_CHANGE_SUBMIT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertTrue(selenium.isTextPresent("Password has been updated."));
-		
+
+		Assert.assertTrue(selenium.isTextPresent("Password has been updated."), "Message telling that password has changed other then expected or missing.");
+
 		logout();
-		login("changePass","changePass2");
+		login(userName, userPass2);
 		logout();
-		login("admin","admin");
-		
-		deleteUser("changePass","changePass at redhat.com");
+		login("admin", "admin");
+
+		deleteUser(userName, userMail);
 	}
-	
+
 	@Test(enabled = true, description = "Managing members of role.")
 	public void testRoleMembers() {
-		createRole("membersRole", "membersRoleDisplay");
-		createUser("newRoleMember" , "newRoleMember", "newRoleMem at redhatqa.com");
-		assignRole("newRoleMember", "newRoleMem at redhatqa.com", "membersRole", "membersRoleDisplay");
-		
+		final String roleName = "membersRole";
+		final String roleDisplayName = "membersRoleDisplay";
+		final String userName = "newRoleMember";
+		final String userMail = "newRoleMem at redhatqa.com";
+		final String invalidMember = "newRoleNonMember";
+
+		createRole(roleName, roleDisplayName);
+		createUser(userName, userName, userMail);
+		assignRole(userName, userMail, roleName, roleDisplayName);
+
 		clickUntilMembers();
-		clickIfVisible(ID_LINK_ROLETAB);
-		clickIfVisible(ID_LINK_ROLEMAIN);
-		
-		int r = findTableRow(TABLE_ROLELIST, "membersRole", 0);
-		selenium.click(MessageFormat.format(LINK_T_ROLLIST_MEMBERS, r-1));
+		clickIfVisible(LNK_ROLETAB);
+		clickIfVisible(LNK_ROLEMAIN);
+
+		int r = findTableRow(TBL_ROLELIST, roleName, 0);
+		selenium.click(MessageFormat.format(LNK_T_ROLLIST_MEMBERS, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		//search for the real member of current role
-		selenium.type(INP_ROLE_SEARCH_USER, "newRoleMember");
+
+		// search for the real member of current role
+		selenium.type(INP_ROLE_SEARCH_USER, userName);
 		selenium.click(SUB_ROLE_SEARCH_USER);
 		waitFor(10000);
-		
-		r = findTableRow(TABLE_ROLEMEMBERS, "newRoleMember", 0);
-		Assert.assertTrue(r>0, "Assigned member not found in the role members table.");
-		
-		//search for the non-member user of current role
-		selenium.type(INP_ROLE_SEARCH_USER, "newRoleNonMember");
+
+		r = findTableRow(TBL_ROLEMEMBERS, userName, 0);
+		Assert.assertTrue(r > 0, "Assigned member not found in the role members table.");
+
+		// search for the non-member user of current role
+		selenium.type(INP_ROLE_SEARCH_USER, invalidMember);
 		selenium.click(SUB_ROLE_SEARCH_USER);
 		waitFor(10000);
-		
-		Assert.assertFalse(selenium.isElementPresent(TABLE_ROLEMEMBERS), "Not assigned member found in the role members table.");
-		
-		deleteRole("membersRole");
-		deleteUser("newRoleMember" ,  "newRoleMem at redhatqa.com");
+
+		Assert.assertFalse(selenium.isElementPresent(TBL_ROLEMEMBERS), "Not assigned member found in the role members table.");
+
+		deleteRole(roleName);
+		deleteUser(userName, userMail);
 	}
-	
+
 	@Test(enabled = true, description = "Creation of new role.")
 	public void testRoleEdit() {
-		
-		createRole("editRole", "editRoleDisplay");
-		
+		final String roleName = "editRole";
+		final String roleDisplayName = "editRoleDisplay";
+		final String roleDisplayNameEditet = "editedRoleDisplay";
+
+		createRole(roleName, roleDisplayName);
+
 		clickUntilMembers();
-		clickIfVisible(ID_LINK_ROLETAB);
-		clickIfVisible(ID_LINK_ROLEMAIN);
-		
-		int r = findTableRow(TABLE_ROLELIST, "editRoleDisplay", 1);
-		Assert.assertTrue(r>=0,"Renamed display name found in table");
-		
-		r = findTableRow(TABLE_ROLELIST, "editedRoleDisplay", 1);
-		Assert.assertFalse(r>=0,"Not created role display name found in table");
-				
-		//canceling of renaming of displayname for the first time
-		r = findTableRow(TABLE_ROLELIST, "editRole", 0);
-		
-		selenium.click(MessageFormat.format(LINK_T_ROLLIST_EDIT, r -1));
+		clickIfVisible(LNK_ROLETAB);
+		clickIfVisible(LNK_ROLEMAIN);
+
+		int r = findTableRow(TBL_ROLELIST, roleDisplayName, 1);
+		Assert.assertTrue(r >= 0, "Renamed display name found in table");
+
+		r = findTableRow(TBL_ROLELIST, roleDisplayNameEditet, 1);
+		Assert.assertFalse(r >= 0, "Not created role display name found in table");
+
+		// canceling of renaming of displayname for the first time
+		r = findTableRow(TBL_ROLELIST, roleName, 0);
+
+		selenium.click(MessageFormat.format(LNK_T_ROLLIST_EDIT, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selenium.type(INP_EDIT_ROLE_NAME, "editedRoleDisplay");
+
+		selenium.type(INP_EDIT_ROLE_NAME, roleDisplayNameEditet);
 		selenium.click(SUB_EDIT_ROLE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		r = findTableRow(TABLE_ROLELIST, "editRoleDisplay", 1);
-		Assert.assertTrue(r>=0,"Renamed display name found in table");
-		
-		r = findTableRow(TABLE_ROLELIST, "editedRoleDisplay", 1);
-		Assert.assertFalse(r>=0,"Not created role display name found in table");
-		
+
+		r = findTableRow(TBL_ROLELIST, roleDisplayName, 1);
+		Assert.assertTrue(r >= 0, "Renamed display name found in table");
+
+		r = findTableRow(TBL_ROLELIST, roleDisplayNameEditet, 1);
+		Assert.assertFalse(r >= 0, "Not created role display name found in table");
+
 		// real renaming
-		r = findTableRow(TABLE_ROLELIST, "editRole", 0);
-		selenium.click(MessageFormat.format(LINK_T_ROLLIST_EDIT, r-1));
+		r = findTableRow(TBL_ROLELIST, roleName, 0);
+		selenium.click(MessageFormat.format(LNK_T_ROLLIST_EDIT, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		selenium.type(INP_EDIT_ROLE_NAME, "editedRoleDisplay");
+
+		selenium.type(INP_EDIT_ROLE_NAME, roleDisplayNameEditet);
 		selenium.click(SUB_EDIT_ROLE_SUBMIT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		r = findTableRow(TABLE_ROLELIST, "editRoleDisplay", 1);
-		Assert.assertFalse(r>=0,"Renamed display name found in table");
-		
-		r = findTableRow(TABLE_ROLELIST, "editedRoleDisplay", 1);
-		Assert.assertTrue(r>=0,"New role display name not found in table");
-		
-		deleteRole("editRole");
+
+		r = findTableRow(TBL_ROLELIST, roleDisplayName, 1);
+		Assert.assertFalse(r >= 0, "Renamed display name found in table");
+
+		r = findTableRow(TBL_ROLELIST, roleDisplayNameEditet, 1);
+		Assert.assertTrue(r >= 0, "New role display name not found in table");
+
+		deleteRole(roleName);
 	}
-	
-	@Test(enabled= false, description = "Altering the number of rows in user search")
-	public void testSearchUserCount()	{
-		
-		for(int i=0; i< 95; i++){
-			createUser("man"+i+"us", "man"+i+"pas", "man"+i+"us"+"@redhatqa.com");
-		}		
-		
-		searchSimple("man","10");
-		Assert.assertEquals(countTableRows(TABLE_USERLIST)-1,10,"Wrong number of row in user table #1.");
-		
-		searchSimple("man","50");
-		Assert.assertEquals(countTableRows(TABLE_USERLIST)-1,50,"Wrong number of row in user table #2.");
-		selenium.click("search-user-form1:next-page");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertEquals(countTableRows(TABLE_USERLIST)-1,45,"Wrong number of row in user table #3.");
-		selenium.click("search-user-form1:prev-page");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		searchSimple("man","100");
-		Assert.assertEquals(countTableRows(TABLE_USERLIST)-1,95,"Wrong number of row in user table #4.");
-		/*
-		for(int i=0; i< 95; i++){
-			deleteUser("man"+i+"us", "man"+i+"us"+"@redhatqa.com");
+
+	@Test(enabled = false)
+	public void testManyUsers() {
+		for (int i = 0; i < 25; i++) {
+			createUser("user0" + i + "", "useruser", "user0" + i + "" + "@portal.com");
 		}
-		*/
-				
 	}
-	
-	private void searchSimple(String name, String count){
-		selenium.open("/portal/");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Members");
-		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_USERTAB);
-		clickIfVisible(ID_LINK_USERMAIN);
-		clickIfVisible(LINK_USERMANG_MAIN);
+	@Test(enabled = true, description = "Altering the number of rows in user search")
+	public void testSearchUserCount() {
 
-		selenium.click(LINK_SEARCH_USER);
+		for (int i = 0; i < 95; i++) {
+			createUser("man" + i + "us", "man" + i + "pas", "man" + i + "us" + "@redhatqa.com");
+		}
+
+		searchSimple("man", "10");
+		Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 10, "Wrong number of row in user table #1.");
+
+		searchSimple("man", "50");
+		Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in user table #2.");
+		selenium.click(INP_USER_SEARCH_NEXT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 45, "Wrong number of row in user table #3.");
+		selenium.click(INP_USER_SEARCH_PREV);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in user table #2.");
+		
+		searchSimple("man", "100");
+		//selenium.setSpeed("60000");
+		Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 95, "Wrong number of row in user table #4.");
+		//selenium.setSpeed("0");
+		/*
+		 * for(int i=0; i< 95; i++){ deleteUser("man"+i+"us",
+		 * "man"+i+"us"+"@redhatqa.com"); }
+		 */
 
-		selenium.type(ID_INPUT_SEARCH_USER, name);
-		selenium.select("search-user-form:limit", "label="+count);
-		selenium.click(ID_SUBMIT_SEARCH_USER);
-		//selenium.waitForPageToLoad(PAGE_LOAD);
-		waitBlock();
 	}
-	
 
 	@Test(enabled = true, dependsOnMethods = { "testCreateUser", "testCreateRole" }, description = "Assigning of the role to the user.")
 	public void testAssignRole2User() {
 		String user = "tempUser";
 		String userMail = "tempUser at redhat.com";
 		String role = "tempRole";
-		String roleDisplay = "tempRoleDisplay";
+		final String roleDisplayName = "tempRoleDisplay";
+		final String userPass = "tempPassword";
 
-		createUser(user, "tempPassword", userMail);
-		createRole(role, "tempRoleDisplay");
-		assignRole(user, userMail, role, roleDisplay);
+		createUser(user, userPass, userMail);
+		createRole(role, roleDisplayName);
+		assignRole(user, userMail, role, roleDisplayName);
 
-		deassignRole(user, userMail, role, roleDisplay);
+		deassignRole(user, userMail, role, roleDisplayName);
 		deleteRole(role);
 		deleteUser(user, userMail);
 
 	}
 
-	void assignRole(String user, String email, String role, String roleDisplay) {
+	void assignRole(String userName, String userMail, String roleName, String roleDisplayName) {
 
-		searchUser(user, email);
-		selenium.click(butUsrRol_id(user));
+		searchUser(userName, userMail);
+		selenium.click(butUsrRol_id(userName));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
+		Assert.assertTrue(selenium.isTextPresent(roleDisplayName), "Role display name: " + roleDisplayName + " not found on the page.");
 
-		final String CHECK_ROLE = MessageFormat.format(ID_CHECK_ROLE, role);
+		final String CHECK_ROLE = MessageFormat.format(CHK_ROLE, roleName);
 		selenium.click(CHECK_ROLE);
 
-		selenium.click(ID_SUBMIT_ASSIGN_ROLE);
+		selenium.click(SUB_ASSIGN_ROLE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		searchUser(user, email);
+		searchUser(userName, userMail);
 
-		selenium.click(butUsrRol_id(user));
+		selenium.click(butUsrRol_id(userName));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isChecked(CHECK_ROLE), "The role wasn't correctly assigned.");
 
@@ -497,10 +514,10 @@
 		Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
 
 		// check the tempRole check box
-		final String CHECK_ROLE = MessageFormat.format(ID_CHECK_ROLE, role);
+		final String CHECK_ROLE = MessageFormat.format(CHK_ROLE, role);
 		selenium.click(CHECK_ROLE);
 
-		selenium.click(ID_SUBMIT_ASSIGN_ROLE);
+		selenium.click(SUB_ASSIGN_ROLE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		searchUser(user, email);
 
@@ -511,7 +528,7 @@
 
 	}
 
-	void createUser(String username, String password, String email) {
+	void createUser(String userName, String userPass, String userMail) {
 		selenium.open("/portal/auth/portal/default");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
@@ -521,30 +538,30 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_USERTAB);
-		clickIfVisible(ID_LINK_USERMAIN);
-		selenium.click(ID_LINK_CREATE_USER);
+		clickIfVisible(LNK_USERTAB);
+		clickIfVisible(LNK_USERMAIN);
+		selenium.click(LNK_CREATE_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertTrue(selenium.isTextPresent("Username *"), "Label for username input is wrong or missing.");
-		selenium.type(ID_INPUT_USERNAME, username);
+		selenium.type(INP_USERNAME, userName);
 		Assert.assertTrue(selenium.isTextPresent("E-Mail *"), "Label for e-mail input is wrong or missing.");
-		selenium.type(ID_INPUT_USEREMAIL, email);
+		selenium.type(INP_USEREMAIL, userMail);
 		Assert.assertTrue(selenium.isTextPresent("Password *"), "Label for password input is wrong or missing.");
-		selenium.type(ID_INPUT_PASSWORD, password);
+		selenium.type(INP_PASSWORD, userPass);
 		Assert.assertTrue(selenium.isTextPresent("Confirm Password *"), "Label for password confirm input is wrong or missing.");
-		selenium.type(ID_INPUT_PASSWORD_CHK, password);
+		selenium.type(INP_PASSWORD_CHK, userPass);
 
-		selenium.click(ID_SUBMIT_CREATE_USER);
+		selenium.click(SUB_CREATE_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertFalse(selenium.isTextPresent("This username is already taken. tempUser"), "User already exists.");
 
-		selenium.click(ID_SUBMIT_USER_ROLE);
+		selenium.click(SUB_USER_ROLE);
 
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Confirmation"), "Confirmation screen is missing or corrupted.");
-		selenium.click(ID_SUBMIT_CONF_CREATE_USER);
+		selenium.click(SUB_CONF_CREATE_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("User created"), "User was not created (\"User created\" text missing).");
 
@@ -559,24 +576,22 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_USERMAIN);
+		clickIfVisible(LNK_USERMAIN);
 
-		selenium.click(ID_LINK_CREATE_USER);
+		selenium.click(LNK_CREATE_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.type(ID_INPUT_USERNAME, username);
-		selenium.type(ID_INPUT_USEREMAIL, email);
-		selenium.type(ID_INPUT_PASSWORD, password);
-		selenium.type(ID_INPUT_PASSWORD_CHK, password);
-		selenium.click(ID_SUBMIT_CREATE_USER);
+		selenium.type(INP_USERNAME, username);
+		selenium.type(INP_USEREMAIL, email);
+		selenium.type(INP_PASSWORD, password);
+		selenium.type(INP_PASSWORD_CHK, password);
+		selenium.click(SUB_CREATE_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert
-				.assertTrue(selenium.isTextPresent("This username is already taken."),
-						"No user was overwritten, current username wasn't already taken.");
+		Assert.assertTrue(selenium.isTextPresent("This username is already taken."), "No user was overwritten, current username wasn't already taken.");
 
 	}
 
-	void searchUser(String username, String email) {
+	void searchUser(String userName, String userMail) {
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Admin");
@@ -584,21 +599,44 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_USERTAB);
-		clickIfVisible(ID_LINK_USERMAIN);
-		clickIfVisible(LINK_USERMANG_MAIN);
+		clickIfVisible(LNK_USERTAB);
+		clickIfVisible(LNK_USERMAIN);
+		clickIfVisible(LNK_USERMANG_MAIN);
 
-		selenium.click(LINK_SEARCH_USER);
+		selenium.click(LNK_SEARCH_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.type(ID_INPUT_SEARCH_USER, username);
-		selenium.click(ID_SUBMIT_SEARCH_USER);
-		//selenium.waitForPageToLoad(PAGE_LOAD);
-		waitBlock();
-		Assert.assertTrue(selenium.isTextPresent(username), "Username was not found.");
-		Assert.assertTrue(selenium.isTextPresent(email), "User email adress was not found.");
+		selenium.type(INP_SEARCH_USER, userName);
+
+		selenium.click(SUB_SEARCH_USER);
+		waitFor(SEARCH_TIMEOUT);
+		if (!selenium.isTextPresent(userName) && !selenium.isTextPresent(userMail))
+			paginate(userName, userMail);
+
+		Assert.assertTrue(selenium.isTextPresent(userName), "Username was not found.");
+		Assert.assertTrue(selenium.isTextPresent(userMail), "User email adress was not found.");
 	}
 
+	private void paginate(String userName, String userMail) {
+
+		while (selenium.isElementPresent(SUB_PAGIN_RIGHT)) {
+			selenium.click(SUB_PAGIN_RIGHT);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+
+			if (selenium.isTextPresent(userName) && selenium.isTextPresent(userMail))
+				return;
+		}
+
+		while (selenium.isElementPresent(SUB_PAGIN_LEFT)) {
+			selenium.click(SUB_PAGIN_RIGHT);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+
+			if (selenium.isTextPresent(userName) && selenium.isTextPresent(userMail))
+				return;
+		}
+
+	}
+
 	private void deleteUser(String username, String email) {
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -607,30 +645,30 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_USERTAB);
+		clickIfVisible(LNK_USERTAB);
 		// user home page
-		clickIfVisible(ID_LINK_USERMAIN);
-		clickIfVisible(LINK_USERMANG_MAIN);
-		clickIfVisible(LINK_USERMANG_MAIN2);
+		clickIfVisible(LNK_USERMAIN);
+		clickIfVisible(LNK_USERMANG_MAIN);
+		clickIfVisible(LNK_USERMANG_MAIN2);
 
-		selenium.click(LINK_SEARCH_USER);
+		selenium.click(LNK_SEARCH_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.type(ID_INPUT_SEARCH_USER, username);
-		selenium.click(ID_SUBMIT_SEARCH_USER);
-		//selenium.waitForPageToLoad(PAGE_LOAD);
-		waitBlock();
+		selenium.type(INP_SEARCH_USER, username);
+		selenium.click(SUB_SEARCH_USER);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		waitFor(SEARCH_TIMEOUT);
 		Assert.assertTrue(selenium.isTextPresent(username), "Username was not found.");
 		Assert.assertTrue(selenium.isTextPresent(email), "User e-mail adress was not found.");
 
 		selenium.click(butDelUsr_id(username));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click(ID_BUT_SUBMIT_DEL_USER);
+		selenium.click(SUB_DEL_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("User deleted"), "user was not deleted (\"User deleted\" text missing).");
 	}
 
-	private void clickUntilMembers(){
+	private void clickUntilMembers() {
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Admin");
@@ -638,7 +676,7 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 	}
-	
+
 	private void createRole(String roleName, String roleDisplayName) {
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -647,19 +685,19 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_ROLETAB);
-		clickIfVisible(ID_LINK_ROLEMAIN);
+		clickIfVisible(LNK_ROLETAB);
+		clickIfVisible(LNK_ROLEMAIN);
 
-		Assert.assertTrue(selenium.isElementPresent(ID_BUT_ROLE_CREATE), "Button for role creating has wrong id or doesn't exist.");
-		Assert.assertEquals(selenium.getText(ID_BUT_ROLE_CREATE), "Create role", "Button for role creating has wrong label.");
-		selenium.click(ID_BUT_ROLE_CREATE);
+		Assert.assertTrue(selenium.isElementPresent(LNK_ROLE_CREATE), "Button for role creating has wrong id or doesn't exist.");
+		Assert.assertEquals(selenium.getText(LNK_ROLE_CREATE), "Create role", "Button for role creating has wrong label.");
+		selenium.click(LNK_ROLE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertTrue(selenium.isTextPresent("Role"), "Label for role name not present or incorrect.");
-		selenium.type(ID_INPUT_ROLENAME, roleName);
+		selenium.type(INP_ROLENAME, roleName);
 		Assert.assertTrue(selenium.isTextPresent("Display name"), "Label for display role name not present or incorrect.");
-		selenium.type(ID_INPUT_ROLEDISNAME, roleDisplayName);
-		selenium.click(ID_SUBMIT_ROLE_CREATE);
+		selenium.type(INP_ROLEDISNAME, roleDisplayName);
+		selenium.click(SUB_ROLE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertTrue(selenium.isTextPresent(roleName), "Name of newly created role is missing.");
@@ -674,31 +712,45 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_ROLETAB);
-		clickIfVisible(ID_LINK_ROLEMAIN);
+		clickIfVisible(LNK_ROLETAB);
+		clickIfVisible(LNK_ROLEMAIN);
 
 		Assert.assertTrue(selenium.isTextPresent(roleName), "Role name is missing");
 
-		int r = findTableRow(TABLE_ROLELIST, roleName, 0);
-		selenium.click(MessageFormat.format(LINK_T_ROLLIST_DEL, r-1));
+		int r = findTableRow(TBL_ROLELIST, roleName, 0);
+		selenium.click(MessageFormat.format(LNK_T_ROLLIST_DEL, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent("Warning! You are about to delete the role '" + roleName+"'"),
+		Assert.assertTrue(selenium.isTextPresent("Warning! You are about to delete the role '" + roleName + "'"),
 				"Confirmation text for role deletion missing missing.");
-		selenium.click(ID_SUBMIT_DELETE_ROLE);
+		selenium.click(SUB_DELETE_ROLE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 	}
-	
-	protected void waitBlock(){
-		try {
-			Thread.sleep(2000);
-		} catch (InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+
+	private void searchSimple(String name, String count) {
+		selenium.open("/portal/");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("link=Members");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(LNK_USERTAB);
+		clickIfVisible(LNK_USERMAIN);
+		clickIfVisible(LNK_USERMANG_MAIN);
+
+		selenium.click(LNK_SEARCH_USER);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.select(SEL_SEARCHUSER_LIMIT, "label=" + count);
+		//waitFor(SEARCH_TIMEOUT);
+		selenium.type(INP_SEARCH_USER, name);
+		selenium.click(SUB_SEARCH_USER);
 		
+		waitFor(SEARCH_TIMEOUT);
+
 	}
 
 }

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,5 +1,9 @@
 package org.jboss.portal.test.selenium;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -11,28 +15,44 @@
  * @author <a href="mailto:vrockai at redhat.com">Viliam Rockai</a>
  */
 public class JBossPortalSeleniumTestCase {
-	public static final String LINK_LOGOUT = "link=Logout";
-	public static final String SUBMIT_LOGIN = "login";
-	public static final String ADDR_PORTAL = "/portal/";
-	public static final String FRAME_LOGIN_CONTENT = "login-content";
-	public static final String LINK_LOGIN = "link=Login";
-	public static final String INPUT_PASSWORD = "j_password";
-	public static final String INPUT_USERNAME = "j_username";
+
+	private String casePfx = "portal.";
+
+	static {
+		try {
+			props = getProperties();
+		} catch (Exception e) {
+			// TODO: handle exception
+		}
+	}
+	
+	public final String LINK_LOGOUT = getProp(casePfx + "link.logout", "link=Logout");
+	public final String SUBMIT_LOGIN = getProp(casePfx + "submit.login", "login");
+	public final String ADDR_PORTAL = getProp(casePfx + "addr.portal", "/portal/");
+	public final String FRAME_LOGIN_CONTENT = getProp(casePfx + "frame.login.content", "login-content");
+	public final String LINK_LOGIN = getProp(casePfx + "link.login", "link=Login");
+	public final String INPUT_PASSWORD = getProp(casePfx + "input.password", "j_password");
+	public final String INPUT_USERNAME = getProp(casePfx + "input.username", "j_username");
+
+	protected static Properties props;
 	protected Selenium selenium;
 
 	// Generic timeout in miliseconds
-	protected static final String PAGE_LOAD = "900000";
+	protected static final String PAGE_LOAD = "2400000";
 
 	// Element timeout in seconds
-	protected static final int ELEM_TIMEOUT = 120;
+	protected static final int ELEM_TIMEOUT = 220;
 
 	@BeforeClass
 	public void setupChromeForLogin() throws Exception {
-
+	
 		String browser = System.getProperty("browser");
 
 		selenium = new DefaultSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
+
+		JBossSeleniumTestListener.selenium = selenium;
 		selenium.start();
+		selenium.setTimeout(PAGE_LOAD);
 	}
 
 	@AfterClass
@@ -40,40 +60,46 @@
 		selenium.stop();
 	}
 
-	protected void clickIfVisible(String id) {
+	private static Properties getProperties() throws IOException {
+		ClassLoader cl = ClassLoader.getSystemClassLoader();
+		InputStream is = cl.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
+		Properties props = new Properties();
+		props.load(is);
+		if (props == null){
+			is = JBossPortalSeleniumTestCase.class.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
+			props.load(is);
+		}
+		if (props == null){
+	//		System.out.println("still null");
+		}
+		
+		return props;
+	}
 
-		if (selenium.isElementPresent(id)) {
-			selenium.click(id);
+	protected String getProp(String prop, String subst) {
+		
+		if (subst == null || "".equals(subst)) {
+			subst = "Locator not set";
+		}
 
-			selenium.waitForPageToLoad(PAGE_LOAD);
+		if (props == null) {
+	//		System.out.println("props null");
+			return subst;
+		} else {
+//			System.out.println("! props null");
+			return props.getProperty(prop) != null ? props.getProperty(prop) : subst;
 		}
 	}
 
-	protected void clickIfVisible(String id, String awaited) {
+	protected void clickIfVisible(String id) {
 
 		if (selenium.isElementPresent(id)) {
 			selenium.click(id);
+
 			selenium.waitForPageToLoad(PAGE_LOAD);
 		}
-		Assert.assertTrue(selenium.isTextPresent(awaited));
 	}
 
-	@Deprecated
-	protected boolean findLink(String id) {
-		for (String link : selenium.getAllLinks()) {
-			if (link.equals(id)) {
-				return true;
-			}
-		}
-		for (String link : selenium.getAllFields()) {
-			if (link.equals(id)) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
 	protected int findTableRow(String tableLocation, String searchName, int searchCol) {
 		return Integer.valueOf(selenium.getEval("selenium.findTableRow(\"" + tableLocation + "\",'" + searchName + "'," + searchCol + ")"));
 	}
@@ -100,8 +126,9 @@
 					}
 				}
 
-				if (isAvailable)
+				if (isAvailable) {
 					break;
+				}
 			} catch (Exception e) {
 			}
 			waitFor(1000);
@@ -145,32 +172,48 @@
 	protected void waitForElement(String locator) {
 		for (int second = 0;; second++) {
 			if (second >= ELEM_TIMEOUT) {
-				selenium.captureScreenshot("err.jpg");
 				Assert.fail("Element " + locator + " not found.");
 			}
 			try {
-				if (selenium.isElementPresent(locator))
+				if (selenium.isElementPresent(locator)) {
 					break;
+				}
 			} catch (Exception e) {
 			}
 			waitFor(1000);
 		}
 	}
 
+	protected void waitForElement(String locatorElem, String locatorLink, long timeToWait, long n) {
+		for (int i = 0;; i++) {
+			if (i >= n) {
+				Assert.fail("Element " + locatorElem + " not found.");
+			}
+			try {
+				if (selenium.isElementPresent(locatorElem)) {
+					break;
+				}
+			} catch (Exception e) {
+			}
+			waitFor(1000);
+		}
+	}
+
 	public void waitForText(String text) {
 		for (int second = 0;; second++) {
 			if (second >= ELEM_TIMEOUT) {
 				Assert.fail("Text '" + text + "' not found.");
 			}
 			try {
-				if (selenium.isTextPresent(text))
+				if (selenium.isTextPresent(text)) {
 					break;
+				}
 			} catch (Exception e) {
 			}
-			waitFor(1000);
+			waitFor(100);
 		}
 	}
-	
+
 	protected void login(String username, String password) {
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,172 @@
+package org.jboss.portal.test.selenium;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.SeleniumException;
+
+public class JBossSelenium extends DefaultSelenium {
+
+	protected static  String PAGE_LOAD= "500000";
+	protected static int count;
+	
+	@Override
+	public void click(String locator) {
+		try {
+			try {
+			super.click(locator);
+			}
+			catch (SeleniumException e){
+				
+				String name = "E_";
+				Pattern methodname = Pattern.compile("^org.jboss.portal.test.selenium\\S+test\\S+\\(\\S+\\)");
+				for(int i=0;i<e.getStackTrace().length;i++){
+					String input = e.getStackTrace()[i].toString();
+					Matcher match = methodname.matcher(input);
+					if (match.matches()){
+						input = input.replace("org.jboss.portal.test.selenium","");
+						input = input.replaceAll("\\(.*\\)","");
+						name += input;
+					}
+				}
+				name += "."+count;
+				try {
+					PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name+".html")));
+					out.println(getHtmlSource());
+					out.close();
+				} catch (IOException e1) {
+					e1.printStackTrace();
+				}	
+				try {
+					windowMaximize();
+					captureScreenshot(name + ".jpg");
+					} catch (SeleniumException e2) {
+						e2.printStackTrace();
+					}
+				count++;
+				
+				throw new SeleniumException(e);
+			}
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	@Override
+	public void open(String locator) {
+		try {
+		super.open(locator);
+		}
+		catch (SeleniumException e){
+			try {
+				PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+				out.println(getHtmlSource());
+				out.close();
+			} catch (IOException e1) {
+				e1.printStackTrace();
+			}
+			windowMaximize();
+			captureScreenshot("shot"+ count +".jpg");
+			count++;
+			throw new SeleniumException(e);
+		}
+	}
+	
+	@Override
+	public boolean isElementPresent(String locator){
+		try {
+		return super.isElementPresent(locator);
+		}
+		catch (SeleniumException e){
+			try {
+				PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+				out.println(getHtmlSource());
+				out.close();
+			} catch (IOException e1) {
+				e1.printStackTrace();
+			}
+			windowMaximize();
+			captureScreenshot("shot"+ count +".jpg");
+			count++;
+			throw new SeleniumException(e);
+		}
+	}
+	
+	
+	
+	public JBossSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL, String timeout) {
+		super(serverHost, serverPort, browserStartCommand, browserURL);
+		PAGE_LOAD = timeout;
+	}
+	
+	public JBossSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL) {
+		super(serverHost, serverPort, browserStartCommand, browserURL);
+	}
+
+	protected void clickAndWait(String locator) {
+		click(locator);
+		waitForPageToLoad(PAGE_LOAD);
+	}
+
+	protected void clickAndWait(String locator, String timeout) {
+		click(locator);
+		waitForPageToLoad(timeout);
+	}
+
+	protected void clickAndWaitIfVisible(String id) {
+
+		if (isElementPresent(id)) {
+			click(id);
+
+			waitForPageToLoad(PAGE_LOAD);
+		}
+	}
+	
+	public void clickIfVisible(String id) {
+		
+		if (isElementPresent(id)){
+			click(id);
+
+			waitForPageToLoad(PAGE_LOAD);
+		}
+	}
+	protected boolean findLink(String id) {
+		for (String link : getAllLinks()) {
+			if (link.equals(id)) {
+				return true;
+			}
+		}
+		for (String link : getAllFields()) {
+			if (link.equals(id)) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	protected int findTableRow(String tableLocation, String searchName, int searchCol) {
+		return Integer.valueOf(getEval("selenium.findTableRow(\"" + tableLocation + "\",'" + searchName + "'," + searchCol + ")"));
+	}
+
+	protected int countTableRows(String tableLocation) {
+		return Integer.valueOf(getEval("selenium.countTableRows(\"" + tableLocation + "\")"));
+	}
+	
+	protected void waitFor(long time){
+		try {
+			Thread.sleep(2000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,64 @@
+package org.jboss.portal.test.selenium;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
+import com.thoughtworks.selenium.Selenium;
+import com.thoughtworks.selenium.SeleniumException;
+
+public class JBossSeleniumTestListener extends TestListenerAdapter {
+
+	protected static Selenium selenium;
+	protected static int count;
+	protected static boolean screenshot = false;
+	protected static boolean htmlSource = false;
+	protected static String outputDir = "";
+
+	static {
+		String ss = System.getProperty("screenshot");
+		if ("true".equals(ss)) {
+			screenshot = true;
+		}
+
+		String sh = System.getProperty("html-src");
+		if ("true".equals(sh)) {
+			htmlSource = true;
+		}
+		
+		String so = System.getProperty("output-dir");
+		if (so != null) {
+			outputDir = so;
+		}
+	}
+
+	@Override
+	public void onTestFailure(ITestResult tr) {
+
+		String name = outputDir +"/"+ "F_" + tr.getName() + "-" + count;
+
+		if (htmlSource) {
+			try {
+				PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name + ".html")));
+				out.println(selenium.getHtmlSource());
+				out.close();
+			} catch (IOException e1) {
+				e1.printStackTrace();
+			}
+		}
+		if (screenshot) {
+			try {
+				selenium.windowMaximize();
+				selenium.captureScreenshot(name + ".jpg");
+			} catch (SeleniumException e2) {
+				e2.printStackTrace();
+			}
+		}
+		count++;
+	}
+
+}

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -9,24 +9,21 @@
 
 @Test(groups = { "portlet_user_creation" }, enabled = true)
 public class PortletUserCreationTestCase extends JBossPortalSeleniumTestCase {
-	private static final String SUBMIT_CREATE_CONF = "//input[contains(@id,'confirm-form:user')]";
-	public static final String SUBMIT_CREATE_CONF_EDIT = "//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]";
+	
+	public String casePfx = "user.crea.port.";
+	
+    private  final String SUBMIT_CREATE_CONF = getProp(casePfx+"submit.create.conf","//input[contains(@id,'confirm-form:user')]");
+    public  final String SUBMIT_CREATE_CONF_EDIT = getProp(casePfx+"submit.create.conf.edit","//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]");
+    private  final String SUBMIT_CREATE_USER = getProp(casePfx+"submit.create.user","//input[contains(@id,'register-form:submit')]");
+    private  final String SUBMIT_CREATE_USER_CANCEL = getProp(casePfx+"submit.create.user.cancel","//input[contains(@id,'register-form:cancel')]");
+    private  final String INPUT_USERPASSWDCONF = getProp(casePfx+"input.userpasswdconf","//input[contains(@id,'register-form:passwordCheckv");
+    private  final String INPUT_USERPASSWD = getProp(casePfx+"input.userpasswd","//input[contains(@id,'register-form:password')]");
+    private  final String INPUT_USERMAIL = getProp(casePfx+"input.usermail","//input[contains(@id,'register-form:email')]");
+    private  final String INPUT_USERNAME = getProp(casePfx+"input.username","//input[contains(@id,'register-form:username')]");
+    private  final String LINK_CREATE_USER = getProp(casePfx+"link.create.user","//a[contains(@id,'create-account-form:register')]");
+    private  final String TAB_WELCOME = getProp(casePfx+"tab.welcome","//a[contains(@id,'register-temp-form:start-link')]");
 
-	private static final String SUBMIT_CREATE_USER = "//input[contains(@id,'register-form:submit')]";
-	private static final String SUBMIT_CREATE_USER_CANCEL = "//input[contains(@id,'register-form:cancel')]";
 
-	private static final String INPUT_USERPASSWDCONF = "//input[contains(@id,'register-form:passwordCheckv";
-
-	private static final String INPUT_USERPASSWD = "//input[contains(@id,'register-form:password')]";
-
-	private static final String INPUT_USERMAIL = "//input[contains(@id,'register-form:email')]";
-
-	private static final String INPUT_USERNAME = "//input[contains(@id,'register-form:username')]";
-
-	private static final String LINK_CREATE_USER = "//a[contains(@id,'create-account-form:register')]";
-
-	private static final String TAB_WELCOME = "//a[contains(@id,'register-temp-form:start-link')]";
-
 	@Test(enabled = true, description = "Simple user creation.")
 	public void userCreationTest() {
 		selenium.open("/portal");

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,8 +1,6 @@
 package org.jboss.portal.test.selenium;
 
-import java.text.DateFormat;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Vector;
 
@@ -14,6 +12,9 @@
 @Test(groups = { "cms_user_interceptor" }, enabled = true, description = "Checking the log of logging of users.")
 public class UserInterceptorPortletTestCase extends JBossPortalSeleniumTestCase {
 
+	private static final String LNK_USER_DETAILS = "link=UsersDetailPage";
+	private static final String DIV_LOGINFO = "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div";
+
 	@Test(enabled = true, description = "Checking the logging dates for user.")
 	public void testTestUserLogger() throws ParseException {
 
@@ -26,7 +27,6 @@
 	}
 
 	private int dateDiff(String name, String passwd, int ind) throws ParseException {
-		DateFormat df = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy");
 		Vector<String> vs;
 		String logInfo;
 
@@ -34,25 +34,25 @@
 		logout();
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=UsersDetailPage");
+		selenium.click(LNK_USER_DETAILS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		logInfo = selenium.getText("//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
+		logInfo = selenium.getText(DIV_LOGINFO);
 
 		vs = parseUserInterceptorString(logInfo);
 
-		Date d1 = new Date(Long.valueOf(vs.get(ind)));//df.parse(vs.get(ind));
+		Date d1 = new Date(Long.valueOf(vs.get(ind)));
 
 		login(name, passwd);
 		logout();
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=UsersDetailPage");
+		selenium.click(LNK_USER_DETAILS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		logInfo = selenium.getText("//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
+		logInfo = selenium.getText(DIV_LOGINFO);
 
 		vs = parseUserInterceptorString(logInfo);
 
-		Date d2 = new Date(Long.valueOf(vs.get(ind)));//df.parse(vs.get(ind));
+		Date d2 = new Date(Long.valueOf(vs.get(ind)));
 
 		return d2.compareTo(d1);
 	}

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -4,109 +4,197 @@
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
+
 /**
  * @author <a href="mailto:vrockai at redhat.com">Viliam Rockai</a>
  */
 
 @Test(groups = { "login" }, enabled = true)
 public class UserLoginTestCase extends JBossPortalSeleniumTestCase {
-
+	 
+	public final String casePfx = "user.login.";
+	
+	private final String ADR_PORTAL = getProp(casePfx+"adr.portal","/portal");
+	private final String FRM_MAIN = getProp(casePfx+"frm.main","relative=up");
+	private final String SUB_CANCEL = getProp(casePfx+"sub.portal","cancel");
+	private final String LNK_LOGOUT = getProp(casePfx+"lnk.logout","link=Logout");
+	private final String SUB_LOGIN = getProp(casePfx+"sub.login","login");
+	private final String INP_PASSWORD = getProp(casePfx+"inp.password","xpath=id('j_password')");
+	private final String INP_USERNAME = getProp(casePfx+"inp.username","xpath=id('j_username')");
+	private final String FRM_LOGINFORM = getProp(casePfx+"frm.login","login-content");
+	private final String LNK_LOGIN = getProp(casePfx+"lnk.login","link=Login");
+	
 	@AfterClass(enabled = true)
 	public void logoutIfNeeded()
 	{
-		selenium.open("/portal");
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		if (selenium.isElementPresent("link=Logout")){
-			selenium.click("link=Logout");
+		if (selenium.isElementPresent(LNK_LOGOUT)){
+			selenium.click(LNK_LOGOUT);
 			selenium.waitForPageToLoad(PAGE_LOAD);
 		}
-		
 	}
 	
 	@Test(enabled = true, description = "login as default user 'user' with password 'user'.")
 	public void testDefaultUserLogin() throws Exception {
-		selenium.open("/portal");
+		final String loginName = "user";
+		final String loginPass = "user";
+		
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertTrue(selenium.isElementPresent("link=Login"), "Expected DOM element for login link does not exist.");
-		Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
 
-		selenium.click("link=Login");
-		selenium.selectFrame("login-content");
+		selenium.click(LNK_LOGIN);
+		selenium.selectFrame(FRM_LOGINFORM);
 
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_username')"), "Expected input DOM element for username doesn't exist.");
-		selenium.type("j_username", "user");
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_password')"), "Expected input DOM element for password doesn't exist.");
-		selenium.type("j_password", "user");
-		selenium.click("login");
+		waitForElement(INP_USERNAME);
+		waitForElement(INP_PASSWORD);
+		
+		Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
 
+		selenium.type(INP_USERNAME, loginName);
+		Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+
+		selenium.type(INP_PASSWORD, loginPass);
+		selenium.click(SUB_LOGIN);
+
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertTrue(selenium.isTextPresent("Logged in as: user"), "\"Logged in as\" message missing.");
+		Assert.assertTrue(selenium.isTextPresent("Logged in as: "+loginName), "\"Logged in as\" message missing.");
 
-		Assert.assertTrue(selenium.isElementPresent("link=Logout"), "Expected DOM element for login link does not exist.");
-		Assert.assertEquals(selenium.getText("link=Logout"), "Logout", "Logout has wrong label.");
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGOUT), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGOUT), "Logout", "Logout has wrong label.");
 
-		selenium.click("link=Logout");
+		selenium.click(LNK_LOGOUT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "\"Logged in as:\" message with no user logged in is missing.");
 	}
 
 	@Test(enabled = true, description = "login as admin user 'admin' with password 'admin'.")
 	public void testAdminLogin() throws Exception {
-		selenium.open("/portal");
+		final String loginName = "admin";
+		final String loginPass = "admin";
+		
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		waitForElement(LNK_LOGIN);
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
 
-		Assert.assertTrue(selenium.isElementPresent("link=Login"), "Expected DOM element for login link does not exist.");
-		Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
+		selenium.click(LNK_LOGIN);
+		selenium.selectFrame(FRM_LOGINFORM);
 
-		selenium.click("link=Login");
-		selenium.selectFrame("login-content");
+		waitForElement(INP_USERNAME);
+		waitForElement(INP_PASSWORD);
+		
+		Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
+		selenium.type(INP_USERNAME, loginName);
+		Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+		selenium.type(INP_PASSWORD, loginPass);
+		selenium.click(SUB_LOGIN);
 
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_username')"), "Expected input DOM element for username doesn't exist.");
-		selenium.type("j_username", "admin");
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_password')"), "Expected input DOM element for password doesn't exist.");
-		selenium.type("j_password", "admin");
-		selenium.click("login");
-
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertTrue(selenium.isTextPresent("Logged in as: admin"), "\"Logged in as\" message missing.");
 
-		Assert.assertTrue(selenium.isElementPresent("link=Logout"), "Expected DOM element for login link does not exist.");
-		Assert.assertEquals(selenium.getText("link=Logout"), "Logout", "Logout has wrong label.");
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGOUT), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGOUT), "Logout", "Logout has wrong label.");
 
-		selenium.click("link=Logout");
+		selenium.click(LNK_LOGOUT);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "\"Logged in as:\" message with no user logged in is missing.");
 	}
 
 	@Test(enabled = true, description = "canceling of the login form.")
 	public void testUserLoginCancel() throws Exception {
-		selenium.open("/portal");
+		final String loginName = "saki";
+		final String loginPass = "paki";
+		
+		selenium.open(ADR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "\"Logged in as:\" message with no user logged in is missing.");
 
-		Assert.assertTrue(selenium.isElementPresent("link=Login"), "DOM element for login link not found.");
-		Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "DOM element for login link not found.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
 
-		selenium.click("link=Login");
-		selenium.selectFrame("login-content");
+		selenium.click(LNK_LOGIN);
+		selenium.selectFrame(FRM_LOGINFORM);
 
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_username')"), "Expected input DOM element for username doesn't exist.");
-		selenium.type("j_username", "saki");
-		Assert.assertTrue(selenium.isElementPresent("xpath=id('j_password')"), "Expected input DOM element for password doesn't exist.");
-		selenium.type("j_password", "paki");
+		waitForElement(INP_USERNAME);
+		waitForElement(INP_PASSWORD);
+		
+		Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
+		selenium.type(INP_USERNAME, loginName);
+		Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+		selenium.type(INP_PASSWORD, loginPass);
 
-		selenium.click("cancel");
-		selenium.selectFrame("relative=up");
+		selenium.click(SUB_CANCEL);
+		selenium.selectFrame(FRM_MAIN);
 
-		Assert.assertTrue(selenium.isElementPresent("link=Login"), "DOM element for login link not found.");
-		Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "DOM element for login link not found.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
 
 		Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "\"Logged in as:\" message with no user logged in is missing.");
 	}
+	
+	@Test(enabled = true, description = "login as 'us2er' which does not exist.")
+	public void testFalseNameLogin() throws Exception {
+		final String loginName = "us2er";
+		final String loginPass = "user";
+		
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
+
+		selenium.click(LNK_LOGIN);
+		selenium.selectFrame(FRM_LOGINFORM);
+
+		waitForElement(INP_USERNAME);
+		waitForElement(INP_PASSWORD);
+		
+		Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
+		selenium.type(INP_USERNAME, loginName);
+		Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+		selenium.type(INP_PASSWORD, loginPass);
+		selenium.click(SUB_LOGIN);
+
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent("The user doesn't exist or the password is incorrect "), "\"Logged in as\" message missing.");
+	}
+	
+	@Test(enabled = true, description = "login as 'user' with wrong password 'us2er'.")
+	public void testFalsePasswordLogin() throws Exception {
+		final String loginName = "user";
+		final String loginPass = "us2er";
+		
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isElementPresent(LNK_LOGIN), "Expected DOM element for login link does not exist.");
+		Assert.assertEquals(selenium.getText(LNK_LOGIN), "Login", "Login button doesn't exist.");
+
+		selenium.click(LNK_LOGIN);
+		selenium.selectFrame(FRM_LOGINFORM);
+
+		waitForElement(INP_USERNAME);
+		waitForElement(INP_PASSWORD);
+		
+		Assert.assertTrue(selenium.isElementPresent(INP_USERNAME), "Expected input DOM element for username doesn't exist.");
+		selenium.type(INP_USERNAME, loginName);
+		Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
+		selenium.type(INP_PASSWORD, loginPass);
+		selenium.click(SUB_LOGIN);
+
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent("The user doesn't exist or the password is incorrect "), "\"Logged in as\" message missing.");
+	}
+
 }

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -11,50 +11,47 @@
  */
 @Test(groups = { "cms_wsrp" }, enabled = true, description = "WSRP test case.")
 public class WSRPTestCase extends JBossPortalSeleniumTestCase {
-	private static final String INP_CONSUMER_NAME = "//input[contains(@id,'edit-cons-form:id')]";
-	private static final String SUBMIT_REFRESH_CANCEL = "//a[contains(@id,'edit-cons-form:list-cons-link')]";
-	private static final String SUBMIT_PROD_SAVE = "//input[contains(@id,'producer-form:save-producer')]";
-	private static final String SUBMIT_CONSDEL_CONF = "//a[contains(@id,'confirm-delete-form:destroy-link')]";
 	
-	private static final String SUBMIT_CONS_REGVAL = "//input[contains(@id,'edit-cons-form:refresh-cons-link')]";
-	private static final String SUBMIT_REFRESHFINAL = "//input[contains(@id,'edit-cons-form:refresh-cons-link')]";
+	public static String casePfx = "test.wsrp.";
 	
-	private static final String INPUT_CONS_REGVALUE = "//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]";
-	private static final String SUBMIT_REFRESHSAVE = "//input[contains(@id,'edit-cons-form:refresh-cons-link')]";
-	private static final String INPUT_CONSWSDL = "//input[contains(@id,'edit-cons-form:wsdl')]";
-	private static final String INPUT_CACHEEXP = "//input[contains(@id,'edit-cons-form:cache')]";
-	private static final String SUBMIT_ADDPROP_INIT = "//a[contains(@id,'producer-form:add-reg-prop')]";
-	private static final String SUBMIT_ADDPROP = "//a[contains(@id,'producer-form:add-reg-prop')]";
-	private static final String INPUT_PROPHINT = "//input[contains(@id,'producer-form:reg-properties:0:hint')]";
-	private static final String INPUT_PROPLABEL = "//input[contains(@id,'producer-form:reg-properties:0:label')]";
-	private static final String INPUT_PROPNAME = "//input[contains(@id,'producer-form:reg-properties:0:name')]";
-	private static final String SUBMIT_CREATECONS = "//input[contains(@id,'createConsumer:createConsumerButton')]";
-	private static final String INPUT_CREATECONS = "//input[contains(@id,'createConsumer:consumerName')]";
-	private static final String ID_LINK_PRODCONF = "//a[contains(@id,'cons-temp-form:producer-link')]";
-	private static final String ID_LINK_CONSCONF = "//a[contains(@id,'producer-temp-form:consumersTab')]";
-	private static final String LINK_CONSUMER_HOME  ="//a[contains(@id,'cons-temp-form1:list-cons-link')]";
+    private final String INP_CONSUMER_NAME = getProp(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
+    private final String SUB_REFRESH_CANCEL = getProp(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
+    private final String SUB_PROD_SAVE = getProp(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
+    private final String SUB_CONSDEL_CONF = getProp(casePfx+"submit.consdel.conf","//a[contains(@id,'confirm-delete-form:destroy-link')]");
+    private final String SUB_CONS_REGVAL = getProp(casePfx+"submit.cons.regval","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+    private final String SUB_REFRESHFINAL = getProp(casePfx+"submit.refreshfinal","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+    private final String INPUT_CONS_REGVALUE = getProp(casePfx+"input.cons.regvalue","//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]");
+    private final String SUBMIT_REFRESHSAVE = getProp(casePfx+"submit.refreshsave","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+    private final String INPUT_CONSWSDL = getProp(casePfx+"input.conswsdl","//input[contains(@id,'edit-cons-form:wsdl')]");
+    private final String INPUT_CACHEEXP = getProp(casePfx+"input.cacheexp","//input[contains(@id,'edit-cons-form:cache')]");
+    private final String SUBMIT_ADDPROP_INIT = getProp(casePfx+"submit.addprop.init","//a[contains(@id,'producer-form:add-reg-prop')]");
+    private final String SUBMIT_ADDPROP = getProp(casePfx+"submit.addprop","//a[contains(@id,'producer-form:add-reg-prop')]");
+    private final String INPUT_PROPHINT = getProp(casePfx+"input.prophint","//input[contains(@id,'producer-form:reg-properties:0:hint')]");
+    private final String INPUT_PROPLABEL = getProp(casePfx+"input.proplabel","//input[contains(@id,'producer-form:reg-properties:0:label')]");
+    private final String INPUT_PROPNAME = getProp(casePfx+"input.propname","//input[contains(@id,'producer-form:reg-properties:0:name')]");
+    private final String SUBMIT_CREATECONS = getProp(casePfx+"submit.createcons","//input[contains(@id,'createConsumer:createConsumerButton')]");
+    private final String INPUT_CREATECONS = getProp(casePfx+"input.createcons","//input[contains(@id,'createConsumer:consumerName')]");
+    private final String ID_LINK_PRODCONF = getProp(casePfx+"id.link.prodconf","//a[contains(@id,'cons-temp-form:producer-link')]");
+    private final String ID_LINK_CONSCONF = getProp(casePfx+"id.link.consconf","//a[contains(@id,'producer-temp-form:consumersTab')]");
+    private final String LINK_CONSUMER_HOME  =getProp(casePfx+"link.consumer.home","//a[contains(@id,'cons-temp-form1:list-cons-link')]");
+    private final String LINK_T_CONS_CON=getProp(casePfx+"link.t.cons.con","//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]");
+    private final String LINK_T_CONS_REF=getProp(casePfx+"link.t.cons.ref","//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]");
+    private final String LINK_T_CONS_ACT=getProp(casePfx+"link.t.cons.act","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+    private final String LINK_T_CONS_DEA=getProp(casePfx+"link.t.cons.dea","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+    private final String LINK_T_CONS_REG=getProp(casePfx+"link.t.cons.reg","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+    private final String LINK_T_CONS_DER=getProp(casePfx+"link.t.cons.der","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+    private final String LINK_T_CONS_DEL=getProp(casePfx+"link.t.cons.del","//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]");
+    private final String WSRP_CONSUMER_TABLE = getProp(casePfx+"link.wsrp.consumer.table","//table[contains(@id,':consumer-list-form:consumersList')]");
 	
-	private static final String LINK_T_CONS_CON="//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]";
-	private static final String LINK_T_CONS_REF="//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]";
-	private static final String LINK_T_CONS_ACT="//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]";
-	private static final String LINK_T_CONS_DEA="//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]";
-	private static final String LINK_T_CONS_REG="//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]";
-	private static final String LINK_T_CONS_DER="//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]";
-	private static final String LINK_T_CONS_DEL="//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]";
-
-
-
-
-	public static String WSRP_CONSUMER_TABLE = "//table[contains(@id,':consumer-list-form:consumersList')]";
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
-
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+		//logout();
 	}
 
 	@Test(enabled = true, description = "Creating a standard BEA consumer.")
@@ -80,10 +77,10 @@
 		Assert.assertTrue(selenium.isTextPresent("Missing value"));
 
 		selenium.type(INPUT_CONS_REGVALUE, "public");
-		selenium.click(SUBMIT_CONS_REGVAL);
+		selenium.click(SUB_CONS_REGVAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Refresh was successful."));
-		selenium.click(SUBMIT_REFRESHFINAL);
+		selenium.click(SUB_REFRESHFINAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("BEA"));
 	}
@@ -129,7 +126,7 @@
 
 		selenium.click(MessageFormat.format(LINK_T_CONS_DER,r));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click(SUBMIT_REFRESH_CANCEL);
+		selenium.click(SUB_REFRESH_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		Assert.assertEquals(selenium.getText(MessageFormat.format(LINK_T_CONS_DER,r)), "Register");
@@ -209,7 +206,7 @@
 		
 		Assert.assertTrue(selenium.isTextPresent("Delete 'BEAdel' consumer?"));
 		
-		clickAndWait(SUBMIT_CONSDEL_CONF);
+		clickAndWait(SUB_CONSDEL_CONF);
 
 		Assert.assertFalse(selenium.isTextPresent("BEAdel"));
 	}
@@ -223,15 +220,15 @@
 		selenium.click("link=WSRP");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(ID_LINK_PRODCONF,"Producer configuration");
-		
+		clickIfVisible(ID_LINK_PRODCONF);
+		Assert.assertTrue(selenium.isTextPresent("Producer configuration"));
 		clickAndWait(SUBMIT_ADDPROP_INIT);
 
 		selenium.type(INPUT_PROPNAME, "testProp");
 		selenium.type(INPUT_PROPLABEL, "testProp label");
 		selenium.type(INPUT_PROPHINT, "tetsPropHint");
 		
-		selenium.click(SUBMIT_PROD_SAVE);
+		selenium.click(SUB_PROD_SAVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		Assert.assertTrue(selenium.isTextPresent("Producer configuration successfully saved!"));
@@ -282,6 +279,7 @@
 		clickIfVisible(ID_LINK_CONSCONF);
 		clickIfVisible(LINK_CONSUMER_HOME);
 		
+		waitForElement(WSRP_CONSUMER_TABLE);
 		r = findTableRow(WSRP_CONSUMER_TABLE, name, 0);
 		Assert.assertTrue(r<0, "Renamed consumer still in table");
 		
@@ -301,19 +299,18 @@
 		selenium.click(SUBMIT_CREATECONS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		//selenium.setSpeed("5000");
-		
+		waitForElement(INPUT_CACHEEXP);
 		selenium.type(INPUT_CACHEEXP, timeout);
+		waitForElement(INPUT_CONSWSDL);
 		selenium.type(INPUT_CONSWSDL, address);
 		selenium.click(SUBMIT_REFRESHSAVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		waitForElement(INPUT_CONS_REGVALUE);
 		selenium.type(INPUT_CONS_REGVALUE, "public");
-		selenium.click(SUBMIT_CONS_REGVAL);
+		selenium.click(SUB_CONS_REGVAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		//selenium.setSpeed("0");
-		
-		selenium.click(SUBMIT_REFRESHFINAL);
+		selenium.click(SUB_REFRESHFINAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 	}
 }
\ No newline at end of file

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -12,39 +12,46 @@
 
 @Test(groups = { "cms_archive_upload" }, enabled = true)
 public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
-	
-	private static final String ARCHIVE_WAITING = "90000";
-	/* uncomment following lines and set the right path to the workspace in the case
-	 *  you want to use this test case locally from eclipse */
+
+	private static final Integer ARCHIVE_WAITING = 5000;
+	private static final int n = 50;
 	/*
+	 * uncomment following lines and set the right path to the workspace in the
+	 * case you want to use this test case locally from eclipse
+	 */
+/*
 	{
-		System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/");	
+		System.setProperty("workspace", "/home/vrockai/workspace/p2.7tests/ui-tests/");
 	}
-	*/
-	private static final String SUB_CANCEL_ARCH_UPLOAD = "cancel";
-	private static final String LNK_ADMIN = "link=Admin";
-	private static final String LNK_CMS = "link=CMS";
-	private static final String SUB_SEND_ARCHIVE = "submit";
-	private static final String INP_ARCHIVE_FILE = "response";
-	private static final String DIV_ARCHIVE_STATUS = "//div[@id='center']/div/div/table/tbody/tr[2]/td/font";
-	private static final String SEL_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
+*/
+	
+	private final String casePfx = "cms.arch.";
+    private final String SUB_CANCEL_ARCH_UPLOAD = getProp(casePfx+"sub.cancel.arch.upload","cancel");
+    private final String LNK_ADMIN = getProp(casePfx+"lnk.admin","link=Admin");
+    private final String LNK_CMS = getProp(casePfx+"lnk.cms","link=CMS");
+    private final String SUB_SEND_ARCHIVE = getProp(casePfx+"sub.send.archive","submit");
+    private final String INP_ARCHIVE_FILE = getProp(casePfx+"inp.archive.file","response");
+    private final String DIV_ARCHIVE_STATUS = getProp(casePfx+"div.archive.status","//div[@id='center']/div/div/table/tbody/tr[2]/td/font");
+    private final String SEL_ACTION = getProp(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
+
 	private final String WORKSPACE = System.getProperty("workspace");
 
-	@BeforeMethod( groups = { "log" })
+	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
+		// timeout hack
+		selenium.setSpeed("10000");
 	}
 
-	@AfterMethod( groups = { "log" })
+	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+
 	}
 
 	@Test(enabled = true, description = "Test archive consisting of two files upload.")
 	public void testArchiveUpload() {
-		//System.out.println("archive adress:" + WORKSPACE);
 		// canceling at the first stage
-		
 		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CMS);
@@ -54,18 +61,18 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
 		selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
-		
+
 		selenium.click(SUB_CANCEL_ARCH_UPLOAD);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		
-		Assert.assertFalse(selenium.isTextPresent("Your archive has been accepted for processing"));
-		Assert.assertFalse(selenium.isElementPresent("link=archive"));
-		
+
+		Assert.assertFalse(selenium.isTextPresent("Your archive has been accepted for processing"),
+				"archive was accepted for processing afte cancelling the upload");
+		Assert.assertFalse(selenium.isElementPresent("link=archive"), "not uploaded (upload cancelled) archive found #1");
+
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertFalse(selenium.isElementPresent("link=archive"));
-		
+		Assert.assertFalse(selenium.isElementPresent("link=archive"), "not uploaded (upload cancelled) archive found  #2");
+
 		// really uploading the file now
 		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -76,33 +83,38 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
 		selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
-		
+
 		selenium.click(SUB_SEND_ARCHIVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		//
-		
-		selenium.waitForPageToLoad(PAGE_LOAD);
+
 		Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
 				"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
 
-		selenium.setSpeed(ARCHIVE_WAITING);
-		selenium.click("link=Home");
-		selenium.setSpeed("0");
-		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertEquals(selenium.getText("link=archive"), "archive");
+		for (int i = 0;; i++) {
+			selenium.click("link=Home");
+			selenium.waitForPageToLoad(PAGE_LOAD);
 
+			if (i >= n) {
+				Assert.assertTrue(selenium.isElementPresent("link=archive"), "uploaded archive not found");
+				break;
+			}
+
+			if (selenium.isElementPresent("link=archive"))
+				break;
+
+			waitFor(ARCHIVE_WAITING);
+		}
+
 		selenium.click("link=archive");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertEquals(selenium.getText("link=readme.txt"), "readme.txt");
-		Assert.assertEquals(selenium.getText("link=jbosslogo.png"), "jbosslogo.png");
+		Assert.assertTrue(selenium.isElementPresent("link=readme.txt"), "content of uploaded file not found #1");
+		Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"), "content of uploaded file not found #2");
 	}
-	
+
 	@Test(enabled = true, description = "Test archive consisting of > 100 files upload.")
 	public void testManyFilesArchiveUpload() {
-		//System.out.println("archive adress:" + WORKSPACE);
-		
+
 		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CMS);
@@ -112,32 +124,39 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
 		selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
-		
+
 		selenium.click(SUB_SEND_ARCHIVE);
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
 				"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
 
-		selenium.setSpeed(ARCHIVE_WAITING);
 		selenium.click("link=Home");
-		selenium.setSpeed("0");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertTrue(selenium.isElementPresent("link=many_files"));
 
+		for (int i = 0;; i++) {
+			selenium.click("link=Home");
+			selenium.waitForPageToLoad(PAGE_LOAD);
+
+			if (i >= n) {
+				Assert.assertTrue(selenium.isElementPresent("link=many_files"), "uploaded archive not found");
+				break;
+			}
+
+			if (selenium.isElementPresent("link=many_files"))
+				break;
+
+			waitFor(ARCHIVE_WAITING);
+		}
+
 		selenium.click("link=many_files");
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isElementPresent("link=file31.txt"), "content of uploaded archive not found");
+	}
 
-		//TODO assert all files
-		
-		Assert.assertTrue(selenium.isElementPresent("link=file31.txt"));
-	}
-	
 	@Test(enabled = true, description = "Test archive consisting of 21MB file upload.")
 	public void testBigArchiveUpload() {
-		//System.out.println("archive adress:" + WORKSPACE);
-		
+
 		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_CMS);
@@ -147,19 +166,30 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
 		selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
-		
+
 		selenium.click(SUB_SEND_ARCHIVE);
 
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
 				"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
 
-		selenium.setSpeed(ARCHIVE_WAITING);
 		selenium.click("link=Home");
-		selenium.setSpeed("0");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
-		Assert.assertTrue(selenium.isElementPresent("link=bigfile"));
 
+		for (int i = 0;; i++) {
+			selenium.click("link=Home");
+			selenium.waitForPageToLoad(PAGE_LOAD);
+
+			if (i >= n) {
+				Assert.assertTrue(selenium.isElementPresent("link=bigfile"), "uploaded archive not found");
+				break;
+			}
+
+			if (selenium.isElementPresent("link=bigfile"))
+				break;
+
+			waitFor(ARCHIVE_WAITING);
+		}
+
 	}
 }

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -12,31 +12,33 @@
 
 @Test(groups = { "cms_directory" }, enabled = true)
 public class CMSDirectoryTestCase extends JBossPortalSeleniumTestCase {
+	private final String casePfx = "cms.dir.";
+	private final String SEL_CMS_ACTION = getProp(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
+	private final String ADR_CMS_INTERFACE = getProp(casePfx + "adr.cms.interface", "/portal/auth/portal/admin/CMS");
 
-	private static final String SEL_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
-	private static final String ADR_CMS_INTERFACE = "/portal/auth/portal/admin/CMS";
 	private final String defaultDirName = "default";
 	private final String tempDirName = "tempDir";
 	private final String copyDirName = "copySrc";
 	private final String moveDirName = "moveSrc";
 
-	private final String CMS_FILE_TABLE = "//div[@id='center']/div/div/div[3]/table";
+	private final String CMS_FILE_TABLE = getProp(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
 
-	@BeforeMethod( groups = { "log" })
+	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+
 	}
 
-	@Test(enabled = true, description="Directory creation.")
+	@Test(enabled = true, description = "Directory creation.")
 	public void testCreateDirectory() {
-		
+
 		// cancelling of creating
-		
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
@@ -44,7 +46,7 @@
 
 		selenium.open(ADR_CMS_INTERFACE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertFalse(selenium.isTextPresent(tempDirName), "Test folder is already present.");
 
 		selenium.select(SEL_CMS_ACTION, "label=Create Folder");
@@ -53,11 +55,11 @@
 		selenium.type("newcollectionname", tempDirName);
 		selenium.type("newcollectiondescription", "test folder");
 		selenium.click("cancel");
-		
+
 		// really creating
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
@@ -65,7 +67,7 @@
 
 		selenium.open(ADR_CMS_INTERFACE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertFalse(selenium.isTextPresent(tempDirName), "Test folder is already present.");
 
 		selenium.select(SEL_CMS_ACTION, "label=Create Folder");
@@ -74,9 +76,9 @@
 		selenium.type("newcollectionname", tempDirName);
 		selenium.type("newcollectiondescription", "test folder");
 		selenium.click("submit");
-		
+
 		// assuring that the directory is deleted
-		
+
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/ul/li[3]"));
 		Assert.assertEquals(tempDirName, selenium.getText("//div[@id='center']/div/div/ul/li[3]"));
@@ -86,16 +88,16 @@
 
 	}
 
-	@Test(enabled = true, dependsOnMethods = "testCreateDirectory",description="Directory delete.")
+	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Directory delete.")
 	public void testDeleteDirectory() {
-		
+
 		// firstly cancel the delete process
-		
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertTrue(selenium.isElementPresent("link=" + tempDirName));
 		selenium.select(takeAction(tempDirName) + "/select", "label=Delete");
 		selenium.click(takeAction(tempDirName) + "/select/option[4]");
@@ -108,10 +110,10 @@
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
 		selenium.click("cancel");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		// really deleting
 		selenium.open(ADDR_PORTAL);
-		selenium.waitForPageToLoad(PAGE_LOAD);		
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
@@ -132,16 +134,16 @@
 
 		// assuring that the deletition was processed
 		selenium.open(ADDR_PORTAL);
-		selenium.waitForPageToLoad(PAGE_LOAD);		
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertFalse(selenium.isElementPresent("link=" + tempDirName));
 	}
 
-	@Test(enabled = true, dependsOnMethods = "testCreateDirectory",description="Copying of directory.")
+	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Copying of directory.")
 	public void testCopyDirectory() {
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -173,7 +175,6 @@
 		selenium.click("link=" + defaultDirName);
 		selenium.click("submit");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-
 		Assert.assertEquals("copySrc", selenium.getText("//div[@id='center']/div/div/ul/li[5]"));
 		Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName));
 		selenium.click("link=Home");
@@ -185,9 +186,9 @@
 
 	}
 
-	@Test(enabled = true, dependsOnMethods = "testCreateDirectory",description="Canceling of copying of directory.")
+	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Canceling of copying of directory.")
 	public void testCopyCancelDirectory() {
-		String copyCancelDirName = "L"+ "copyLDirName" + "Cancel";
+		String copyCancelDirName = "L" + "copyLDirName" + "Cancel";
 
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -226,9 +227,9 @@
 
 	}
 
-	@Test(enabled = true, dependsOnMethods = "testCreateDirectory",description="Moving a directory.")
+	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Moving a directory.")
 	public void testMoveDirectory() {
-		//selenium.setSpeed("3000");
+		// selenium.setSpeed("3000");
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=CMS");
@@ -273,7 +274,7 @@
 
 	}
 
-	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description="Canceling of moving a directory.")
+	@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Canceling of moving a directory.")
 	public void testMoveCancelDirectory() {
 		String moveCancelDirName = "X" + "moveXDirName" + "Cancel";
 
@@ -311,10 +312,10 @@
 
 		selenium.click("link=Home");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		selenium.click("link=" + defaultDirName);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertFalse(selenium.isElementPresent("link=" + moveCancelDirName));
 
 	}

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -13,18 +13,21 @@
 @Test(groups = { "cms_file" }, enabled = true)
 public class CMSFileTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String TBL_CMS_FILEVER = "//div[@id='center']/div/div/table";
-	public static final String TBL_CMS_FILE = "//div[@id='center']/div/div/div[3]/table";
-	public static final String TBL_FILE_PENDING = "//div[@id='center']/div/div/table[2]";
+	private final String casePfx = "cms.file.";
+
+	private final String TBL_CMS_FILEVER = getProp(casePfx+"tbl.cms.filever","//div[@id='center']/div/div/table");
+	public final String TBL_CMS_FILE = getProp(casePfx+"tbl.cms.file","//div[@id='center']/div/div/div[3]/table");
+	public final String TBL_FILE_PENDING = getProp(casePfx+"tbl.file.pending","//div[@id='center']/div/div/table[2]");
 	
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}	
 	
 	@AfterMethod( groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+		
 	}
 	
 	@Test(enabled = true, description = "Common file structure browsing test.")

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -19,17 +19,20 @@
 	  System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/"
 	  ); }
 	*/
-	private final String CMS_FILE_TABLE = "//div[@id='center']/div/div/div[3]/table";
+	private final String casePfx = "cms.file.up.";
+
+	private final String CMS_FILE_TABLE = getProp(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
 	private final String WORKSPACE = System.getProperty("workspace");
 
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+		
 	}
 
 	@Test(enabled = true, description = "canceling of file upload")
@@ -88,8 +91,6 @@
 		selenium.type("title", "file to upload");
 		selenium.select("language", "label=Afar");
 
-		//System.out.println(WORKSPACE);
-
 		selenium.type("response", WORKSPACE + "/test_files/testFile.txt");
 		selenium.click("submit");
 		selenium.waitForPageToLoad(PAGE_LOAD);

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,5 +1,7 @@
 package org.jboss.portal.test.selenium.cms;
 
+import java.text.MessageFormat;
+
 import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
 import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
@@ -13,25 +15,44 @@
 @Test(groups = { "cms_file_workflow" }, enabled = true)
 public class CMSFileWorkflowTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String SELECT_CMS_MAIN = "//div[@id='center']/div/div/div[1]/div/select";
+	private static final String SUB_MOVE = "submit";
 
-	private final String CMS_FILE_TABLE = "//div[@id='center']/div/div/div[3]/table";
+	public final String casePfx = "cms.file.work.";
+
+	private final String LAB_LANG_CZECH = getProp(casePfx+"lab.lang.czech","label=Czech");
+	private final String LNK_DENY = getProp(casePfx+"lnk.deny","link=Deny");
+	private final String LNK_PREVIEW = getProp(casePfx+"lnk.preview","link=Preview");
+	private final String LNK_APPROVE = getProp(casePfx+"lnk.approve","link=Approve");
+	private final String SUB_FILE_CREATE = getProp(casePfx+"sub.file.create","save");
+	private final String SUB_FILE_CREATE_CANCEL = getProp(casePfx+"sub.file.create.cancel","cancel");
+	private final String SEL_LANG = getProp(casePfx+"sel.lang","language");
+	private final String INP_TITLE = getProp(casePfx+"inp.title","title");
+	private final String INP_DESC = getProp(casePfx+"inp.desc","description");
+	private final String INP_FILENAME = getProp(casePfx+"inp.filename","filename");
+	private final String LAB_CREATE_FILE = getProp(casePfx+"lab.create.file","label=Create File");
+	private final String LNK_CMS = getProp(casePfx+"lnk.cms","link=CMS");
+	private final String LNK_ADMIN = getProp(casePfx+"lnk.admin","link=Admin");
+
+    public final String SELECT_CMS_MAIN = getProp(casePfx+"select.cms.main","//div[@id='center']/div/div/div[1]/div/select");
+    public final String CMS_FILE_TABLE = getProp(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
+    
+    public final String CMS_T_SELECT = getProp(casePfx+"cms.t.select","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
+    public final String CMS_T_SUBMIT = getProp(casePfx+"cms.t.submit","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
+		    
+    public final String CMS_WF_TABLE = getProp(casePfx+"cms.wf.table","//div[@id='center']/div/div/table[2]");
+    public final String CMS_FV_TABLE = getProp(casePfx+"cms.fv.table","//div[@id='center']/div/div/table");
+    public final String CMS_T_VER = getProp(casePfx+"cms.t.ver","//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
+    public final String WYSIWYG_EDITOR_LOCATOR = getProp(casePfx+"wysiwyg.editor.locator","mce_editor_0");
 	
-	// file workflow table in CMS
-	private final String CMS_WF_TABLE = "//div[@id='center']/div/div/table[2]";
-	
-	// file version table in CMS
-	private final String CMS_FV_TABLE = "//div[@id='center']/div/div/table";
-	public static String WYSIWYG_EDITOR_LOCATOR = "mce_editor_0";
-	
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}	
 	
 	@AfterMethod( groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+		
 	}
 	
 	@Test(enabled = true, description = "Simple file creation.")
@@ -39,50 +60,50 @@
 		
 		// canceling first
 		
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.select(SELECT_CMS_MAIN, "label=Create File");
+		selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		selenium.waitForPopUp("_top", PAGE_LOAD);
-		selenium.type("filename", "newFile");
-		selenium.type("description", "newFile description");
-		selenium.type("title", "newFile title");
-		selenium.select("language", "label=Czech");
+		selenium.type(INP_FILENAME, "newFile");
+		selenium.type(INP_DESC, "newFile description");
+		selenium.type(INP_TITLE, "newFile title");
+		selenium.select(SEL_LANG, LAB_LANG_CZECH);
 		
-		selenium.click("cancel");
+		selenium.click(SUB_FILE_CREATE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		// saving
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.select(SELECT_CMS_MAIN, "label=Create File");
+		selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		selenium.waitForPopUp("_top", PAGE_LOAD);
-		selenium.type("filename", "newFile");
-		selenium.type("description", "newFile description");
-		selenium.type("title", "newFile title");
-		selenium.select("language", "label=Czech");
+		selenium.type(INP_FILENAME, "newFile");
+		selenium.type(INP_DESC, "newFile description");
+		selenium.type(INP_TITLE, "newFile title");
+		selenium.select(SEL_LANG, LAB_LANG_CZECH);
 		
-		selenium.click("save");
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		int row = countTableRows(CMS_WF_TABLE) - 1;
 		Assert.assertEquals(row, 1, "More instances of newly created document exists.");
 		
 		Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
-		Assert.assertTrue(selenium.isElementPresent("link=Preview"));
-		Assert.assertTrue(selenium.isElementPresent("link=Approve"));
-		Assert.assertTrue(selenium.isElementPresent("link=Deny"));
+		Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
+		Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
+		Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
 		
-		selenium.click("link=Approve");
+		selenium.click(LNK_APPROVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		row = countTableRows(CMS_FV_TABLE) - 1;
@@ -92,29 +113,29 @@
 	
 	@Test(enabled = true, description = "Simple file creation.")
 	public void testCreateFileDeny() {
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.select(SELECT_CMS_MAIN, "label=Create File");
+		selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
-		selenium.type("filename", "newFileDeny");
-		selenium.type("description", "newFileDeny description");
-		selenium.type("title", "newFileDeny title");
-		selenium.select("language", "label=Czech");
-		selenium.click("save");
+		selenium.type(INP_FILENAME, "newFileDeny");
+		selenium.type(INP_DESC, "newFileDeny description");
+		selenium.type(INP_TITLE, "newFileDeny title");
+		selenium.select(SEL_LANG, LAB_LANG_CZECH);
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		int row = countTableRows(CMS_WF_TABLE) - 1;
 		Assert.assertEquals(row, 1, "More instances of newly created document exists.");
 		
 		Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
-		Assert.assertTrue(selenium.isElementPresent("link=Preview"));
-		Assert.assertTrue(selenium.isElementPresent("link=Approve"));
-		Assert.assertTrue(selenium.isElementPresent("link=Deny"));
+		Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
+		Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
+		Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
 		
-		selenium.click("link=Deny");
+		selenium.click(LNK_DENY);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		Assert.assertFalse(selenium.isTextPresent("newFileDeny"));
@@ -126,24 +147,24 @@
 		
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Home");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.select(SELECT_CMS_MAIN, "label=Create File");
+		selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
-		selenium.type("filename", name);
-		selenium.type("description", name + " description");
-		selenium.type("title", "existingFile title");
-		selenium.select("language", "label=Czech");
+		selenium.type(INP_FILENAME, name);
+		selenium.type(INP_DESC, name + " description");
+		selenium.type(INP_TITLE, "existingFile title");
+		selenium.select(SEL_LANG, LAB_LANG_CZECH);
 		fillInEditor("vivat!");
-		selenium.click("save");
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		selenium.click("link=Preview");
+		selenium.click(LNK_PREVIEW);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
@@ -153,36 +174,35 @@
 	
 	@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "Simple file delete Cancel in first step, and then delete.")
 	public void testDeleteFile() {
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		int row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
 		
-		selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select", "label=Delete");
-		selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[4]");
-		selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/input");
+		selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");
+		selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
 		Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
 		
-		selenium.click("cancel");
+		selenium.click(SUB_FILE_CREATE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
 		
-		selenium.select(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/select", "label=Delete");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/select/option[4]");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr["+row+"]/td[2]/form/input");
+		selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");		
+		selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+		
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
 		Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
-		selenium.click("submit");
+		selenium.click(SUB_MOVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 	}
 	
@@ -192,18 +212,17 @@
 		
 		//canceling first
 		
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		int row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
-
-		selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Move");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+		;
+		selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
+		selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=default");
-		selenium.click("cancel");
+		selenium.click(SUB_FILE_CREATE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		// assuming file is not moved
@@ -221,18 +240,17 @@
 		// really moving file
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
 
-		selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Move");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+		selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
+		selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=default");
-		selenium.click("submit");
+		selenium.click(SUB_MOVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		// assuming file is moved
@@ -251,18 +269,17 @@
 	@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "File creation and copying to default directory.")
 	public void testCopyFile() {
 		createFile("file2copy","");
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		int row = findTableRow(CMS_FILE_TABLE, "file2copy", 0) + 1;
 
-		selenium.select(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select", "label=Copy");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/select/option[3]");
-		selenium.click(CMS_FILE_TABLE + "/tbody/tr[" + row + "]/td[2]/form/input");
+		selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Copy");
+		selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=default");
-		selenium.click("submit");
+		selenium.click(SUB_MOVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=default");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -285,27 +302,27 @@
 		
 		// canceling for the first time
 		
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		selenium.click("link="+file);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
-		selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+		selenium.click(MessageFormat.format(CMS_T_VER, row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		fillInEditor("contentstring2");
-		selenium.click("cancel");
+		selenium.click(SUB_FILE_CREATE_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		// really creating and approving
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Home");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -314,29 +331,29 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
-		selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+		selenium.click(MessageFormat.format(CMS_T_VER, row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		fillInEditor("contentstring2");
-		selenium.click("save");
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		selenium.click("link=Approve");
+		selenium.click(LNK_APPROVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
-		selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+		selenium.click(MessageFormat.format(CMS_T_VER, row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		fillInEditor("contentstring3");
-		selenium.click("save");
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		selenium.click("link=Deny");
+		selenium.click(LNK_DENY);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
 		Assert.assertFalse(selenium.isTextPresent("1.5"));
 		
 		row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
-		selenium.click(CMS_FV_TABLE + "/tbody/tr["+row+"]/td[1]/a");
+		selenium.click(MessageFormat.format(CMS_T_VER, row));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("contentstring2"));
 		
@@ -348,24 +365,24 @@
 		// save and approve
 		selenium.open(ADDR_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=Admin");
+		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click("link=CMS");
+		selenium.click(LNK_CMS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Home");
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.select(SELECT_CMS_MAIN, "label=Create File");
+		selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.waitForPopUp("_top", PAGE_LOAD);
-		selenium.type("filename", name);
-		selenium.type("description", name + " description");
-		selenium.type("title", "existingFile title");
-		selenium.select("language", "label=Czech");
+		selenium.type(INP_FILENAME, name);
+		selenium.type(INP_DESC, name + " description");
+		selenium.type(INP_TITLE, "existingFile title");
+		selenium.select(SEL_LANG, LAB_LANG_CZECH);
 		
-		selenium.click("save");
+		selenium.click(SUB_FILE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		
-		selenium.click("link=Approve");
+		selenium.click(LNK_APPROVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click("link=Home");
 		selenium.waitForPageToLoad(PAGE_LOAD);

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -15,26 +15,44 @@
 
 @Test(groups = { "cms_secure" }, enabled = true, description = "Setting permissions on the default portlet.")
 public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
+	private final String casePfx = "cms.sec.";
 
-	private static final String LNK_EXPLORE = "//area[@href='/portal/content/default/epp.html']";
-	private static final String LNK_CMS_EXPLORE = "Link=epp.html";
-	private static final String LNK_SUPPORT_HTML = "//area[@href='/portal/content/default/project.html']";
-	private static final String LNK_CMS_SUPPORT_HTML = "Link=project.html";
-	private static final String LNK_MEMBERS = "link=Members";
-	private static final String SUB_SECURITY_SET = "//input[contains(@name,'submit')]";
-	private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@name,'secureusers:manage')]";
-	private static final String SEL_SECUREROLES_MANAGE = "//select[contains(@name,'secureroles:manage')]";
-	private static final String SEL_SECUREUSERS_WRITE = "//select[contains(@name,'secureusers:write')]";
-	private static final String SEL_SECUREROLES_WRITE = "//select[contains(@name,'secureroles:write')]";
-	private static final String SEL_SECUREUSERS_READ = "//select[contains(@name,'secureusers:read')]";
-	private static final String SEL_SECUREROLES_READ = "//select[contains(@name,'secureroles:read')]";
-	private static final String LNK_INDEX_HTML = "link=index.html";
-	private static final String LNK_DEFAULT = "link=default";
-	private static final String LNK_CMS = "link=CMS";
-	private static final String LNK_ADMIN = "link=Admin";
-	private static final String LNK_LOGOUT = "link=Logout";
-	private static final String SEL_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
+	private final String LNK_EXPLORE = getProp(casePfx + "lnk.explore", "//area[@href='/portal/content/default/epp.html']");
+	private final String LNK_CMS_EXPLORE = getProp(casePfx + "lnk.cms.explore", "Link=epp.html");
+	private final String LNK_MEMBERS = getProp(casePfx + "lnk.members", "link=Members");
+	private final String SUB_SECURITY_SET = getProp(casePfx + "sub.security.set", "//input[contains(@name,'submit')]");
+	private final String SEL_SECUREUSERS_MANAGE = getProp(casePfx + "sel.secureusers.manage", "//select[contains(@name,'secureusers:manage')]");
+	private final String SEL_SECUREROLES_MANAGE = getProp(casePfx + "sel.secureroles.manage", "//select[contains(@name,'secureroles:manage')]");
+	private final String SEL_SECUREUSERS_WRITE = getProp(casePfx + "sel.secureusers.write", "//select[contains(@name,'secureusers:write')]");
+	private final String SEL_SECUREROLES_WRITE = getProp(casePfx + "sel.secureroles.write", "//select[contains(@name,'secureroles:write')]");
+	private final String SEL_SECUREUSERS_READ = getProp(casePfx + "sel.secureusers.read", "//select[contains(@name,'secureusers:read')]");
+	private final String SEL_SECUREROLES_READ = getProp(casePfx + "sel.secureroles.read", "//select[contains(@name,'secureroles:read')]");
+	private final String LNK_INDEX_HTML = getProp(casePfx + "lnk.index.html", "link=index.html");
+	private final String LNK_DEFAULT = getProp(casePfx + "lnk.default", "link=default");
+	private final String LNK_CMS = getProp(casePfx + "lnk.cms", "link=CMS");
+	private final String LNK_ADMIN = getProp(casePfx + "lnk.admin", "link=Admin");
+	private final String LNK_LOGOUT = getProp(casePfx + "lnk.logout", "link=Logout");
+	private final String SEL_CMS_ACTION = getProp(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
 
+	public String caseIPfx = "iden.man.";
+	public final String LNK_ROLETAB = getProp(caseIPfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
+	public final String LNK_ROLEMAIN = getProp(caseIPfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
+	public final String LNK_ROLE_CREATE = getProp(caseIPfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
+	public final String INP_ROLEDISNAME = getProp(caseIPfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
+	public final String INP_ROLENAME = getProp(caseIPfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
+	public final String SUB_ROLE_CREATE = getProp(caseIPfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
+	public final String SUB_ASSIGN_ROLE = getProp(caseIPfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
+	public final String CHK_ROLE = getProp(caseIPfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
+	public final String LNK_USERTAB = getProp(caseIPfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
+	public final String LNK_USERMAIN = getProp(caseIPfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
+	public final String LNK_USERMANG_MAIN = getProp(caseIPfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
+	public final String SUB_SEARCH_USER = getProp(caseIPfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+	public final String INP_SEARCH_USER = getProp(caseIPfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+	public final String LNK_SEARCH_USER = getProp(caseIPfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
+	public final String TBL_USERLIST = getProp(caseIPfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
+	public final String LNK_T_USRLIST_ROLES = getProp(caseIPfx + "lnk.t.usrlist.roles",
+			"//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]");
+
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTestIfPossible() {
 
@@ -83,15 +101,15 @@
 		selenium.click(LNK_MEMBERS);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(IdentityAdminTestCase.ID_LINK_ROLETAB);
-		clickIfVisible(IdentityAdminTestCase.ID_LINK_ROLEMAIN);
+		clickIfVisible(LNK_ROLETAB);
+		clickIfVisible(LNK_ROLEMAIN);
 
-		selenium.click(IdentityAdminTestCase.ID_BUT_ROLE_CREATE);
+		selenium.click(LNK_ROLE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.type(IdentityAdminTestCase.ID_INPUT_ROLENAME, roleName);
-		selenium.type(IdentityAdminTestCase.ID_INPUT_ROLEDISNAME, roleDisplayName);
-		selenium.click(IdentityAdminTestCase.ID_SUBMIT_ROLE_CREATE);
+		selenium.type(INP_ROLENAME, roleName);
+		selenium.type(INP_ROLEDISNAME, roleDisplayName);
+		selenium.click(SUB_ROLE_CREATE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		logout();
 	}
@@ -165,8 +183,6 @@
 		login("admin", "admin");
 
 		Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied "), "Non secured resource is not visible.#1");
-		//Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
-		//		"Non secured resource is not visible.#2");
 
 		selenium.click(LNK_ADMIN);
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -228,7 +244,7 @@
 
 	}
 
-	@Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
+	@Test(enabled = true, dependsOnMethods = { "testSetRoleReadPer1" }, description = "Set admin/secRole read permissions, login as user w/o secRole.")
 	public void testSetRoleReadPer2() {
 		login("admin", "admin");
 
@@ -290,14 +306,16 @@
 		logout();
 	}
 
-	@Test(enabled = true, description = "Subpage permission test")
+	@Test(enabled = true, dependsOnMethods = { "testSetRoleReadPer1" }, description = "Subpage permission test")
 	public void testSubpageSecurity() {
 		selenium.open("/portal/portal/default");
 
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
 		Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
 		selenium.click(LNK_EXPLORE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent("Enteprise Portal Platform"));
 		Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
 
 		login("admin", "admin");
@@ -321,12 +339,14 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		logout();
+		Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
 		Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
 		selenium.open("/portal/portal/default");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(LNK_EXPLORE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
+		Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
+		Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
 
 	}
 
@@ -338,12 +358,13 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
 
-		final String CHECK_ROLE = MessageFormat.format(IdentityAdminTestCase.ID_CHECK_ROLE, role);
-		selenium.click(CHECK_ROLE);
+		final String CHECK_ROLE = MessageFormat.format(CHK_ROLE, role);
+		if (!selenium.isChecked(CHECK_ROLE)) {
+			selenium.click(CHECK_ROLE);
 
-		selenium.click(IdentityAdminTestCase.ID_SUBMIT_ASSIGN_ROLE);
-		selenium.waitForPageToLoad(PAGE_LOAD);
-
+			selenium.click(SUB_ASSIGN_ROLE);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+		}
 		searchUser(user, email);
 
 		selenium.click(butUsrRol_id(user));
@@ -361,11 +382,13 @@
 		Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
 
 		// check the tempRole check box
-		final String CHECK_ROLE = MessageFormat.format(IdentityAdminTestCase.ID_CHECK_ROLE, role);
-		selenium.click(CHECK_ROLE);
+		final String CHECK_ROLE = MessageFormat.format(CHK_ROLE, role);
+		if (selenium.isChecked(CHECK_ROLE)) {
+			selenium.click(CHECK_ROLE);
 
-		selenium.click(IdentityAdminTestCase.ID_SUBMIT_ASSIGN_ROLE);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+			selenium.click(SUB_ASSIGN_ROLE);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+		}
 		searchUser(user, email);
 
 		selenium.click(butUsrRol_id(user));
@@ -383,19 +406,19 @@
 		selenium.click("link=Members");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		clickIfVisible(IdentityAdminTestCase.ID_LINK_USERTAB);
-		clickIfVisible(IdentityAdminTestCase.ID_LINK_USERMAIN);
-		clickIfVisible(IdentityAdminTestCase.LINK_USERMANG_MAIN);
+		clickIfVisible(LNK_USERTAB);
+		clickIfVisible(LNK_USERMAIN);
+		clickIfVisible(LNK_USERMANG_MAIN);
 
-		selenium.click(IdentityAdminTestCase.LINK_SEARCH_USER);
+		selenium.click(LNK_SEARCH_USER);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+		//selenium.setSpeed("5000");
+		selenium.type(INP_SEARCH_USER, username);
+		//System.out.println(SUB_SEARCH_USER);
+		selenium.click(SUB_SEARCH_USER);
 
-		selenium.type(IdentityAdminTestCase.ID_INPUT_SEARCH_USER, username);
-		selenium.click(IdentityAdminTestCase.ID_SUBMIT_SEARCH_USER);
-		// selenium.waitForPageToLoad(PAGE_LOAD);
-
 		try {
-			Thread.sleep(5000);
+			Thread.sleep(10000);
 		} catch (InterruptedException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
@@ -403,11 +426,12 @@
 
 		Assert.assertTrue(selenium.isTextPresent(username), "Username was not found.");
 		Assert.assertTrue(selenium.isTextPresent(email), "User email adress was not found.");
+		//selenium.setSpeed("0");
 	}
 
 	private String butUsrRol_id(String userName) {
-		String table = IdentityAdminTestCase.TABLE_USERLIST;
+		String table = TBL_USERLIST;
 		int r = findTableRow(table, userName, 0);
-		return MessageFormat.format(IdentityAdminTestCase.LINK_T_USRLIST_ROLES, r - 1);
+		return MessageFormat.format(LNK_T_USRLIST_ROLES, r - 1);
 	}
 }

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,430 @@
+# JBossPortalSeleniumTestCase
+
+portal.lnk.logout=link=Logout
+portal.sub.login=login
+portal.adr.portal=/portal/
+portal.frm.login.content=login-content
+portal.inp.password=//input[contains(@id,'j_password')]
+portal.inp.username=//input[contains(@id,'j_username')]
+portal.lnk.login=link=Login
+
+# UserLoginTestCase
+
+user.login.adr.portal=/portal
+user.login.frm.main=relative=up
+user.login.sub.portal=cancel
+user.login.lnk.logout=link=Logout
+user.login.sub.login=login
+user.login.inp.password=//input[contains(@id,'j_password')]
+user.login.inp.username=//input[contains(@id,'j_username')]
+user.login.frm.login=login-content
+user.login.lnk.login=link=Login
+
+# IdentityAdminTestCase
+inp.user.search.prev=//input[contains(@id,'search-user-form1:prev-page')]
+inp.user.search.next=//input[contains(@id,'search-user-form1:next-page')]
+iden.man.sel.searchuser.limit=//select[contains(@id,'search-user-form:limit')]
+iden.man.sub.edit.prof=//input[contains(@id,'profile-form:submit')]
+iden.man.sub.pagin.left=//input[contains(@id,'search-user-form1:prev-page')]
+iden.man.sub.pagin.right=//input[contains(@id,'search-user-form1:next-page')]
+iden.man.sub.edit.user.email.cancel=//input[contains(@id,'profile-form:cancel')]
+iden.man.inp.edit.user.email=//input[contains(@id,'profile-form:email')]
+iden.man.sub.role.search.user=//input[contains(@id,'search-user-form:search') and @type='submit']
+iden.man.inp.role.search.user=//input[contains(@id,'search-user-form:searchString')]
+iden.man.sub.edit.role.submit=//input[contains(@id,'edit-role-link:submit')]
+iden.man.sub.edit.role.cancel=//input[contains(@id,'edit-role-link:cancel')]
+iden.man.inp.edit.role.name=//input[contains(@id,'edit-role-link:display-name')]
+iden.man.sub.pass.change.submit=//input[contains(@name,'change-pwd-form:j_id31')]
+iden.man.sub.pass.change.cancel=//input[contains(@id,'change-pwd-form:cancel')]
+iden.man.inp.pass.change.p2=//input[contains(@id,':change-pwd-form:passwordCheck')]
+iden.man.inp.pass.change.p1=//input[contains(@id,':change-pwd-form:password')]
+iden.man.lnk.change.pass=//a[contains(@id,':profile-form:change-pwd-adm-link')]
+iden.man.tbl.userlist=//table[contains(@id,'search-user-form1:userlist')]
+iden.man.lnk.t.usrlist.del=//a[contains(@id,''search-user-form1:userlist:{0}:delete-user-link'')]
+iden.man.lnk.t.usrlist.roles=//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]
+iden.man.lnk.t.usrlist.dis=//a[contains(@id,''search-user-form1:userlist:{0}:enable-user-link'')]
+iden.man.lnk.t.usrlist.edit=//a[contains(@id,''search-user-form1:userlist:{0}:rename-link'')]
+iden.man.tbl.rolelist=//table[contains(@id,'roles-form:userlist')]
+iden.man.lnk.t.rollist.del=//a[contains(@id,''roles-form:userlist:{0}:delete-role-link'')]
+iden.man.lnk.t.rollist.members=//a[contains(@id,''roles-form:userlist:{0}:view-role-link'')]
+iden.man.lnk.t.rollist.edit=//a[contains(@id,''roles-form:userlist:{0}:edit-role-link'')]
+iden.man.tbl.rolemembers=//table[contains(@id,'role-members-form:role-data-table')]
+iden.man.sub.conf.create.user=//input[contains(@id,'confirm-form:admin')]
+iden.man.sub.delete.role=//input[contains(@id,'delete-role-form:confirm')]
+iden.man.sub.role.create=//input[contains(@id,'create-role-form:submit')]
+iden.man.inp.roledisname=//input[contains(@id,'create-role-form:roledisplayname')]
+iden.man.inp.rolename=//input[contains(@id,'create-role-form:rolename')]
+iden.man.lnk.role.create=//a[contains(@id, 'create-role-form:create-role-link')]
+iden.man.sub.del.user=//input[contains(@id,'delete-user-form:submit')]
+iden.man.sub.assign.role=//input[contains(@id,'assign-roles-form:submit')]
+iden.man.sub.user.role=//input[contains(@id,'register-role-form:submit')]
+iden.man.sub.create.user=//input[contains(@id,'register-form:submit')]
+iden.man.inp.password.chk=//input[contains(@id,'register-form:passwordCheck')]
+iden.man.inp.password=//input[contains(@id,'register-form:password')]
+iden.man.inp.useremail=//input[contains(@id,'register-form:email')]
+iden.man.inp.username=//input[contains(@id,'register-form:username')]
+iden.man.sub.search.user=//input[contains(@id,'search-user-form:search') and @type='submit']
+iden.man.inp.search.user=//input[contains(@id,'search-user-form:searchString')]
+iden.man.lnk.search.user=//a[contains(@id,'user-form:search-user-link')]
+iden.man.lnk.usertab=//a[contains(@id,'role-temp-form:manage-users')]
+iden.man.lnk.usermain=//a[contains(@id,'user-temp-form1:user-adm-link')]
+iden.man.lnk.roletab=//a[contains(@id,'user-temp-form:role-mgm-link')]
+iden.man.lnk.rolemain=//a[contains(@id, 'role-temp-form1:role-admin-link')]
+iden.man.lnk.usermang.main=//a[contains(@id,'user-temp-form1:assign-role-link')]
+iden.man.lnk.usermang.main2=//a[contains(@id,'user-temp-form1:user-mgm-link')]
+iden.man.lnk.create.user=//a[contains(@id,':user-form:create-user-link')]
+iden.man.chk.role=//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']
+
+# DashboardTestCase
+
+dash.sub.layout.update=//input[contains(@name,'dashboardLayoutForm:j_id12')]
+dash.sub.page.rename=//form[contains(@id,'renameForm')]/input[@type='submit']
+dash.inp.page.rename=//input[contains(@id,'renameForm:newName')]
+dash.link.weather.portlet=link=*WeatherPortlet*
+dash.link.portl2=link=*Who's online portlet*
+dash.link.portl1=link=*Welcome portlet*
+dash.opt.portl2=CurrentUsersPortletWindow
+dash.opt.portl1=JSPPortletWindow
+dash.sel.content.type=//select[contains(@id,'contentTypesForm:instanceId')]
+dash.sub.del.from.center.region=//input[contains(@id,'layoutForm:l_center')]
+dash.sub.down.center.region=//input[contains(@id,'layoutForm:d_center')]
+dash.sub.up.center.region=//input[contains(@id,'layoutForm:u_center')]
+dash.sel.center.region=//select[contains(@id,'layoutForm:selectMany_center')]
+dash.sub.addcenter=//input[contains(@id,'layoutForm:a_center')]
+dash.sub.addleft=//input[contains(@id,'layoutForm:a_left')]
+dash.lnk.configure.dashboard=link=Configure dashboard
+dash.lnk.dashboard=link=Dashboard
+dash.sel.page=//select[contains(@id,'pageNameSelector')]
+dash.inp.pagename=//input[contains(@id,':pageName')]
+dash.sub.createpage=//form[contains(@id,'j_id3')]/input[@type='submit']
+dash.sel.layout=//select[contains(@id,'dashboardLayoutForm:layoutSelector')]
+dash.sel.theme=//select[contains(@id,'dashboardThemeForm:themeSelector')]
+dash.sub.themesel=//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']
+
+# PortletUserCreationTestCase
+
+user.crea.port.submit.create.conf=//input[contains(@id,'confirm-form:user')]
+user.crea.port.submit.create.conf.edit=//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]
+user.crea.port.submit.create.user=//input[contains(@id,'register-form:submit')]
+user.crea.port.submit.create.user.cancel=//input[contains(@id,'register-form:cancel')]
+user.crea.port.input.userpasswdconf=//input[contains(@id,'register-form:passwordCheckv
+user.crea.port.input.userpasswd=//input[contains(@id,'register-form:password')]
+user.crea.port.input.usermail=//input[contains(@id,'register-form:email')]
+user.crea.port.input.username=//input[contains(@id,'register-form:username')]
+user.crea.port.link.create.user=//a[contains(@id,'create-account-form:register')]
+user.crea.port.tab.welcome=//a[contains(@id,'register-temp-form:start-link')]
+
+# WSRPTestCase
+
+test.wsrp.inp.consumer.name=//input[contains(@id,'edit-cons-form:id')]
+test.wsrp.submit.refresh.cancel=//a[contains(@id,'edit-cons-form:list-cons-link')]
+test.wsrp.submit.prod.save=//input[contains(@id,'producer-form:save-producer')]
+test.wsrp.submit.consdel.conf=//a[contains(@id,'confirm-delete-form:destroy-link')]
+test.wsrp.submit.cons.regval=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+test.wsrp.submit.refreshfinal=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+test.wsrp.input.cons.regvalue=//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]
+test.wsrp.submit.refreshsave=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+test.wsrp.input.conswsdl=//input[contains(@id,'edit-cons-form:wsdl')]
+test.wsrp.input.cacheexp=//input[contains(@id,'edit-cons-form:cache')]
+test.wsrp.submit.addprop.init=//a[contains(@id,'producer-form:add-reg-prop')]
+test.wsrp.submit.addprop=//a[contains(@id,'producer-form:add-reg-prop')]
+test.wsrp.input.prophint=//input[contains(@id,'producer-form:reg-properties:0:hint')]
+test.wsrp.input.proplabel=//input[contains(@id,'producer-form:reg-properties:0:label')]
+test.wsrp.input.propname=//input[contains(@id,'producer-form:reg-properties:0:name')]
+test.wsrp.submit.createcons=//input[contains(@id,'createConsumer:createConsumerButton')]
+test.wsrp.input.createcons=//input[contains(@id,'createConsumer:consumerName')]
+test.wsrp.id.link.prodconf=//a[contains(@id,'cons-temp-form:producer-link')]
+test.wsrp.id.link.consconf=//a[contains(@id,'producer-temp-form:consumersTab')]
+test.wsrp.link.consumer.home=//a[contains(@id,'cons-temp-form1:list-cons-link')]
+test.wsrp.link.t.cons.con=//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]
+test.wsrp.link.t.cons.ref=//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]
+test.wsrp.link.t.cons.act=//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]
+test.wsrp.link.t.cons.dea=//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]
+test.wsrp.link.t.cons.reg=//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]
+test.wsrp.link.t.cons.der=//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]
+test.wsrp.link.t.cons.del=//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]
+test.wsrp.link.wsrp.consumer.table=//table[contains(@id,':consumer-list-form:consumersList')]
+
+# CMSArchiveUploadTestCase
+
+cms.arch.sub.cancel.arch.upload=cancel
+cms.arch.lnk.admin=link=Admin
+cms.arch.lnk.cms=link=CMS
+cms.arch.sub.send.archive=submit
+cms.arch.inp.archive.file=response
+cms.arch.div.archive.status=//div[@id='center']/div/div/table/tbody/tr[2]/td/font
+cms.arch.sel.action=//div[@id='center']/div/div/div[1]/div/select
+
+# CMSDirectoryTestCase
+
+cms.dir.sel.cms.action=//div[@id='center']/div/div/div[1]/div/select
+cms.dir.adr.cms.interface=/portal/auth/portal/admin/CMS
+cms.dir.cms.file.table=//div[@id='center']/div/div/div[3]/table
+
+# CMSFileTestCase
+
+cms.file.tbl.cms.filever=//div[@id='center']/div/div/table
+cms.file.tbl.cms.file=//div[@id='center']/div/div/div[3]/table
+cms.file.tbl.file.pending=//div[@id='center']/div/div/table[2]
+
+# CMSFileUploadTestCase
+
+cms.file.up.cms.file.table=//div[@id='center']/div/div/div[3]/table
+
+# CMSFileWorkflowTestCase
+
+cms.file.work.lab.lang.czech=label=Czech
+cms.file.work.lnk.deny=link=Deny
+cms.file.work.lnk.preview=link=Preview
+cms.file.work.lnk.approve=link=Approve
+cms.file.work.sub.file.create=save
+cms.file.work.sub.file.create.cancel=cancel
+cms.file.work.sel.lang=language
+cms.file.work.inp.title=title
+cms.file.work.inp.desc=description
+cms.file.work.inp.filename=filename
+cms.file.work.lab.create.file=label=Create File
+cms.file.work.lnk.cms=link=CMS
+cms.file.work.lnk.admin=link=Admin
+cms.file.work.select.cms.main=//div[@id='center']/div/div/div[1]/div/select
+cms.file.work.cms.file.table=//div[@id='center']/div/div/div[3]/table
+cms.file.work.cms.t.select=//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select
+cms.file.work.cms.t.submit=//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input
+cms.file.work.cms.wf.table=//div[@id='center']/div/div/table[2]
+cms.file.work.cms.fv.table=//div[@id='center']/div/div/table
+cms.file.work.cms.t.ver=//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a
+cms.file.work.wysiwyg.editor.locator=mce_editor_0
+
+# CMSSecureTestCase
+
+cms.sec.lnk.explore=//area[@href='/portal/content/default/epp.html']
+cms.sec.lnk.cms.explore=Link=epp.html
+cms.sec.lnk.members=link=Members
+cms.sec.sub.security.set=//input[contains(@name,'submit')]
+cms.sec.sel.secureusers.manage=//select[contains(@name,'secureusers:manage')]
+cms.sec.sel.secureroles.manage=//select[contains(@name,'secureroles:manage')]
+cms.sec.sel.secureusers.write=//select[contains(@name,'secureusers:write')]
+cms.sec.sel.secureroles.write=//select[contains(@name,'secureroles:write')]
+cms.sec.sel.secureusers.read=//select[contains(@name,'secureusers:read')]
+cms.sec.sel.secureroles.read=//select[contains(@name,'secureroles:read')]
+cms.sec.lnk.index.html=link=index.html
+cms.sec.lnk.default=link=default
+cms.sec.lnk.cms=link=CMS
+cms.sec.lnk.admin=link=Admin
+cms.sec.lnk.logout=link=Logout
+cms.sec.sel.cms.action=//div[@id='center']/div/div/div[1]/div/select
+
+# AdminPortalTestCase
+
+portal.admin.sub.layout.add.center=//input[contains(@id,'layoutForm:a_center')]
+portal.admin.inp.window.name=//input[contains(@id,'windowForm:windowName')]
+portal.admin.submit.rename.portal=//input[contains(@id,'renameForm:rename')]
+portal.admin.input.rename.portal=//input[contains(@id,'renameForm:newName')]
+portal.admin.submit.delete.portal.conf=//input[contains(@id,'delete-view:confirm-form:delete')]
+portal.admin.input.submit.pagecreate=//input[contains(@id,'create-page-form:create-page')]
+portal.admin.input.pagename=//input[contains(@id,'create-page-form:pageName')]
+portal.admin.input.portalname=//input[contains(@id,'create-portal-form:name')]
+portal.admin.input.submit.createportal=//input[contains(@id,'create-portal-form:create-portal')]
+portal.admin.tab.portalobj.id=Link=Admin
+portal.admin.link.portals.id=link=*Portal Objects*
+portal.admin.link.portal.home=//a[contains(@id,'obj-temp-form:object-link-0')]
+portal.admin.table.portal.admin=//table[contains(@id,'obj-nav-form:portal-datatable')]
+portal.admin.por.tl.main=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]
+portal.admin.por.tl.security=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]
+portal.admin.por.tl.properties=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]
+portal.admin.por.tl.theme=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]
+portal.admin.por.tl.rename=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]
+portal.admin.por.tl.delete=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]
+portal.admin.por.tl.makedef=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]
+portal.admin.table.portalpage.admin=//table[contains(@id,'obj-nav-form:pages-datatable')]
+portal.admin.pag.tl.main=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]
+portal.admin.pag.tl.layout=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]
+portal.admin.pag.tl.security=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]
+portal.admin.pag.tl.properties=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]
+portal.admin.pag.tl.theme=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]
+portal.admin.pag.tl.rename=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]
+portal.admin.pag.tl.display=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]
+portal.admin.pag.tl.delete=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]
+portal.admin.pag.tl.makedef=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]
+
+portal.admin.lnk.pp.prop.delete=//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]
+portal.admin.sub.pp.propval.update=//input[contains(@id,'common-manage-prop-form:update')]
+portal.admin.inp.pp.prop.val=//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]
+portal.admin.sub.ppa.form.update=//input[contains(@id,'common-edit-page-error-form:update')]
+portal.admin.inp.ppa.res.select=//input[contains(@id,'common-edit-page-error-form:page-res-select')]
+portal.admin.sel.ppa.nf.select=//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]
+portal.admin.sel.ppa.internal.select=//select[contains(@id,'common-edit-page-error-form:page-internal-select')]
+portal.admin.sel.ppa.error.select=//select[contains(@id,'common-edit-page-error-form:page-error-select')]
+portal.admin.sel.ppa.control.select=//select[contains(@id,'common-edit-page-error-form:page-control-select')]
+portal.admin.sel.ppa.access.select=//select[contains(@id,'common-edit-page-error-form:page-access-select')]
+portal.admin.chk.ppa.res.check=//input[contains(@id,'common-edit-page-error-form:page-res-check')]
+portal.admin.chk.ppa.nf.check=//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]
+portal.admin.chk.ppa.internal.check=//input[contains(@id,'common-edit-page-error-form:page-internal-check')]
+portal.admin.chk.ppa.error.check=//input[contains(@id,'common-edit-page-error-form:page-error-check')]
+portal.admin.chk.ppa.control.check=//input[contains(@id,'common-edit-page-error-form:page-control-check')]
+portal.admin.chk.ppa.access.check=//input[contains(@id,'common-edit-page-error-form:page-access-check')]
+portal.admin.sub.pp.error.form.update=//input[contains(@id,'common-edit-portal-error-form:update')]
+portal.admin.inp.pp.res.input=//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]
+portal.admin.sel.pp.nf.select=//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]
+portal.admin.sel.pp.internal.select=//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]
+portal.admin.sel.pp.error.select=//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]
+portal.admin.sel.pp.unavail.select=//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]
+portal.admin.sel.pp.access.select=//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]
+portal.admin.chk.pp.res.check=//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]
+portal.admin.chk.pp.nf.check=//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]
+portal.admin.chk.pp.internal.check=//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]
+portal.admin.chk.pp.error.check=//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]
+portal.admin.chk.pp.access.check=//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]
+portal.admin.chk.pp.unavail.check=//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]
+portal.admin.sub.pp.propadd=//input[contains(@id,'common-edit-prop-form:add-property')]
+portal.admin.inp.pp.propname=//input[contains(@id,'common-edit-prop-form:property')]
+portal.admin.sub.pp.listener=//input[contains(@id,'edit-prop-form:update')]
+portal.admin.sel.pp.listener=//select[contains(@id,'edit-prop-form:listener')]
+portal.admin.tbl.pp.props=//table[contains(@id,'common-manage-prop-form:prop-data-table')]
+
+# DashboardsTestCase
+
+portal.dash.t.dh.sub.update=//form[contains(@id,'common-edit-theme-form')]/input[@type='submit']
+portal.dash.t.dh.sel.renderset=//select[contains(@id,'common-edit-theme-form:renderSet')]
+portal.dash.t.dh.sel.theme=//select[contains(@id,'common-edit-theme-form:theme')]
+portal.dash.t.dh.sel.layout=//select[contains(@id,'common-edit-theme-form:layout')]
+portal.dash.t.pa.sub.update=//input[contains(@id,'common-edit-page-error-form:update')]
+portal.dash.t.po.sub.update=//input[contains(@id,'common-edit-portal-error-form:update')]
+portal.dash.t.pa.inp.pageadd=//input[contains(@id,'common-edit-page-error-form:page-res-select')]
+portal.dash.t.po.inp.pageadd=//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]
+portal.dash.t.pa.sel.pnf=//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]
+portal.dash.t.pa.sel.intern=//select[contains(@id,'common-edit-page-error-form:page-internal-select')]
+portal.dash.t.pa.sel.error=//select[contains(@id,'common-edit-page-error-form:page-error-select')]
+portal.dash.t.pa.sel.control=//select[contains(@id,'common-edit-page-error-form:page-control-select')]
+portal.dash.t.pa.sel.access=//select[contains(@id,'common-edit-page-error-form:page-access-select')]
+portal.dash.t.po.sel.pnf=//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]
+portal.dash.t.po.sel.unavail=//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]
+portal.dash.t.po.sel.access=//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]
+portal.dash.submit.update.value=//input[contains(@id,'common-manage-prop-form:update')]
+portal.dash.table.props=//table[contains(@id,'common-manage-prop-form:prop-data-table')]
+portal.dash.t.props.input.value=//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]
+portal.dash.t.props.link.del=//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]
+portal.dash.table.pa.err=//form[@id='common-edit-page-error-form']/table
+portal.dash.table.po.err=//form[@id='common-edit-portal-error-form']/table
+portal.dash.table.dh.thm=//form[@id='common-edit-theme-form']/table
+portal.dash.input.prop.name=//input[contains(@id,'common-edit-prop-form:property')]
+portal.dash.submit.add.prop=//input[contains(@id,'common-edit-prop-form:add-property')]
+portal.dash.link.admin=link=Admin
+portal.dash.link.tab.dash=//a[contains(@id,'admin-subtab-form:dashboard-link')]
+
+# PortletDefinitionsTestCase
+
+portal.port.def.t.link.pref=//a[contains(@id,''def-list:portlet-pref-{0}'')]
+portal.port.def.submit.create.inst=//input[contains(@name,'add_instance_form:j_id19')]
+portal.port.def.input.instance.name=//input[contains(@id,'add_instance_form:instanceId')]
+portal.port.def.t.link.create=//a[contains(@id,''def-list:create-instance-{0}'')]
+portal.port.def.submit.provider.view=//input[contains(@id,'definition-form:view-portlets')]
+portal.port.def.select.provider=//select[contains(@id,'definition-form:menu')]
+portal.port.def.table.portlet=//form[contains(@id,'def-list')]/table
+portal.port.def.link.name.admin.port=//a[contains(@id,'common-show-portlet-detail-form:field1:select')]
+portal.port.def.link.admin.port=//a[contains(@id,'def-list:portlet-def-0')]
+portal.port.def.link.admin=link=Admin
+portal.port.def.link.tab.pd=//a[contains(@id,'admin-subtab-form:portlet-def-link')]
+portal.port.def.link.pd.main=//a[contains(@id,'man-form:def-link')]
+
+# PortletInstancesTestCase
+
+portal.port.ins.tab.portlet.instances=//table[contains(@id,'instancesTable2')]
+portal.port.ins.ul.paginator=//ul[@class='pagination property-container']
+portal.port.ins.submit.security.update=//input[contains(@id,'common-edit-security-form:update')]
+portal.port.ins.submit.security.cancel=//input[contains(@id,'common-edit-security-form:cancel')]
+portal.port.ins.link.20.page=link=20
+portal.port.ins.link.pref.welcomeport=//a[contains(@id,'security-JSPPortletInstance')]
+portal.port.ins.table.pref.key=//form[contains(@id,'common-edit-pref-form')]/table
+portal.port.ins.submit.pref.delete=//input[contains(@id,'common-edit-exisiting-form:row_0')]
+portal.port.ins.link.pref.guestnum=//a[contains(@id,'common-edit-pref-form:pref-link-0')]
+portal.port.ins.input.pref.newval=//input[contains(@id,'common-append-form:new_value')]
+portal.port.ins.submit.pref.update=//input[contains(@id,'common-append-form:append-button')]
+portal.port.ins.submit.pref.save=//input[contains(@id,':save')]
+portal.port.ins.input.pref.update=//input[contains(@id,'common-edit-exisiting-form:update')]
+portal.port.ins.input.pref.append=//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]
+portal.port.ins.submit.pref.cancel=//input[contains(@id,':cancel')]
+portal.port.ins.link.curuser.preferences=//a[contains(@id,'instances-form:preference-CurrentUsersPortletInstance')]
+portal.port.ins.link.del.exceptport=//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]
+portal.port.ins.submit.pi.delete.conf=//input[contains(@id,'confirm-delete-form1:delete')]
+portal.port.ins.submit.pi.delete.canc=//input[contains(@id,'confirm-delete-form1:cancel')]
+portal.port.ins.t.link.deletename=//a[contains(@id,''instance-display-form:locale-datatable:{0}:delete-link'')]
+portal.port.ins.t.link.modifyname=//a[contains(@id,''instance-display-form:locale-datatable:{0}:edit-link'')]
+portal.port.ins.link.countport=//a[contains(@id,'instances-form:CurrentUsersPortletInstance')]
+portal.port.ins.name.countport=CurrentUsersPortletInstance
+portal.port.ins.submit.modify.name=//input[contains(@id,'add-display-name-form:addDisplay')]
+portal.port.ins.input.name=//input[contains(@id,'add-display-name-form:newName')]
+portal.port.ins.select.language=//select[contains(@id,'add-display-name-form:locales')]
+portal.port.ins.link.admin=link=Admin
+portal.port.ins.link.tab.pi=//a[contains(@id,'admin-subtab-form:portlet-instance-link')]
+portal.port.ins.link.pi.main=//a[contains(@id,'instance-form1:instance-link')]
+portal.port.ins.table.dispnames=//table[contains(@id,'instance-display-form:locale-datatable')]
+portal.port.ins.lnk.sec.button=//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''Security'')]
+portal.port.ins.lnk.pref.button=//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionPreferences'')]
+portal.port.ins.lnk.del.button=//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionDeleteInstance'')]
+portal.port.ins.lnk.instance.button=//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td[1]/a[1]
+
+# EndToEndBeaPortlet
+
+e2e.wsrp.inp.consumer.name=//input[contains(@id,'edit-cons-form:id')]
+e2e.wsrp.submit.refresh.cancel=//a[contains(@id,'edit-cons-form:list-cons-link')]
+e2e.wsrp.submit.prod.save=//input[contains(@id,'producer-form:save-producer')]
+e2e.wsrp.submit.consdel.conf=//a[contains(@id,'confirm-delete-form:destroy-link')]
+e2e.wsrp.submit.cons.regval=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+e2e.wsrp.submit.refreshfinal=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+e2e.wsrp.input.cons.regvalue=//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]
+e2e.wsrp.submit.refreshsave=//input[contains(@id,'edit-cons-form:refresh-cons-link')]
+e2e.wsrp.input.conswsdl=//input[contains(@id,'edit-cons-form:wsdl')]
+e2e.wsrp.input.cacheexp=//input[contains(@id,'edit-cons-form:cache')]
+e2e.wsrp.submit.addprop.init=//a[contains(@id,'producer-form:add-reg-prop')]
+e2e.wsrp.submit.addprop=//a[contains(@id,'producer-form:add-reg-prop')]
+e2e.wsrp.input.prophint=//input[contains(@id,'producer-form:reg-properties:0:hint')]
+e2e.wsrp.input.proplabel=//input[contains(@id,'producer-form:reg-properties:0:label')]
+e2e.wsrp.input.propname=//input[contains(@id,'producer-form:reg-properties:0:name')]
+e2e.wsrp.submit.createcons=//input[contains(@id,'createConsumer:createConsumerButton')]
+e2e.wsrp.input.createcons=//input[contains(@id,'createConsumer:consumerName')]
+e2e.wsrp.id.link.prodconf=//a[contains(@id,'cons-temp-form:producer-link')]
+e2e.wsrp.id.link.consconf=//a[contains(@id,'producer-temp-form:consumersTab')]
+e2e.wsrp.link.consumer.home=//a[contains(@id,'cons-temp-form1:list-cons-link')]
+e2e.wsrp.link.t.cons.con=//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]
+e2e.wsrp.link.t.cons.ref=//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]
+e2e.wsrp.link.t.cons.act=//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]
+e2e.wsrp.link.t.cons.dea=//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]
+e2e.wsrp.link.t.cons.reg=//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]
+e2e.wsrp.link.t.cons.der=//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]
+e2e.wsrp.link.t.cons.del=//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]
+
+# EndtoEndPortalAdminTestCase
+
+portal.e2e.sel.portlet.type=//select[contains(@id,'windowForm:instanceId')]
+portal.e2e.sub.layout.add.center=//input[contains(@id,'layoutForm:a_center')]
+portal.e2e.inp.window.name=//input[contains(@id,'windowForm:windowName')]
+portal.e2e.sub.rename.portal=//input[contains(@id,'renameForm:rename')]
+portal.e2e.inp.rename.portal=//input[contains(@id,'renameForm:newName')]
+portal.e2e.sub.delete.portal.conf=//input[contains(@id,'delete-view:confirm-form:delete')]
+portal.e2e.inp.submit.pagecreate=//input[contains(@id,'create-page-form:create-page')]
+portal.e2e.inp.pagename=//input[contains(@id,'create-page-form:pageName')]
+portal.e2e.inp.portalname=//input[contains(@id,'create-portal-form:name')]
+portal.e2e.inp.submit.createportal=//input[contains(@id,'create-portal-form:create-portal')]
+portal.e2e.tab.portalobj.id=Link=Admin
+portal.e2e.lnk.portals.id=link=*Portal Objects*
+portal.e2e.lnk.portal.home=//a[contains(@id,'obj-temp-form:object-link-0')]
+portal.e2e.tbl.portal.admin=//table[contains(@id,'obj-nav-form:portal-datatable')]
+portal.e2e.por.tl.main=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]
+portal.e2e.por.tl.security=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]
+portal.e2e.por.tl.properties=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]
+portal.e2e.por.tl.theme=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]
+portal.e2e.por.tl.rename=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]
+portal.e2e.por.tl.delete=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]
+portal.e2e.por.tl.makedef=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]
+portal.e2e.tbl.portalpage.admin=//table[contains(@id,'obj-nav-form:pages-datatable')]
+portal.e2e.pag.tl.main=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]
+portal.e2e.pag.tl.layout=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]
+portal.e2e.pag.tl.security=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]
+portal.e2e.pag.tl.properties=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]
+portal.e2e.pag.tl.theme=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]
+portal.e2e.pag.tl.rename=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]
+portal.e2e.pag.tl.display=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]
+portal.e2e.pag.tl.delete=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]
+portal.e2e.pag.tl.makedef=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]
+portal.e2e.div.por.cont=content-container
\ No newline at end of file

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -14,49 +14,82 @@
 @Test(groups = { "admin_portal" }, enabled = true, description = "Partal administrating.")
 public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String SUB_LAYOUT_ADD_CENTER = "//input[contains(@id,'layoutForm:a_center')]";
-	private static final String INP_WINDOW_NAME = "//input[contains(@id,'windowForm:windowName')]";
-	private static final String SUBMIT_RENAME_PORTAL = "//input[contains(@id,'renameForm:rename')]";
-	private static final String INPUT_RENAME_PORTAL = "//input[contains(@id,'renameForm:newName')]";
-	private static final String SUBMIT_DELETE_PORTAL_CONF = "//input[contains(@id,'delete-view:confirm-form:delete')]";
-	private static final String INPUT_SUBMIT_PAGECREATE = "//input[contains(@id,'create-page-form:create-page')]";
-	private static final String INPUT_PAGENAME = "//input[contains(@id,'create-page-form:pageName')]";
-	private static final String INPUT_PORTALNAME = "//input[contains(@id,'create-portal-form:name')]";
-	private static final String INPUT_SUBMIT_CREATEPORTAL = "//input[contains(@id,'create-portal-form:create-portal')]";
+	public final String casePfx = "portal.admin.";
 
-	private final String TAB_PORTALOBJ_ID = "Link=Admin";
+	private final String LNK_PP_PROP_DELETE = getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+	private final String SUB_PP_PROPVAL_UPDATE = getProp(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
+	private final String INP_PP_PROP_VAL = getProp(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
+	private final String SUB_PPA_FORM_UPDATE = getProp(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
+	private final String INP_PPA_RES_SELECT = getProp(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+	private final String SEL_PPA_NF_SELECT = getProp(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+	private final String SEL_PPA_INTERNAL_SELECT = getProp(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+	private final String SEL_PPA_ERROR_SELECT = getProp(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+	private final String SEL_PPA_CONTROL_SELECT = getProp(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+	private final String SEL_PPA_ACCESS_SELECT = getProp(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+	private final String CHK_PPA_RES_CHECK = getProp(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
+	private final String CHK_PPA_NF_CHECK = getProp(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
+	private final String CHK_PPA_INTERNAL_CHECK = getProp(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
+	private final String CHK_PPA_ERROR_CHECK = getProp(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
+	private final String CHK_PPA_CONTROL_CHECK = getProp(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
+	private final String CHK_PPA_ACCESS_CHECK = getProp(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
+	private final String SUB_PP_ERROR_FORM_UPDATE = getProp(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
+	private final String INP_PP_RES_INPUT = getProp(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+	private final String SEL_PP_NF_SELECT = getProp(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+	private final String SEL_PP_INTERNAL_SELECT = getProp(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
+	private final String SEL_PP_ERROR_SELECT = getProp(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
+	private final String SEL_PP_UNAVAIL_SELECT = getProp(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
+	private final String SEL_PP_ACCESS_SELECT = getProp(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+	private final String CHK_PP_RES_CHECK = getProp(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
+	private final String CHK_PP_NF_CHECK = getProp(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
+	private final String CHK_PP_INTERNAL_CHECK = getProp(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
+	private final String CHK_PP_ERROR_CHECK = getProp(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
+	private final String CHK_PP_ACCESS_CHECK = getProp(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
+	private final String CHK_PP_UNAVAIL_CHECK = getProp(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
+	private final String SUB_PP_PROPADD = getProp(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
+	private final String INP_PP_PROPNAME = getProp(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
+	private final String SUB_PP_LISTENER = getProp(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
+	private final String SEL_PP_LISTENER = getProp(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
+	private final String TBL_PP_PROPS = getProp(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
 
-	private final String LINK_PORTALS_ID = "link=*Portal Objects*";
-	private final String LINK_PORTAL_HOME = "//a[contains(@id,'obj-temp-form:object-link-0')]";
-																   
-	private final String TABLE_PORTAL_ADMIN = "//table[contains(@id,'obj-nav-form:portal-datatable')]";
-	private final String POR_TL_MAIN = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]";
-	private final String POR_TL_SECURITY = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]";
-	private final String POR_TL_PROPERTIES = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]";
-	private final String POR_TL_THEME = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]";
-	private final String POR_TL_RENAME = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]";
-	private final String POR_TL_DELETE = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]";
-	private final String POR_TL_MAKEDEF = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]";
+	private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+	private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+	private final String SUBMIT_RENAME_PORTAL = getProp(casePfx + "submit.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+	private final String INPUT_RENAME_PORTAL = getProp(casePfx + "input.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+	private final String SUBMIT_DELETE_PORTAL_CONF = getProp(casePfx + "submit.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+	private final String INPUT_SUBMIT_PAGECREATE = getProp(casePfx + "input.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+	private final String INPUT_PAGENAME = getProp(casePfx + "input.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+	private final String INPUT_PORTALNAME = getProp(casePfx + "input.portalname", "//input[contains(@id,'create-portal-form:name')]");
+	private final String INPUT_SUBMIT_CREATEPORTAL = getProp(casePfx + "input.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+	private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
+	private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id", "link=*Portal Objects*");
+	private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+	private final String TABLE_PORTAL_ADMIN = getProp(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+	private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+	private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+	private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+	private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+	private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+	private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+	private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+	private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+	private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+	private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+	private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+	private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+	private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+	private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+	private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+	private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+	private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
 
-	private final String TABLE_PORTALPAGE_ADMIN = "//table[contains(@id,'obj-nav-form:pages-datatable')]";
-	private final String PAG_TL_MAIN = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]";
-	private final String PAG_TL_LAYOUT = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]";
-	private final String PAG_TL_SECURITY = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]";
-	private final String PAG_TL_PROPERTIES = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]";
-	private final String PAG_TL_THEME = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]";
-	private final String PAG_TL_RENAME = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]";
-	private final String PAG_TL_DISPLAY = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]";
-	private final String PAG_TL_DELETE = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]";
-	private final String PAG_TL_MAKEDEF = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]";
-
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
 	}
 
 	@Test(enabled = true)
@@ -64,19 +97,19 @@
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
 
-		Assert.assertFalse(selenium.isTextPresent("TestPortal"), "Not created page already exist.");
+		final String portalName = "TestPortal";
+		Assert.assertFalse(selenium.isTextPresent(portalName), "Not created page already exist.");
 
-		selenium.type(INPUT_PORTALNAME, "TestPortal");
+		selenium.type(INPUT_PORTALNAME, portalName);
 		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertTrue(selenium.isTextPresent("TestPortal"));
+		Assert.assertTrue(selenium.isTextPresent(portalName));
 
-		int r = findTableRow(TABLE_PORTAL_ADMIN, "TestPortal", 0) - 1;
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
 
 		Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(POR_TL_MAIN, r)));
 		Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(POR_TL_SECURITY, r)));
@@ -88,61 +121,100 @@
 
 	@Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
 	public void testPortalRename() {
+		// first create a portal
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
 
-		Assert.assertTrue(selenium.isTextPresent("TestPortal"));
-		Assert.assertFalse(selenium.isTextPresent("AestPortal"), "Not created page already exist.");
+		final String portalName = "TestRenPortal";
+		Assert.assertFalse(selenium.isTextPresent(portalName), "Not created page already exist.");
 
-		int r = findTableRow(TABLE_PORTAL_ADMIN, "TestPortal", 0) - 1;
+		selenium.type(INPUT_PORTALNAME, portalName);
+		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
+		// then rename it
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+
+		final String portalToRename = "TestRenPortal";
+		Assert.assertTrue(selenium.isTextPresent(portalToRename));
+		final String portalRenamed = "AestPortal";
+		Assert.assertFalse(selenium.isTextPresent(portalRenamed), "Not created page already exist.");
+
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalToRename, 0) - 1;
+
 		selenium.click(MessageFormat.format(POR_TL_RENAME, r));
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		selenium.type(INPUT_RENAME_PORTAL, "AestPortal");
+		selenium.type(INPUT_RENAME_PORTAL, portalRenamed);
 		selenium.click(SUBMIT_RENAME_PORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertFalse(selenium.isTextPresent("TestPortal"));
-		Assert.assertTrue(selenium.isTextPresent("AestPortal"));
+		Assert.assertFalse(selenium.isTextPresent(portalToRename));
+		Assert.assertTrue(selenium.isTextPresent(portalRenamed));
 	}
 
 	@Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
 	public void testPortalDelete() {
+		// first create a portal
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
 
-		selenium.type(INPUT_PORTALNAME, "TestDelete");
+		final String portalName = "TestDelete";
+		Assert.assertFalse(selenium.isTextPresent(portalName), "Not created page already exist.");
+
+		selenium.type(INPUT_PORTALNAME, portalName);
 		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		Assert.assertTrue(selenium.isTextPresent("TestDelete"));
+		// then delete it
 
-		int r = findTableRow(TABLE_PORTAL_ADMIN, "TestDelete", 0) - 1;
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+
+		final String portalToDelete = "TestDelete";
+		selenium.type(INPUT_PORTALNAME, portalToDelete);
+		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent(portalToDelete));
+
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalToDelete, 0) - 1;
+
 		selenium.click(MessageFormat.format(POR_TL_DELETE, r));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertTrue(selenium.isTextPresent("WARNING! You are about to delete the TestDelete portal from the context!"));
+		Assert.assertTrue(selenium.isTextPresent("WARNING! You are about to delete the " + portalToDelete + " portal from the context!"));
 		Assert.assertTrue(selenium.isTextPresent("Delete portal"));
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portal?"));
 		selenium.click(SUBMIT_DELETE_PORTAL_CONF);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		//Assert.assertTrue(selenium.isTextPresent("TestDelete has successfully been destroyed"));
+		// Assert.assertTrue(selenium.isTextPresent(
+		// "TestDelete has successfully been destroyed"));
 
 		clickIfVisible("link=Admin");
 		clickIfVisible(TAB_PORTALOBJ_ID);
-		Assert.assertFalse(selenium.isTextPresent("TestDelete"));
+		Assert.assertFalse(selenium.isTextPresent(portalToDelete));
 
 	}
 
-	@Test(enabled = true)
-	public void testAddPage() {
+	@Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+	public void testPortalProperties() {
+		// first create a portal
 
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -150,18 +222,206 @@
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
 
-		final String portalName = "TestAddPortal";
-		final String portalPage = "tPage";
+		final String portalName = "TestProperties";
+		Assert.assertFalse(selenium.isTextPresent(portalName), "Not created page already exist.");
 
 		selenium.type(INPUT_PORTALNAME, portalName);
 		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
+		// then property it
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+
+		selenium.type(INPUT_PORTALNAME, portalName);
+		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent(portalName));
+
 		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
 
+		selenium.click(MessageFormat.format(POR_TL_PROPERTIES, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		// Event Listener Binding
+
+		selenium.select(SEL_PP_LISTENER, "label=release_sessions_listener_self");
+		selenium.click(SUB_PP_LISTENER);
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_LISTENER, "label=user_listener");
+		selenium.click(SUB_PP_LISTENER);
+		selenium.waitForPageToLoad("30000");
+
+		// Properties
+
+		final String propName1 = "viliamProp";
+		final String propVal1 = "hier!";
+		final String propName2 = "danielProp";
+		final String propVal2 = "ohne!";
+		
+		selenium.type(INP_PP_PROPNAME, propName1);
+		selenium.click(SUB_PP_PROPADD);
+		selenium.waitForPageToLoad("30000");
+		
+		r = findTableRow(TBL_PP_PROPS, propName1, 0) - 1;
+		
+		selenium.type(MessageFormat.format(INP_PP_PROP_VAL,r), propVal1);
+		selenium.click(SUB_PP_PROPVAL_UPDATE);
+		selenium.waitForPageToLoad("30000");
+		selenium.type(INP_PP_PROPNAME, propName2);
+		selenium.click(SUB_PP_PROPADD);
+		selenium.waitForPageToLoad("30000");
+		
+		r = findTableRow(TBL_PP_PROPS, propName2, 0) - 1;
+		
+		selenium.type(MessageFormat.format(INP_PP_PROP_VAL,r), propVal2);
+		selenium.click(SUB_PP_PROPVAL_UPDATE);
+		selenium.waitForPageToLoad("30000");
+		
+		r = findTableRow(TBL_PP_PROPS, propName1, 0) - 1;
+		
+		selenium.click(MessageFormat.format(LNK_PP_PROP_DELETE,r));
+		selenium.waitForPageToLoad("30000");
+
+		// Portal & Page Error Handling
+
+		selenium.click(CHK_PP_UNAVAIL_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PP_ACCESS_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PP_ERROR_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PP_INTERNAL_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PP_NF_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PP_RES_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_ACCESS_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_UNAVAIL_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_ERROR_SELECT, "label=Display the default error message");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_INTERNAL_SELECT, "label=Display the default error message");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PP_NF_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.type(INP_PP_RES_INPUT, "/WEB-INF/jsp/error/portalx.jsp");
+		selenium.click(SUB_PP_ERROR_FORM_UPDATE);
+		selenium.waitForPageToLoad("30000");
+
+		selenium.click(CHK_PPA_ACCESS_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PPA_CONTROL_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PPA_ERROR_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PPA_INTERNAL_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PPA_NF_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.click(CHK_PPA_RES_CHECK);
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PPA_ACCESS_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PPA_CONTROL_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PPA_ERROR_SELECT, "label=Display the default error message");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PPA_INTERNAL_SELECT, "label=Display the default error message");
+		selenium.waitForPageToLoad("30000");
+		selenium.select(SEL_PPA_NF_SELECT, "label=Redirect to the specified resource");
+		selenium.waitForPageToLoad("30000");
+		selenium.type(INP_PPA_RES_SELECT, "/WEB-INF/jsp/error/pagey.jsp");
+		selenium.click(SUB_PPA_FORM_UPDATE);
+		selenium.waitForPageToLoad("30000");
+
+		// logout login and property again
+		
+		logout();
+		login("admin","admin");
+		
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+
+		selenium.type(INPUT_PORTALNAME, portalName);
+		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent(portalName));
+
+		r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		selenium.click(MessageFormat.format(POR_TL_PROPERTIES, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+	
+		// assert time!
+		
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_LISTENER),"user_listener");
+		
+		r = findTableRow(TBL_PP_PROPS, propName1, 0) - 1;
+		Assert.assertFalse(r>0, propName1+" was deleted previously but now it's found in property table");
+		r = findTableRow(TBL_PP_PROPS, propName2, 0) - 1;
+		Assert.assertEquals(selenium.getValue(MessageFormat.format(INP_PP_PROP_VAL,r)), propVal2, "previously changed value other than expected");
+				
+		Assert.assertFalse(selenium.isChecked(CHK_PP_UNAVAIL_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PP_ACCESS_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PP_ERROR_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PP_INTERNAL_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PP_NF_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PP_RES_CHECK));
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_ACCESS_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_UNAVAIL_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_ERROR_SELECT),"Display the default error message");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_INTERNAL_SELECT),"Display the default error message");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PP_NF_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getValue(INP_PP_RES_INPUT),"/WEB-INF/jsp/error/portalx.jsp");
+			
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_ACCESS_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_CONTROL_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_ERROR_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_INTERNAL_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_NF_CHECK));
+		Assert.assertFalse(selenium.isChecked(CHK_PPA_RES_CHECK));
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PPA_ACCESS_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PPA_CONTROL_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PPA_ERROR_SELECT),"Display the default error message");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PPA_INTERNAL_SELECT),"Display the default error message");
+		Assert.assertEquals(selenium.getSelectedLabel(SEL_PPA_NF_SELECT),"Redirect to the specified resource");
+		Assert.assertEquals(selenium.getValue(INP_PPA_RES_SELECT),"/WEB-INF/jsp/error/pagey.jsp");
+				
+	}
+
+	@Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+	public void testAddPage() {
+
+		final String portalName = "TestAddPagePortal";
+		final String portalPage = "tToAddPage";
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+
+		selenium.type(INPUT_PORTALNAME, portalName);
+		selenium.click(INPUT_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
 		selenium.click(MessageFormat.format(POR_TL_MAIN, r));
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		
+
 		Assert.assertFalse(selenium.isTextPresent(portalPage), "Portal page already present");
 		Assert.assertTrue(selenium.isTextPresent("Create a page named:"));
 
@@ -171,17 +431,21 @@
 		Assert.assertTrue(selenium.isTextPresent(portalPage));
 	}
 
-	@Test(enabled = true, dependsOnMethods = { "testAddPage" })
+	@Test(enabled = true, dependsOnMethods = { "testPortalCreate", "testAddPage" })
 	public void testRemovePage() {
 
-		final String portalName = "TestAddPortal";
-		final String portalPage = "tPage";
+		final String portalName = "TestRemovePagePortal";
+		final String portalPage = "tRemPage";
 
+		createPortal(portalName);
+		createPage(portalName, portalPage);
+
 		selenium.click("link=Admin");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
 
 		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
 
@@ -199,7 +463,7 @@
 
 	}
 
-	@Test(enabled = true)
+	@Test(enabled = true, dependsOnMethods = { "testPortalCreate", "testAddPage" })
 	public void testCreateWindow() {
 
 		final String portalName = "toAddWindowPortal";
@@ -227,38 +491,43 @@
 
 		// click on the page layout
 		selenium.click(MessageFormat.format(PAG_TL_LAYOUT, r));
+
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		selenium.click("link=Who's online portlet");
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
-		
-		selenium.click("link=Who's online portlet");
-		selenium.waitForPageToLoad("30000");
-		
 		selenium.type(INP_WINDOW_NAME, windowName);
-		
+
 		selenium.click(SUB_LAYOUT_ADD_CENTER);
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent(windowName));
 
 		selenium.open("/portal/auth/portal/mimikry");
 		Assert.assertTrue(selenium.isTextPresent("Current users"));
 
 	}
-	
-	@Test(enabled = true, dependsOnMethods={"testPortalCreate"})
-	public void testPageRename(){
+
+	@Test(enabled = true, dependsOnMethods = { "testPortalCreate", "testAddPage" })
+	public void testPageRename() {
 		String portalName = "TestPortal";
 		String pageName = "PageToRename";
-		
+
 		createPage("TestPortal", "PageToRename");
-		
+
 		openAndWait("/portal");
 		clickAndWait("link=Admin");
 
 		clickIfVisible(TAB_PORTALOBJ_ID);
 		clickIfVisible(LINK_PORTALS_ID);
-		//selenium.setSpeed("8000");
-		clickIfVisible(LINK_PORTAL_HOME	,"Create a portal named:");
-
+		// selenium.setSpeed("8000");
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
 		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
 
 		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
@@ -270,20 +539,17 @@
 	}
 
 	@Test(enabled = false)
-	public void testPageSecurity(){
-		
+	public void testPageSecurity() {
 	}
-	
+
 	@Test(enabled = false)
-	public void testPageTheme(){
-		
+	public void testPageTheme() {
 	}
-	
+
 	@Test(enabled = false)
-	public void testPageLayout(){
-		
+	public void testPageLayout() {
 	}
-	
+
 	private void createPortal(String name) {
 		selenium.open("/portal/");
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -318,5 +584,4 @@
 		selenium.waitForPageToLoad(PAGE_LOAD);
 
 	}
-
 }

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -10,44 +10,47 @@
 
 public class DashboardsTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String T_DH_SUB_UPDATE = "//form[contains(@id,'common-edit-theme-form')]/input[@type='submit']";
-	private static final String T_DH_SEL_RENDERSET = "//select[contains(@id,'common-edit-theme-form:renderSet')]";
-	private static final String T_DH_SEL_THEME =  "//select[contains(@id,'common-edit-theme-form:theme')]";
-	private static final String T_DH_SEL_LAYOUT = "//select[contains(@id,'common-edit-theme-form:layout')]";
-	private static final String T_PA_SUB_UPDATE = "//input[contains(@id,'common-edit-page-error-form:update')]";
-	private static final String T_PO_SUB_UPDATE = "//input[contains(@id,'common-edit-portal-error-form:update')]";
-	private static final String T_PA_INP_PAGEADD = "//input[contains(@id,'common-edit-page-error-form:page-res-select')]";
-	private static final String T_PO_INP_PAGEADD = "//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]";
-	private static final String T_PA_SEL_PNF = "//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]";
-	private static final String T_PA_SEL_INTERN = "//select[contains(@id,'common-edit-page-error-form:page-internal-select')]";
-	private static final String T_PA_SEL_ERROR = "//select[contains(@id,'common-edit-page-error-form:page-error-select')]";
-	private static final String T_PA_SEL_CONTROL = "//select[contains(@id,'common-edit-page-error-form:page-control-select')]";
-	private static final String T_PA_SEL_ACCESS = "//select[contains(@id,'common-edit-page-error-form:page-access-select')]";
-	private static final String T_PO_SEL_PNF = "//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]";
-	private static final String T_PO_SEL_UNAVAIL = "//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]";
-	private static final String T_PO_SEL_ACCESS = "//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]";
-	private static final String SUBMIT_UPDATE_VALUE = "//input[contains(@id,'common-manage-prop-form:update')]";
-	private static final String TABLE_PROPS = "//table[contains(@id,'common-manage-prop-form:prop-data-table')]";
-	private static final String T_PROPS_INPUT_VALUE = "//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]";
-	private static final String T_PROPS_LINK_DEL = "//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]";
+	public final String casePfx = "portal.dash.";
+	
+    private final String T_DH_SUB_UPDATE = getProp(casePfx+"t.dh.sub.update","//form[contains(@id,'common-edit-theme-form')]/input[@type='submit']");
+    private final String T_DH_SEL_RENDERSET = getProp(casePfx+"t.dh.sel.renderset","//select[contains(@id,'common-edit-theme-form:renderSet')]");
+    private final String T_DH_SEL_THEME =  getProp(casePfx+"t.dh.sel.theme","//select[contains(@id,'common-edit-theme-form:theme')]");
+    private final String T_DH_SEL_LAYOUT = getProp(casePfx+"t.dh.sel.layout","//select[contains(@id,'common-edit-theme-form:layout')]");
+    private final String T_PA_SUB_UPDATE = getProp(casePfx+"t.pa.sub.update","//input[contains(@id,'common-edit-page-error-form:update')]");
+    private final String T_PO_SUB_UPDATE = getProp(casePfx+"t.po.sub.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
+    private final String T_PA_INP_PAGEADD = getProp(casePfx+"t.pa.inp.pageadd","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+    private final String T_PO_INP_PAGEADD = getProp(casePfx+"t.po.inp.pageadd","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+    private final String T_PA_SEL_PNF = getProp(casePfx+"t.pa.sel.pnf","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+    private final String T_PA_SEL_INTERN = getProp(casePfx+"t.pa.sel.intern","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+    private final String T_PA_SEL_ERROR = getProp(casePfx+"t.pa.sel.error","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+    private final String T_PA_SEL_CONTROL = getProp(casePfx+"t.pa.sel.control","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+    private final String T_PA_SEL_ACCESS = getProp(casePfx+"t.pa.sel.access","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+    private final String T_PO_SEL_PNF = getProp(casePfx+"t.po.sel.pnf","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+    private final String T_PO_SEL_UNAVAIL = getProp(casePfx+"t.po.sel.unavail","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
+    private final String T_PO_SEL_ACCESS = getProp(casePfx+"t.po.sel.access","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+    private final String SUBMIT_UPDATE_VALUE = getProp(casePfx+"submit.update.value","//input[contains(@id,'common-manage-prop-form:update')]");
+    private final String TABLE_PROPS = getProp(casePfx+"table.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
+    private final String T_PROPS_INPUT_VALUE = getProp(casePfx+"t.props.input.value","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
+    private final String T_PROPS_LINK_DEL = getProp(casePfx+"t.props.link.del","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+    private final String TABLE_PA_ERR = getProp(casePfx+"table.pa.err","//form[@id='common-edit-page-error-form']/table");
+    private final String TABLE_PO_ERR = getProp(casePfx+"table.po.err","//form[@id='common-edit-portal-error-form']/table");
+    private final String TABLE_DH_THM = getProp(casePfx+"table.dh.thm","//form[@id='common-edit-theme-form']/table");
+    private final String INPUT_PROP_NAME = getProp(casePfx+"input.prop.name","//input[contains(@id,'common-edit-prop-form:property')]");
+    private final String SUBMIT_ADD_PROP = getProp(casePfx+"submit.add.prop","//input[contains(@id,'common-edit-prop-form:add-property')]");
+    private final String LINK_ADMIN = getProp(casePfx+"link.admin","link=Admin");
+    private final String LINK_TAB_DASH = getProp(casePfx+"link.tab.dash","//a[contains(@id,'admin-subtab-form:dashboard-link')]");
 
-	private static final String TABLE_PA_ERR = "//form[@id='common-edit-page-error-form']/table";
-	private static final String TABLE_PO_ERR = "//form[@id='common-edit-portal-error-form']/table";
-	private static final String TABLE_DH_THM = "//form[@id='common-edit-theme-form']/table";
-	private static final String INPUT_PROP_NAME = "//input[contains(@id,'common-edit-prop-form:property')]";
-	private static final String SUBMIT_ADD_PROP = "//input[contains(@id,'common-edit-prop-form:add-property')]";
-	private static final String LINK_ADMIN = "link=Admin";
-	private static final String LINK_TAB_DASH = "//a[contains(@id,'admin-subtab-form:dashboard-link')]";
 
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 		goToDash();
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+		
 	}
 
 	@Test(enabled = true)

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,282 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:vrockai at redhat.com">Viliam Rockai</a>
+ */
+ at Test(groups = { "end2end" }, enabled = true, description = "Creating of new portal with content.")
+public class EndtoEndPortalAdminTestCase extends JBossPortalSeleniumTestCase {
+
+
+	public static String casePfx = "portal.e2e.";
+
+	private final String ADR_PORTAL = getProp(casePfx + "adr.home","/portal");
+	public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");												   
+	private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+	private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+	private final String SUB_RENAME_PORTAL = getProp(casePfx + "sub.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+	private final String INP_RENAME_PORTAL = getProp(casePfx + "inp.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+	private final String SUB_DELETE_PORTAL_CONF = getProp(casePfx + "sub.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+	private final String INP_SUBMIT_PAGECREATE = getProp(casePfx + "inp.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+	private final String INP_PAGENAME = getProp(casePfx + "inp.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+	private final String INP_PORTALNAME = getProp(casePfx + "inp.portalname", "//input[contains(@id,'create-portal-form:name')]");
+	private final String INP_SUBMIT_CREATEPORTAL = getProp(casePfx + "inp.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+	private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
+	private final String LNK_PORTALS_ID = getProp(casePfx + "lnk.portals.id", "link=*Portal Objects*");
+	private final String LNK_PORTAL_HOME = getProp(casePfx + "lnk.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+	private final String TBL_PORTAL_ADMIN = getProp(casePfx + "tbl.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+	private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+	private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+	private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+	private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+	private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+	private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+	private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+	private final String TBL_PORTALPAGE_ADMIN = getProp(casePfx + "tbl.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+	private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+	private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+	private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+	private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+	private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+	private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+	private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+	private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+	private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+	private final String DIV_PORT_CONTENT = getProp(casePfx + "div.por.cont", "conrrerertent-container");
+	private final String INP_GOO_SEARCH = getProp(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
+	private final String SUB_GOO_SEARCH = getProp(casePfx + "sup.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
+	private final String INP_NET_SEARCH = getProp(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
+	private final String SUB_NET_SEARCH = getProp(casePfx + "sub.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
+
+	/*
+	 * - create a new portal - add couple of page to the portal - add few
+	 * portlets of different kinds (csm, widget, regular portlets) in each page
+	 * - verify that new portal, pages and portlets get added correctly. - Make
+	 * the new portal default and verify that it becomes default portal
+	 */
+
+	@BeforeMethod(groups = { "log" })
+	public void loginBeforeTest() {
+		logoutIfPossible();
+		login("admin", "admin");
+	}
+
+	@AfterMethod(groups = { "log" })
+	public void logoutAfterTest() {
+	}
+
+	final String portalName = "UseCasePortal";
+	final String page1Name = "firstPage";
+	final String page2Name = "anotherPage";
+	final String page3Name = "lastPage with whitespace";
+	final String page4Name = "dseer";
+	final String page5Name = "cemese";
+	final String PORTLET1 = "Cart Portlet";
+	final String por1str = "Cart Portlet";
+	final String PORTLET2 = "Band Culinaria";
+	final String por2str = "Band Culinaria";
+	final String PORTLET3 = "Cahuete.com";
+	final String por3str = "Cahuete.com";
+	final String PORTLET4 = "dir1/foo.txt";
+	final String por4str = "File Portlet";
+	final String PORTLET5 = "default/project.html";
+	final String por5str = "Our wiki knowledge base";
+
+	@Test(enabled = true, description = "Usecase for creating small portal with content.")
+	public void testCreatePortalUsecase() {
+		createPortal(portalName);
+
+		addPage(page1Name);
+		addPage(page2Name);
+		addPage(page3Name);
+		addPage(page4Name);
+		addPage(page5Name);
+
+		addPortlet(portalName, page1Name, PORTLET1, "portlet");
+		addPortlet(portalName, page2Name, PORTLET2, "widget/google");
+		addPortlet(portalName, page3Name, PORTLET3, "widget/netvibes");
+		addPortlet(portalName, page4Name, PORTLET4, "filesystem");
+		addPortlet(portalName, page5Name, PORTLET5, "cms");
+
+		makeDefaultPortal(portalName);
+
+		// Assert the portal is default
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertEquals("", selenium.getText(DIV_PORT_CONTENT));
+		Assert.assertTrue(selenium.isElementPresent("link=" + page1Name));
+		Assert.assertTrue(selenium.isElementPresent("link=" + page2Name));
+		Assert.assertTrue(selenium.isElementPresent("link=" + page3Name));
+		Assert.assertTrue(selenium.isElementPresent("link=" + page4Name));
+		Assert.assertTrue(selenium.isElementPresent("link=" + page5Name));
+
+		// Assert pages contain what they should
+		assertPageContains(page1Name, por1str);
+		assertPageContains(page2Name, por2str);
+		assertPageContains(page3Name, por3str);
+		assertPageContains(page4Name, por4str);
+		assertPageContains(page5Name, por5str);
+
+	}
+	
+	public void testManagePortal(){
+		
+	}
+
+	private void assertPageContains(String pageName, String awaitStr) {
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click("link=" + pageName);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent(awaitStr));
+	}
+
+	private void createPortal(String portalName) {
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LNK_PORTALS_ID);
+		clickIfVisible(LNK_PORTAL_HOME);
+
+		Assert.assertFalse(selenium.isTextPresent(portalName), "Not created page already exist.");
+
+		selenium.type(INP_PORTALNAME, portalName);
+		selenium.click(INP_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertTrue(selenium.isTextPresent(portalName));
+	}
+
+	private void addPage(String pageName) {
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LNK_PORTALS_ID);
+		clickIfVisible(LNK_PORTAL_HOME);
+
+		selenium.type(INP_PORTALNAME, portalName);
+		selenium.click(INP_SUBMIT_CREATEPORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		int r = findTableRow(TBL_PORTAL_ADMIN, portalName, 0) - 1;
+
+		selenium.click(MessageFormat.format(POR_TL_MAIN, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		Assert.assertFalse(selenium.isTextPresent(pageName), "Portal page already present");
+		Assert.assertTrue(selenium.isTextPresent("Create a page named:"));
+
+		selenium.type(INP_PAGENAME, pageName);
+		selenium.click(INP_SUBMIT_PAGECREATE);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent(pageName));
+	}
+
+	private void addPortlet(String portalName, String pageName, String portletName, String type) {
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LNK_PORTALS_ID);
+		clickIfVisible(LNK_PORTAL_HOME);
+
+		int r = findTableRow(TBL_PORTAL_ADMIN, portalName, 0) - 1;
+		selenium.click(MessageFormat.format(POR_TL_MAIN, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		r = findTableRow(TBL_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		// click on the page layout
+		selenium.click(MessageFormat.format(PAG_TL_LAYOUT, r));
+
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+
+		// hack
+		selenium.select(SEL_PORTLET_TYPE, "label=" + "cms");
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+
+		selenium.select(SEL_PORTLET_TYPE, "label=" + type);
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+
+		if ("portlet".equals(type)) {
+
+		} else if ("widget/google".equals(type)) {
+			selenium.type(INP_GOO_SEARCH, portletName);
+			selenium.click(SUB_GOO_SEARCH);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+		} else if ("widget/netvibes".equals(type)) {
+			selenium.type(INP_NET_SEARCH, portletName);
+			selenium.click(SUB_NET_SEARCH);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+		} else if ("cms".equals(type)) {
+			String[] links = portletName.split("/");
+			selenium.click("link="+links[0]);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+			portletName = links[1];
+		} else if ("filesystem".equals(type)) {
+			String[] links = portletName.split("/");
+			selenium.click("link="+links[0]);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+			portletName = links[1];
+		}
+		
+		selenium.click("link=*" + portletName+"*");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click(SUB_LAYOUT_ADD_CENTER);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+
+	}
+
+	private void makeDefaultPortal(String portalName) {
+		selenium.open(ADR_PORTAL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.click("link=Admin");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LNK_PORTALS_ID);
+		clickIfVisible(LNK_PORTAL_HOME);
+
+		int r = findTableRow(TBL_PORTAL_ADMIN, portalName, 0) - 1;
+
+		selenium.click(MessageFormat.format(POR_TL_MAKEDEF, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+	}
+}

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,360 @@
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class PageCoordinationTestCase extends JBossPortalSeleniumTestCase {
+	private final String INP_ALIAS_REN = "//input[contains(@name,'renameForm:newName')]";
+	private final String SUB_ALIAS_RENAME_SUBMIT = "//input[contains(@name,'renameForm:j_id35')]";
+	private final String SUB_ALIAS_REN_CANCEL = "//input[contains(@name,'renameForm:j_id36')]";
+	private final String TBL_ALIASES = "//div[@id='aliasBindings']/form/div/table";
+	private final String LNK_T_ALIAS_RENAME = "//div[@id=''aliasBindings'']/form[2]/div/table/tbody/tr[{0}]/td[2]/table/tbody/tr/td[1]/a/span";
+	private final String LNK_T_ALIAS_DELETE = "//div[@id=''aliasBindings'']/form[2]/div/table/tbody/tr[{0}]/td[2]/table/tbody/tr/td[2]/a/span";
+	private final String SUB_ALIAS_DEL_SUBMIT = "_jbpnsAdminPortletWindowsnpbj:j_id47:j_id34:j_id40:j_id41";
+	private final String SUB_ALIAS_DEL_CANCEL = "_jbpnsAdminPortletWindowsnpbj:j_id47:j_id34:j_id40:j_id42";
+	private final String CHK_EXPL_WIR = "//input[contains(@id,'useExplicitEvents')]";
+	private final String CHK_PARAM_BIND = "//input[contains(@id,'useExplicitBinding')]";
+	private final String SUB_CREATE_ALIAS = "//input[contains(@name,'create-alias-form') and @type='submit'][1]";
+	private final String SUB_CREATE_ALIAS_CANCEL = "//input[contains(@name,'create-alias-form') and @type='submit'][2]";
+	private final String INP_ALIAS_NAME = "//input[contains(@id,'create-alias-form:aliasName')]";
+	private final String LIS_RENDER_PAR = "//select[contains(@id,'create-alias-form:alias')]";
+
+	public final String casePfx = "portal.admin.";
+
+	private final String LNK_PP_PROP_DELETE = getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+	private final String SUB_PP_PROPVAL_UPDATE = getProp(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
+	private final String INP_PP_PROP_VAL = getProp(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
+	private final String SUB_PPA_FORM_UPDATE = getProp(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
+	private final String INP_PPA_RES_SELECT = getProp(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+	private final String SEL_PPA_NF_SELECT = getProp(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+	private final String SEL_PPA_INTERNAL_SELECT = getProp(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+	private final String SEL_PPA_ERROR_SELECT = getProp(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+	private final String SEL_PPA_CONTROL_SELECT = getProp(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+	private final String SEL_PPA_ACCESS_SELECT = getProp(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+	private final String CHK_PPA_RES_CHECK = getProp(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
+	private final String CHK_PPA_NF_CHECK = getProp(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
+	private final String CHK_PPA_INTERNAL_CHECK = getProp(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
+	private final String CHK_PPA_ERROR_CHECK = getProp(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
+	private final String CHK_PPA_CONTROL_CHECK = getProp(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
+	private final String CHK_PPA_ACCESS_CHECK = getProp(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
+	private final String SUB_PP_ERROR_FORM_UPDATE = getProp(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
+	private final String INP_PP_RES_INPUT = getProp(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+	private final String SEL_PP_NF_SELECT = getProp(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+	private final String SEL_PP_INTERNAL_SELECT = getProp(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
+	private final String SEL_PP_ERROR_SELECT = getProp(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
+	private final String SEL_PP_UNAVAIL_SELECT = getProp(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
+	private final String SEL_PP_ACCESS_SELECT = getProp(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+	private final String CHK_PP_RES_CHECK = getProp(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
+	private final String CHK_PP_NF_CHECK = getProp(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
+	private final String CHK_PP_INTERNAL_CHECK = getProp(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
+	private final String CHK_PP_ERROR_CHECK = getProp(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
+	private final String CHK_PP_ACCESS_CHECK = getProp(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
+	private final String CHK_PP_UNAVAIL_CHECK = getProp(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
+	private final String SUB_PP_PROPADD = getProp(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
+	private final String INP_PP_PROPNAME = getProp(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
+	private final String SUB_PP_LISTENER = getProp(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
+	private final String SEL_PP_LISTENER = getProp(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
+	private final String TBL_PP_PROPS = getProp(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
+
+	private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+	private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+	private final String SUBMIT_RENAME_PORTAL = getProp(casePfx + "submit.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+	private final String INPUT_RENAME_PORTAL = getProp(casePfx + "input.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+	private final String SUBMIT_DELETE_PORTAL_CONF = getProp(casePfx + "submit.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+	private final String INPUT_SUBMIT_PAGECREATE = getProp(casePfx + "input.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+	private final String INPUT_PAGENAME = getProp(casePfx + "input.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+	private final String INPUT_PORTALNAME = getProp(casePfx + "input.portalname", "//input[contains(@id,'create-portal-form:name')]");
+	private final String INPUT_SUBMIT_CREATEPORTAL = getProp(casePfx + "input.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+	private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
+	private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id", "link=*Portal Objects*");
+	private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+	private final String TABLE_PORTAL_ADMIN = getProp(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+	private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+	private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+	private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+	private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+	private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+	private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+	private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+	private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+	private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+	private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+	private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+	private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+	private final String PAG_TL_COORDINATION = getProp(casePfx + "pag.tl.coord", "//a[contains(@id,''pages-datatable:{0}:edit-coord'')]");
+	private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+	private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+	private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+	private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+	private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+	
+	@BeforeMethod(groups = { "log" })
+	public void loginBeforeTest() {
+		logoutIfPossible();
+		login("admin", "admin");
+	}
+
+	@AfterMethod(groups = { "log" })
+	public void logoutAfterTest() {
+	}
+	
+	
+	@Test(enabled = true)
+	public void testDefaultPageCoordination(){
+		openAndWait("/portal/auth/portal/default/Coordination+Samples");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):null"));
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?zipcode=10101");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10101"));
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=10102");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):10102"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10102"));
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?zipcode=10103");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):10102"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10103"));
+	}
+	
+	@Test(enabled = true)
+	public void testPageCoordination(){
+		String portalName = "default";
+		String pageName = "Coordination Samples";
+
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		// create alias
+		selenium.addSelection(LIS_RENDER_PAR, "label=zipcode");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INP_ALIAS_NAME, "aliasBindTest");
+		selenium.click(SUB_CREATE_ALIAS_CANCEL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		selenium.addSelection(LIS_RENDER_PAR, "label=zipcode");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INP_ALIAS_NAME, "aliasBindTest");
+		selenium.click(SUB_CREATE_ALIAS);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindTest=222333");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+		
+	}
+	
+	@Test(enabled = true)
+	public void testDeleteAlias(){
+		String portalName = "default";
+		String pageName = "Coordination Samples";
+
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		// selenium.setSpeed("5000");
+		// create delete alias
+		selenium.addSelection(LIS_RENDER_PAR, "label={urn:jboss:portal:samples:coor}zipcode");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INP_ALIAS_NAME, "aliasBindDelete");
+
+		selenium.click(SUB_CREATE_ALIAS);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+				
+		// delete alias
+		r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
+		
+		selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click(SUB_ALIAS_DEL_CANCEL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
+		
+		selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click(SUB_ALIAS_DEL_SUBMIT);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=222333");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):222333"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindDelete=222334");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):222333"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+	}
+	
+	@Test(enabled = true)
+	public void testRenameAlias(){
+		String portalName = "default";
+		String pageName = "Coordination Samples";
+
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		// create rename alias
+		selenium.addSelection(LIS_RENDER_PAR, "label={urn:jboss:portal:samples:coor}zipcode");
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INP_ALIAS_NAME, "aliasBingRename");
+
+		selenium.click(SUB_CREATE_ALIAS);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		// rename alias
+		r = findTableRow(TBL_ALIASES, "aliasBingRename", 0);
+		
+		selenium.click(MessageFormat.format(LNK_T_ALIAS_RENAME,r));
+
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click(SUB_ALIAS_REN_CANCEL);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		r = findTableRow(TBL_ALIASES, "aliasBingRename", 0);
+		
+		selenium.click(MessageFormat.format(LNK_T_ALIAS_RENAME,r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.type(INP_ALIAS_REN, "aliasBindWasRenamed");
+		selenium.click(SUB_ALIAS_RENAME_SUBMIT);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=222333");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):222333"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+		
+		openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindWasRenamed=222334");
+		Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):222334"));
+		Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+	}
+	
+	@Test(enabled = true)
+	public void testParamBinding(){
+		String portalName = "default";
+		String pageName = "Coordination Samples";
+
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		// parameter binding
+		selenium.click(CHK_PARAM_BIND);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		logout();
+		login("admin","admin");
+		
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		Assert.assertTrue(selenium.isChecked(CHK_PARAM_BIND));
+	}
+
+	@Test(enabled = true)
+	public void testExplicitWiring(){
+		String portalName = "default";
+		String pageName = "Coordination Samples";
+
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		// explicit wiring
+		selenium.click(CHK_EXPL_WIR);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		
+		logout();
+		login("admin","admin");
+		
+		openAndWait("/portal");
+		clickAndWait("link=Admin");
+
+		clickIfVisible(TAB_PORTALOBJ_ID);
+		clickIfVisible(LINK_PORTALS_ID);
+		clickIfVisible(LINK_PORTAL_HOME);
+		Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+		r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
+
+		r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
+
+		clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
+		
+		Assert.assertTrue(selenium.isChecked(CHK_EXPL_WIR));
+	}
+}

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -10,21 +10,25 @@
 
 public class PortletDefinitionsTestCase extends JBossPortalSeleniumTestCase{
 	
-	private static final String T_LINK_PREF = "//a[contains(@id,''def-list:portlet-pref-{0}'')]";
-	private static final String SUBMIT_CREATE_INST = "//input[contains(@name,'add_instance_form:j_id19')]";
-	private static final String INPUT_INSTANCE_NAME = "//input[contains(@id,'add_instance_form:instanceId')]";
-	private static final String T_LINK_CREATE = "//a[contains(@id,''def-list:create-instance-{0}'')]";
-	private static final String SUBMIT_PROVIDER_VIEW = "//input[contains(@id,'definition-form:view-portlets')]";
-	private static final String SELECT_PROVIDER = "//select[contains(@id,'definition-form:menu')]";
-	private static final String TABLE_PORTLET = "//form[contains(@id,'def-list')]/table";
-	private static final String LINK_NAME_ADMIN_PORT = "//a[contains(@id,'common-show-portlet-detail-form:field1:select')]";
-	private static final String LINK_ADMIN_PORT = "//a[contains(@id,'def-list:portlet-def-0')]";
-	private static final String LINK_ADMIN = "link=Admin";
-	private static final String LINK_TAB_PD = "//a[contains(@id,'admin-subtab-form:portlet-def-link')]";
-	private static final String LINK_PD_MAIN = "//a[contains(@id,'man-form:def-link')]";
+	public final String casePfx = "portal.port.def.";
 	
+    private final String T_LINK_PREF = getProp(casePfx+"t.link.pref","//a[contains(@id,''def-list:portlet-pref-{0}'')]");
+    private final String SUBMIT_CREATE_INST = getProp(casePfx+"submit.create.inst","//input[contains(@name,'add_instance_form:j_id19')]");
+    private final String INPUT_INSTANCE_NAME = getProp(casePfx+"input.instance.name","//input[contains(@id,'add_instance_form:instanceId')]");
+    private final String T_LINK_CREATE = getProp(casePfx+"t.link.create","//a[contains(@id,''def-list:create-instance-{0}'')]");
+    private final String SUBMIT_PROVIDER_VIEW = getProp(casePfx+"submit.provider.view","//input[contains(@id,'definition-form:view-portlets')]");
+    private final String SELECT_PROVIDER = getProp(casePfx+"select.provider","//select[contains(@id,'definition-form:menu')]");
+    private final String TABLE_PORTLET = getProp(casePfx+"table.portlet","//form[contains(@id,'def-list')]/table");
+    private final String LINK_NAME_ADMIN_PORT = getProp(casePfx+"link.name.admin.port","//a[contains(@id,'common-show-portlet-detail-form:field1:select')]");
+    private final String LINK_ADMIN_PORT = getProp(casePfx+"link.admin.port","//a[contains(@id,'def-list:portlet-def-0')]");
+    private final String LINK_ADMIN = getProp(casePfx+"link.admin","link=Admin");
+    private final String LINK_TAB_PD = getProp(casePfx+"link.tab.pd","//a[contains(@id,'admin-subtab-form:portlet-def-link')]");
+    private final String LINK_PD_MAIN = getProp(casePfx+"link.pd.main","//a[contains(@id,'man-form:def-link')]");
+
+	
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 		goToPD();
 	}
@@ -60,6 +64,20 @@
 	}
 	
 	@Test(enabled = true)
+	public void testCreateInstanceUncommonName(){
+		
+		int r = findTableRow(TABLE_PORTLET, "Administration Portlet", 0);
+		
+		selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+
+		selenium.type(INPUT_INSTANCE_NAME, "str.nge.n.me");
+		selenium.click(SUBMIT_CREATE_INST);
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		Assert.assertTrue(selenium.isTextPresent("str.nge.n.me"+" portlet details"));
+	}
+	
+	@Test(enabled = true)
 	public void testPreferences(){
 		
 		int r = findTableRow(TABLE_PORTLET, "Current Users Portlet", 0);

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java	2009-03-06 23:23:00 UTC (rev 12987)
@@ -10,53 +10,66 @@
 
 public class PortletInstancesTestCase extends JBossPortalSeleniumTestCase {
 
-	private static final String SUBMIT_SECURITY_UPDATE = "common-edit-security-form:update";
-	private static final String SUBMIT_SECURITY_CANCEL = "common-edit-security-form:cancel";
+	public final String casePfx = "portal.port.ins.";
 
-	private static final String LINK_PREF_WELCOMEPORT = "instances-form:security-JSPPortletInstance";
+	private final String TAB_PORTLET_INSTANCES = getProp(casePfx + "tab.portlet.instances", "//table[contains(@id,'instancesTable2')]");
+	private final String UL_PAGINATOR = getProp(casePfx + "ul.paginator", "//ul[@class='pagination property-container']");
+	private final String SUBMIT_SECURITY_UPDATE = getProp(casePfx + "submit.security.update", "//input[contains(@id,'common-edit-security-form:update')]");
+	private final String SUBMIT_SECURITY_CANCEL = getProp(casePfx + "submit.security.cancel", "//input[contains(@id,'common-edit-security-form:cancel')]");
+	private final String LINK_20_PAGE = getProp(casePfx + "link.20.page", "link=20");
+	private final String LINK_PREF_WELCOMEPORT = getProp(casePfx + "link.pref.welcomeport", "//a[contains(@id,'security-JSPPortletInstance')]");
+	private final String TABLE_PREF_KEY = getProp(casePfx + "table.pref.key", "//form[contains(@id,'common-edit-pref-form')]/table");
+	private final String SUBMIT_PREF_DELETE = getProp(casePfx + "submit.pref.delete", "//input[contains(@id,'common-edit-exisiting-form:row_0')]");
+	private final String LINK_PREF_GUESTNUM = getProp(casePfx + "link.pref.guestnum", "//a[contains(@id,'common-edit-pref-form:pref-link-0')]");
+	private final String INPUT_PREF_NEWVAL = getProp(casePfx + "input.pref.newval", "//input[contains(@id,'common-append-form:new_value')]");
+	private final String SUBMIT_PREF_UPDATE = getProp(casePfx + "submit.pref.update", "//input[contains(@id,'common-append-form:append-button')]");
+	private final String SUBMIT_PREF_SAVE = getProp(casePfx + "submit.pref.save", "//input[contains(@id,':save')]");
+	private final String INPUT_PREF_UPDATE = getProp(casePfx + "input.pref.update", "//input[contains(@id,'common-edit-exisiting-form:update')]");
+	private final String INPUT_PREF_APPEND = getProp(casePfx + "input.pref.append", "//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]");
+	private final String SUBMIT_PREF_CANCEL = getProp(casePfx + "submit.pref.cancel", "//input[contains(@id,':cancel')]");
+	private final String LINK_CURUSER_PREFERENCES = getProp(casePfx + "link.curuser.preferences","//a[contains(@id,'instances-form:preference-CurrentUsersPortletInstance')]");
+	private final String LINK_DEL_EXCEPTPORT = getProp(casePfx + "link.del.exceptport", "//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]");
+	private final String SUBMIT_PI_DELETE_CONF = getProp(casePfx + "submit.pi.delete.conf", "//input[contains(@id,'confirm-delete-form1:delete')]");
+	private final String SUBMIT_PI_DELETE_CANC = getProp(casePfx + "submit.pi.delete.canc", "//input[contains(@id,'confirm-delete-form1:cancel')]");
+	private final String T_LINK_DELETENAME = getProp(casePfx + "t.link.deletename","//a[contains(@id,''instance-display-form:locale-datatable:{0}:delete-link'')]");
+	private final String T_LINK_MODIFYNAME = getProp(casePfx + "t.link.modifyname","//a[contains(@id,''instance-display-form:locale-datatable:{0}:edit-link'')]");
+	private final String LINK_COUNTPORT = getProp(casePfx + "link.countport", "//a[contains(@id,'instances-form:CurrentUsersPortletInstance')]");
+	private final String NAME_COUNTPORT = getProp(casePfx + "name.countport", "CurrentUsersPortletInstance");
+	private final String SUBMIT_MODIFY_NAME = getProp(casePfx + "submit.modify.name", "//input[contains(@id,'add-display-name-form:addDisplay')]");
+	private final String INPUT_NAME = getProp(casePfx + "input.name", "//input[contains(@id,'add-display-name-form:newName')]");
+	private final String SELECT_LANGUAGE = getProp(casePfx + "select.language", "//select[contains(@id,'add-display-name-form:locales')]");
+	private final String LINK_ADMIN = getProp(casePfx + "link.admin", "link=Admin");
+	private final String LINK_TAB_PI = getProp(casePfx + "link.tab.pi", "//a[contains(@id,'admin-subtab-form:portlet-instance-link')]");
+	private final String LINK_PI_MAIN = getProp(casePfx + "link.pi.main", "//a[contains(@id,'instance-form1:instance-link')]");
+	private final String TABLE_DISPNAMES = getProp(casePfx + "table.dispnames", "//table[contains(@id,'instance-display-form:locale-datatable')]");
+	private final String LNK_SEC_BUTTON = getProp(casePfx + "lnk.sec.button","//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''Security'')]");
+	private final String LNK_PREF_BUTTON = getProp(casePfx + "lnk.pref.button","//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionPreferences'')]");
+	private final String LNK_DEL_BUTTON = getProp(casePfx + "lnk.del.button","//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionDeleteInstance'')]");
+	private final String LNK_INSTANCE_BUTTON = getProp(casePfx + "lnk.instance.button", "//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td[1]/a[1]");
 
-	private static final String TABLE_PREF_KEY = "//form[@id='common-edit-pref-form']/table";
+	// private final String LNK_PREF_WELCOMEPORT =
+	// "//a[contains(@id,'security-JSPPortletInstance')]";
 
-	private static final String SUBMIT_PREF_DELETE = "common-edit-exisiting-form:row_0";
-	private static final String LINK_PREF_GUESTNUM = "common-edit-pref-form:pref-link-0";
-	private static final String INPUT_PREF_NEWVAL = "common-append-form:new_value";
-	private static final String SUBMIT_PREF_UPDATE = "common-append-form:append-button";
-	private static final String SUBMIT_PREF_SAVE = "_id919jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:save";
-	private static final String INPUT_PREF_UPDATE = "common-edit-exisiting-form:update";
-	private static final String INPUT_PREF_APPEND = "common-edit-exisiting-form:pref-input-0";
-	private static final String SUBMIT_PREF_CANCEL = "_id458jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:cancel";
-	private static final String LINK_CURUSER_PREFERENCES = "instances-form:preference-CurrentUsersPortletInstance";
-	private static final String LINK_DEL_EXCEPTPORT = "instances-form:delete-ExceptionPortletInstance";
-	private static final String SUBMIT_PI_DELETE_CONF = "confirm-delete-form1:delete";
-	private static final String SUBMIT_PI_DELETE_CANC = "confirm-delete-form1:cancel";
-	private static final String T_LINK_DELETENAME = "displaynamecontainer:instance-display-form:locale-data-table:{0}:delete-link";
-	private static final String T_LINK_MODIFYNAME = "displaynamecontainer:instance-display-form:locale-data-table:{0}:edit-link";
-	private static final String LINK_COUNTPORT = "instances-form:CounterPortletInstance";
-	private static final String SUBMIT_MODIFY_NAME = "displaynamecontainer:displayNameForm:addDisplay";
-	private static final String INPUT_NAME = "displaynamecontainer:displayNameForm:newName";
-	private static final String SELECT_LANGUAGE = "displaynamecontainer:displayNameForm:locales";
-	private static final String LINK_ADMIN = "link=Admin";
-	private static final String LINK_TAB_PI = "admin-subtab-form:portlet-instance-link";
-	private static final String LINK_PI_MAIN = "instance-form1:instance-link";
-	private static final String TABLE_DISPNAMES = "displaynamecontainer:instance-display-form:locale-data-table";
-
 	@BeforeMethod(groups = { "log" })
 	public void loginBeforeTest() {
+		logoutIfPossible();
 		login("admin", "admin");
 		goToPI();
 	}
 
 	@AfterMethod(groups = { "log" })
 	public void logoutAfterTest() {
-		logout();
+
 	}
 
 	@Test(enabled = true)
 	public void testAddName() {
-		clickAndWait(LINK_COUNTPORT);
-		
-		safeSelect(SELECT_LANGUAGE, "Czech");
-		final String name = "Administracny";
+		int r = traversePortlets(NAME_COUNTPORT, 0);
+		clickAndWait(MessageFormat.format(LNK_INSTANCE_BUTTON, r));
+
+		safeSelect(SELECT_LANGUAGE, "English");
+
+		final String name = "Administracning";
 		selenium.type(INPUT_NAME, name);
 		clickAndWait(SUBMIT_MODIFY_NAME);
 		Assert.assertTrue(findTableRow(TABLE_DISPNAMES, name, 1) >= 0);
@@ -65,7 +78,9 @@
 	@Test(enabled = true)
 	public void testDeleteName() {
 		// adding the name
-		selenium.click(LINK_COUNTPORT);
+		int r = traversePortlets(NAME_COUNTPORT, 0);
+		clickAndWait(MessageFormat.format(LNK_INSTANCE_BUTTON, r));
+
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.select(SELECT_LANGUAGE, "label=Japanese");
 		final String name = "Aduminu";
@@ -75,7 +90,7 @@
 
 		// deleting name
 
-		int r = findTableRow(TABLE_DISPNAMES, name, 1);
+		r = findTableRow(TABLE_DISPNAMES, name, 1);
 
 		selenium.click(MessageFormat.format(T_LINK_DELETENAME, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -85,9 +100,9 @@
 
 	@Test(enabled = true)
 	public void testModifyName() {
-		// adding the name
-		selenium.click(LINK_COUNTPORT);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		int r = traversePortlets(NAME_COUNTPORT, 0);
+		clickAndWait(MessageFormat.format(LNK_INSTANCE_BUTTON, r));
+
 		selenium.select(SELECT_LANGUAGE, "label=Japanese");
 		final String name = "Adminisimo";
 		final String nameNew = "Adminiprisimo";
@@ -98,7 +113,7 @@
 
 		// midifying name
 
-		int r = findTableRow(TABLE_DISPNAMES, name, 1);
+		r = findTableRow(TABLE_DISPNAMES, name, 1);
 
 		selenium.click(MessageFormat.format(T_LINK_MODIFYNAME, r - 1));
 		selenium.waitForPageToLoad(PAGE_LOAD);
@@ -112,86 +127,137 @@
 
 	@Test(enabled = true)
 	public void testSecure() {
-		// "common-edit-security-form:cancel"
-		selenium.click(LINK_PREF_WELCOMEPORT);
-		selenium.waitForPageToLoad("30000");
-		selenium.click("//input[@name='common-edit-security-form:cars_2']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1']");
-		selenium.click("//input[@name='common-edit-security-form:cars_0']");
-		selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
+		String instance_name = "JSPPortletInstance";
+		// String table = TAB_PORTLET_INSTANCES;
+
+		// selenium.click(LINK_20_PAGE);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+
+		// int r = findTableRow(table, instance_name, 0);
+		int r = traversePortlets(instance_name, 0);
+		selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
+
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_2')]");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
 		selenium.click(SUBMIT_SECURITY_UPDATE);
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.open("/portal/auth/portal/default/");
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Greetings !"));
 
 		// then cancel
-		selenium.click("link=Admin");
-		selenium.waitForPageToLoad("30000");
-		selenium.click(LINK_PREF_WELCOMEPORT);
-		selenium.waitForPageToLoad("30000");
-		selenium.click("//input[@name='common-edit-security-form:cars_0']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1']");
+
+		goToPI();
+		// selenium.click(LINK_20_PAGE);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+
+		// r = findTableRow(table, instance_name, 0);
+		r = traversePortlets(instance_name, 0);
+
+		selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
 		selenium.click(SUBMIT_SECURITY_CANCEL);
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.open("/portal/auth/portal/default/");
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(selenium.isTextPresent("Greetings !"));
 
 		// then really stop the greetings portlet
-		selenium.click("link=Admin");
-		selenium.waitForPageToLoad("30000");
-		selenium.click(LINK_PREF_WELCOMEPORT);
-		selenium.waitForPageToLoad("30000");
-		selenium.click("//input[@name='common-edit-security-form:cars_0']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
-		selenium.click("//input[@name='common-edit-security-form:cars_1']");
+		goToPI();
+		// selenium.setSpeed("5000");
+		// selenium.click(LINK_20_PAGE);
+		// selenium.waitForPageToLoad(PAGE_LOAD);
+		// r = findTableRow(table, instance_name, 0);
+		r = traversePortlets(instance_name, 0);
+		selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
+		selenium.waitForPageToLoad(PAGE_LOAD);
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_0') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
+		selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
 		selenium.click(SUBMIT_SECURITY_UPDATE);
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 
 		selenium.open("/portal/auth/portal/default/");
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertFalse(selenium.isTextPresent("Greetings !"));
 	}
 
 	@Test(enabled = true)
 	public void testDeleteInstance() {
 		// cancel first
-		Assert.assertTrue(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet not found.");
-		selenium.click(LINK_DEL_EXCEPTPORT);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		String instance_name = "WeatherPortletInstance";
+		// selenium.setSpeed("5000");
+		int r = traversePortlets(instance_name, 1);
+
+		Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(LNK_INSTANCE_BUTTON, r)), instance_name + " portlet not found.");
+		clickAndWait(MessageFormat.format(LNK_DEL_BUTTON, r));
+
 		Assert.assertTrue(selenium.isTextPresent("WARNING!"));
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
 		selenium.click(SUBMIT_PI_DELETE_CANC);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+
 		// delete
 		goToPI();
-		Assert.assertTrue(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet not found.");
-		selenium.click(LINK_DEL_EXCEPTPORT);
-		selenium.waitForPageToLoad(PAGE_LOAD);
+		r = traversePortlets(instance_name, 1);
+		Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(LNK_INSTANCE_BUTTON, r)), instance_name + " portlet not found.");
+		clickAndWait(MessageFormat.format(LNK_DEL_BUTTON, r));
+
 		Assert.assertTrue(selenium.isTextPresent("WARNING!"));
 		Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
 		selenium.click(SUBMIT_PI_DELETE_CONF);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		Assert.assertFalse(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet found after deletition.");
+
+		r = traversePortlets(instance_name, 1);
+		Assert.assertFalse(selenium.isElementPresent(MessageFormat.format(LNK_INSTANCE_BUTTON, r)), "previously deleted " + instance_name + " portlet found.");
+
 	}
+	
+	@Test(enabled = true)
+	public void testPaginator() {
 
+		int r = countTableRows(TAB_PORTLET_INSTANCES);
+
+		String pages[] = getPages(UL_PAGINATOR);
+		for (String page : pages) {
+			if ("".equals(page.trim()))
+				continue;
+			selenium.click("link=" + page);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+			r = countTableRows(TAB_PORTLET_INSTANCES);
+			
+			Assert.assertTrue(r>0,"on instances on paginator page");
+		}
+
+	}
+
 	@Test(enabled = true)
 	public void testPreferences() {
-		int r;
-		selenium.click(LINK_CURUSER_PREFERENCES);
+
+		int r = traversePortlets(NAME_COUNTPORT, 0);
+		clickAndWait(MessageFormat.format(LNK_PREF_BUTTON, r));
+		// selenium.click(LINK_CURUSER_PREFERENCES);
+
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		selenium.click(SUBMIT_PREF_CANCEL);
 		selenium.waitForPageToLoad(PAGE_LOAD);
-		selenium.click(LINK_CURUSER_PREFERENCES);
+
+		r = traversePortlets(NAME_COUNTPORT, 0);
+		clickAndWait(MessageFormat.format(LNK_PREF_BUTTON, r));
+
 		selenium.waitForPageToLoad(PAGE_LOAD);
 		Assert.assertTrue(findTableRow(TABLE_PREF_KEY, "guestNumber", 0) >= 0);
 		selenium.click(LINK_PREF_GUESTNUM);
@@ -218,8 +284,47 @@
 		Assert.assertEquals(selenium.getText(TABLE_PREF_KEY + "/tbody/tr[" + r + "]/td[4]"), "[viliam]");
 		selenium.click(SUBMIT_PREF_SAVE);
 		selenium.waitForPageToLoad(PAGE_LOAD);
+	
 	}
 
+	// acquiring link names from paginator
+	private String[] getPages(String paginator_location) {
+
+		String pagi = selenium.getText(paginator_location);
+		String[] pages = pagi.split(" ");
+
+		return pages;
+	}
+
+	/*
+	 * function for traversing the portles in the portles table. when a string
+	 * in selected columns is not found, links form paginator are used to look
+	 * to the next page
+	 */
+	private int traversePortlets(String instance_name, int row) {
+
+		int r = -1;
+
+		r = findTableRow(TAB_PORTLET_INSTANCES, instance_name, row);
+
+		if (r >= 0)
+			return r;
+
+		String pages[] = getPages(UL_PAGINATOR);
+		for (String page : pages) {
+			if ("".equals(page.trim()))
+				continue;
+			selenium.click("link=" + page);
+			selenium.waitForPageToLoad(PAGE_LOAD);
+			r = findTableRow(TAB_PORTLET_INSTANCES, instance_name, row);
+
+			if (r >= 0)
+				break;
+		}
+
+		return r;
+	}
+
 	private void goToPI() {
 		selenium.open(ADDR_PORTAL);
 		clickIfVisible(LINK_ADMIN);

Modified: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/testng.xml	2009-03-06 23:22:50 UTC (rev 12986)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/testng.xml	2009-03-06 23:23:00 UTC (rev 12987)
@@ -1,6 +1,6 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
 <suite name="SeleniumTest">
-  
+
   <test verbose="2" name="org.jboss.portal.test.selenium.UserLoginTestCase" annotations="JDK">
     <classes>
       <class name="org.jboss.portal.test.selenium.UserLoginTestCase"/>
@@ -27,7 +27,37 @@
   	<classes>
   		<class name="org.jboss.portal.test.selenium.UserInterceptorPortletTestCase"></class></classes>
   </test>
+  
+  <test name="org.jboss.portal.test.selenium.DashboardTestCase"
+  	verbose="2" annotations="JDK">
+  	<classes>
+  		<class name="org.jboss.portal.test.selenium.DashboardTestCase"></class></classes>
+  </test>
 
+  <test name="org.jboss.portal.test.selenium.portal.AdminPortalTestCase"
+  	verbose="2" annotations="JDK">
+  	<classes>
+  		<class name="org.jboss.portal.test.selenium.portal.AdminPortalTestCase"></class></classes>
+  </test>
+  
+  <test name="org.jboss.portal.test.selenium.portal.PortletDefinitionsTestCase"
+  	verbose="2" annotations="JDK">
+  	<classes>
+  		<class name="org.jboss.portal.test.selenium.portal.PortletDefinitionsTestCase"></class></classes>
+  </test>
+  
+  <test name="org.jboss.portal.test.selenium.portal.PortletInstancesTestCase"
+  	verbose="2" annotations="JDK">
+  	<classes>
+  		<class name="org.jboss.portal.test.selenium.portal.PortletInstancesTestCase"></class></classes>
+  </test>
+
+  <test name="org.jboss.portal.test.selenium.portal.PageCoordinationTestCase"
+  	verbose="2" annotations="JDK">
+  	<classes>
+  		<class name="org.jboss.portal.test.selenium.portal.PageCoordinationTestCase"></class></classes>
+  </test>
+
   <test name="org.jboss.portal.test.selenium.cms.CMSFileTestCase"
   	verbose="2" annotations="JDK">
   	<classes>
@@ -45,7 +75,7 @@
   	<classes>
   		<class name="org.jboss.portal.test.selenium.cms.CMSDirectoryTestCase"></class></classes>
   </test>
-  -->
+  
   <test name="org.jboss.portal.test.selenium.cms.CMSFileUploadTestCase"
   	verbose="2" annotations="JDK">
   	<classes>
@@ -58,19 +88,20 @@
   		<class name="org.jboss.portal.test.selenium.cms.CMSArchiveUploadTestCase"></class></classes>
   </test>
 
-  <test name="org.jboss.portal.test.selenium.DashboardTestCase"
+  <test name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"
   	verbose="2" annotations="JDK">
   	<classes>
-  		<class name="org.jboss.portal.test.selenium.DashboardTestCase"></class></classes>
+  		<class name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"></class></classes>
   </test>
 
-  <test name="org.jboss.portal.test.selenium.portal.AdminPortalTestCase"
+  <test name="org.jboss.portal.test.selenium.EndToEndBeaPortlet"
   	verbose="2" annotations="JDK">
   	<classes>
-  		<class name="org.jboss.portal.test.selenium.portal.AdminPortalTestCase"></class></classes>
+  		<class name="org.jboss.portal.test.selenium.EndToEndBeaPortlet"></class></classes>
   </test>
-<!--
+
 <listeners>
-  	<listener class-name="org.testng.reporters.JUnitXMLReporter"></listener></listeners>
--->
+<!--  	<listener class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
+	<listener class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>
+</listeners>
 </suite>

Copied: branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/usecaseng.xml (from rev 12964, branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/usecaseng.xml)
===================================================================
--- branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/usecaseng.xml	                        (rev 0)
+++ branches/JBoss_Portal_AS5_Deployer/testsuite/ui-tests/usecaseng.xml	2009-03-06 23:23:00 UTC (rev 12987)
@@ -0,0 +1,14 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="SeleniumTest">
+
+  <test verbose="2" name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase" annotations="JDK">
+    <classes>
+      <class name="org.jboss.portal.test.selenium.portal.EndtoEndPortalAdminTestCase"/>
+    </classes>
+  </test>
+
+<listeners>
+<!--  	<listener class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
+	<listener class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>
+</listeners>
+</suite>




More information about the portal-commits mailing list