[richfaces-svn-commits] JBoss Rich Faces SVN: r15848 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: java/org/jboss/richfaces/integrationTest/ajaxForm and 13 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Nov 6 12:32:10 EST 2009


Author: ppitonak at redhat.com
Date: 2009-11-06 12:32:08 -0500 (Fri, 06 Nov 2009)
New Revision: 15848

Modified:
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/fileUpload/FileUploadTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/listShuttle/ListShuttleTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/pickList/PickListTestCase.java
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/fileUpload/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/listShuttle/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/orderingList/locators.properties
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/pickList/locators.properties
Log:
* method openComponent in AbstractSeleniumRichfacesTestCase refactored
* XPath locators rewritten to jQuery

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -292,11 +292,12 @@
         // wait for new page is opened
         selenium.waitForPageToLoad("5000");
 
-        // if component's page is already opened, skin selecting from menu
-        if (isComponentPageActive(componentName)) {
-            return;
-        }
-
+        Wait.until(new Condition() {
+            public boolean isTrue() {
+                return selenium.isElementPresent(LOC_MENU_ITEM);
+            }
+        });
+        
         // click the menu item
         selenium.click(LOC_MENU_ITEM);
 

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -37,9 +37,8 @@
 	private String LOC_LEGEND_HEADER = getLoc("LEGEND_HEADER");
 	private String LOC_BUTTON_AJAX = getLoc("BUTTON_AJAX");
 	private String LOC_BUTTON_NON_AJAX = getLoc("BUTTON_NON_AJAX");
-	private String LOC_OUTPUT_TEXT_RELATIVE = getLoc("OUTPUT_TEXT_RELATIVE");
-	private String LOC_OUTPUT_AJAX = format(LOC_OUTPUT_TEXT_RELATIVE, LOC_BUTTON_AJAX);
-	private String LOC_OUTPUT_NON_AJAX = format(LOC_OUTPUT_TEXT_RELATIVE, LOC_BUTTON_NON_AJAX);
+	private String LOC_OUTPUT_AJAX = getLoc("OUTPUT_AJAX");
+	private String LOC_OUTPUT_NON_AJAX = getLoc("OUTPUT_NON_AJAX");
 
 	private final String MSG_OUTPUT_NON_AJAX = getMsg("OUTPUT_NON_AJAX");
 	private final String MSG_OUTPUT_AJAX = getMsg("OUTPUT_AJAX");

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -35,12 +35,11 @@
  * @version $Revision$
  */
 public class AjaxRegionTestCase extends AbstractSeleniumRichfacesTestCase {
-	private final String LOC_INPUT_RELATIVE = getLoc("INPUT_RELATIVE");
-	private final String LOC_INPUT_TEST1_NAME1 = format(LOC_INPUT_RELATIVE, 1, 1, 1);
-	private final String LOC_INPUT_TEST1_JOB1 = format(LOC_INPUT_RELATIVE, 1, 1, 2);
-	private final String LOC_INPUT_TEST1_NAME2 = format(LOC_INPUT_RELATIVE, 1, 2, 1);
-	private final String LOC_INPUT_TEST2_NAME1 = format(LOC_INPUT_RELATIVE, 2, 1, 1);
-	private final String LOC_INPUT_TEST2_NAME2 = format(LOC_INPUT_RELATIVE, 2, 2, 1);
+	private final String LOC_INPUT_TEST1_NAME1 = getLoc("INPUT_TEST1_NAME1");
+	private final String LOC_INPUT_TEST1_JOB1 = getLoc("INPUT_TEST1_JOB1");
+	private final String LOC_INPUT_TEST1_NAME2 = getLoc("INPUT_TEST1_NAME2");
+	private final String LOC_INPUT_TEST2_NAME1 = getLoc("INPUT_TEST2_NAME1");
+	private final String LOC_INPUT_TEST2_NAME2 = getLoc("INPUT_TEST2_NAME2");
 	private final String LOC_OUTPUT_VALIDATION_MESSAGE = getLoc("OUTPUT_VALIDATION_MESSAGE");
 	private final String LOC_OUTPUT_TEST1_TYPED_NAME = getLoc("OUTPUT_TEST1_TYPED_NAME");
 	private final String LOC_OUTPUT_TEST2_TYPED_NAME = getLoc("OUTPUT_TEST2_TYPED_NAME");

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -33,7 +33,7 @@
  */
 public class AjaxSupportTestCase extends AbstractSeleniumRichfacesTestCase {
 	private String LOC_INPUT_TEXT = getLoc("INPUT_TEXT");
-	private String LOC_OUTPUT_TEXT_RELATIVE = formatLoc("OUTPUT_TEXT_RELATIVE", LOC_INPUT_TEXT);
+	private String LOC_OUTPUT_TEXT = getLoc("OUTPUT_TEXT");
 
 	private String MSG_INPUT_NON_EMPTY = getMsg("INPUT_NON_EMPTY");
 
@@ -70,7 +70,7 @@
 		selenium.fireEvent(LOC_INPUT_TEXT, Event.KEYUP);
 
 		waitFor(Wait.DEFAULT_INTERVAL);
-		waitForTextEquals(LOC_OUTPUT_TEXT_RELATIVE, MSG_INPUT_NON_EMPTY);
+		waitForTextEquals(LOC_OUTPUT_TEXT, MSG_INPUT_NON_EMPTY);
 	}
 
 	public void empty() {

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/fileUpload/FileUploadTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/fileUpload/FileUploadTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/fileUpload/FileUploadTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -90,7 +90,7 @@
 
     // locators
     private final String LOC_EXAMPLE_HEADER = getLoc("EXAMPLE_HEADER");
-    private final String LOC_ADD_BUTTON_N = getLoc("ADD_BUTTON_N");
+    private final String LOC_ADD_BUTTON = getLoc("ADD_BUTTON");
     private final String LOC_ADD_BUTTON_CLASS = getLoc("ADD_BUTTON_CLASS");
     private final String LOC_UPLOAD_BUTTON = getLoc("UPLOAD_BUTTON");
     private final String LOC_UPLOAD_BUTTON_STYLE = getLoc("UPLOAD_BUTTON_STYLE");
@@ -125,7 +125,7 @@
         String text = selenium.getText(LOC_UPLOADED_FILES_INFO);
         assertEquals(text, "No files currently uploaded", MSG_RIGHT_PANEL_CONTENT);
 
-        int count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
         assertTrue(!belongsClass("rich-fileupload-button-dis", LOC_ADD_BUTTON_CLASS), MSG_ADD_BUTTON_ENABLED);
@@ -135,9 +135,9 @@
         boolean isPresent = selenium.isElementPresent(LOC_CLEAR_UPLOADED_DATA_BUTTON);
         assertFalse(isPresent, MSG_CLEAR_UPLOADED_DATA_BUTTON_NOT_VISIBLE);
 
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
 
-        count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 1, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
         assertTrue(!belongsClass("rich-fileupload-button-dis", LOC_ADD_BUTTON_CLASS), MSG_ADD_BUTTON_ENABLED);
@@ -167,50 +167,50 @@
      */
     @Test
     void testFilesToBeUploadedInfo() {
-        int count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_BLUE);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_BLUE);
 
-        count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 2, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
-        String text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 1));
+        String text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 0));
         assertEquals(text, "selenium-test" + Color.YELLOW.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 2));
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 1));
         assertEquals(text, "selenium-test" + Color.BLUE.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 2));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 0));
+        assertEquals(text, "Cancel", format(MSG_LEFT_PANEL_CANCEL_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 1));
-        assertEquals(text, "Cancel", format(MSG_LEFT_PANEL_CANCEL_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 2));
         assertEquals(text, "Cancel", format(MSG_LEFT_PANEL_CANCEL_N, 2));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 0));
+        assertEquals(text, "", format(MSG_LEFT_PANEL_DONE_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 1));
         assertEquals(text, "", format(MSG_LEFT_PANEL_DONE_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 2));
-        assertEquals(text, "", format(MSG_LEFT_PANEL_DONE_N, 1));
 
         selenium.click(LOC_UPLOAD_BUTTON);
         waitFor(2000);
 
-        count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 2, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 0));
+        assertEquals(text, "selenium-test" + Color.YELLOW.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 1));
-        assertEquals(text, "selenium-test" + Color.YELLOW.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 2));
         assertEquals(text, "selenium-test" + Color.BLUE.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 2));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 0));
+        assertEquals(text, "Clear", format(MSG_LEFT_PANEL_CANCEL_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 1));
         assertEquals(text, "Clear", format(MSG_LEFT_PANEL_CANCEL_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 2));
-        assertEquals(text, "Clear", format(MSG_LEFT_PANEL_CANCEL_N, 1));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 0));
+        assertEquals(text, "Done", format(MSG_LEFT_PANEL_DONE_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 1));
         assertEquals(text, "Done", format(MSG_LEFT_PANEL_DONE_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 2));
-        assertEquals(text, "Done", format(MSG_LEFT_PANEL_DONE_N, 1));
     }
 
     /**
@@ -220,29 +220,29 @@
      */
     @Test
     public void testUploadedFilesInfo() {
-        int count = selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_RIGHT_PANEL_NUMBER_OF_ITEMS);
 
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_CYAN);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_ORANGE);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_CYAN);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_ORANGE);
 
         selenium.click(LOC_UPLOAD_BUTTON);
 
-        count = selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_RIGHT_PANEL_NUMBER_OF_ITEMS);
 
         waitForElement(format(LOC_UPLOADED_LIST_N_NAME, 1));
 
-        String text = selenium.getText(format(LOC_UPLOADED_LIST_N_NAME, 1));
+        String text = selenium.getText(format(LOC_UPLOADED_LIST_N_NAME, 0));
         assertEquals(text, "selenium-test" + Color.CYAN.getRGB() + ".jpg", format(MSG_RIGHT_PANEL_NAME_N, 1));
-        text = selenium.getText(format(LOC_UPLOADED_LIST_N_NAME, 2));
+        text = selenium.getText(format(LOC_UPLOADED_LIST_N_NAME, 1));
         assertEquals(text, "selenium-test" + Color.ORANGE.getRGB() + ".jpg", format(MSG_RIGHT_PANEL_NAME_N, 2));
 
-        long size1 = Long.parseLong(selenium.getText(format(LOC_UPLOADED_LIST_N_SIZE, 1)));
+        long size1 = Long.parseLong(selenium.getText(format(LOC_UPLOADED_LIST_N_SIZE, 0)));
         long size2 = new File(FILE_CYAN).length();
         assertEquals(size1, size2, format(MSG_RIGHT_PANEL_SIZE_N, 1));
 
-        size1 = Long.parseLong(selenium.getText(format(LOC_UPLOADED_LIST_N_SIZE, 2)));
+        size1 = Long.parseLong(selenium.getText(format(LOC_UPLOADED_LIST_N_SIZE, 1)));
         size2 = new File(FILE_ORANGE).length();
         assertEquals(size1, size2, format(MSG_RIGHT_PANEL_SIZE_N, 1));
 
@@ -266,13 +266,13 @@
     public void testAutomaticUpload() {
         selenium.click(LOC_AUTOMATIC_UPLOAD);
 
-        int count = selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_RIGHT_PANEL_NUMBER_OF_ITEMS);
 
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_CYAN);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_CYAN);
 
         waitForElement(LOC_UPLOADED_LIST_TR);
-        count = selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_UPLOADED_LIST_TR);
         assertEquals(count, 1, MSG_RIGHT_PANEL_NUMBER_OF_ITEMS);
     }
 
@@ -283,11 +283,11 @@
     public void testUploadFiveFiles() {
         assertTrue(!belongsClass("rich-fileupload-button-dis", LOC_ADD_BUTTON_CLASS), MSG_ADD_BUTTON_ENABLED);
 
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_BLUE);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 3), "file://" + FILE_CYAN);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 4), "file://" + FILE_ORANGE);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 5), "file://" + FILE_RED);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_BLUE);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_CYAN);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_ORANGE);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_RED);
 
         assertFalse(!belongsClass("rich-fileupload-button-dis", LOC_ADD_BUTTON_CLASS), MSG_ADD_BUTTON_NOT_ENABLED);
     }
@@ -299,30 +299,30 @@
      */
     @Test
     public void testUploadBigFile() {
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_BIG);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_BIG);
 
         selenium.click(LOC_UPLOAD_BUTTON);
         
         Wait.failWith(MSG_RIGHT_PANEL_NUMBER_OF_ITEMS).until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue() == 1;
+                return getJQueryCount(LOC_UPLOADED_LIST_TR) == 1;
             }
         });
 
-        String text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 1));
+        String text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 0));
         assertEquals(text, "selenium-test" + Color.YELLOW.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 2));
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_NAME, 1));
         assertEquals(text, "selenium-test" + Color.GREEN.getRGB() + ".jpg", format(MSG_LEFT_PANEL_NAME_N, 2));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 0));
+        assertEquals(text, "Clear", format(MSG_LEFT_PANEL_CANCEL_N, 1));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 1));
-        assertEquals(text, "Clear", format(MSG_LEFT_PANEL_CANCEL_N, 1));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_CANCEL, 2));
         assertEquals(text, "Cancel", format(MSG_LEFT_PANEL_CANCEL_N, 2));
 
+        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 0));
+        assertEquals(text, "Done", format(MSG_LEFT_PANEL_DONE_N, 2));
         text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 1));
-        assertEquals(text, "Done", format(MSG_LEFT_PANEL_DONE_N, 2));
-        text = selenium.getText(format(LOC_NOT_UPLOADED_LIST_N_DONE, 2));
         assertEquals(text, "File size restricted", format(MSG_LEFT_PANEL_DONE_N, 2));
     }
 
@@ -333,8 +333,8 @@
      */
     @Test
     public void testClearAllButton() {
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_CYAN);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_CYAN);
 
         assertFalse(isDisplayed(LOC_CLEAR_ALL_BUTTON_STYLE), MSG_CLEAR_ALL_BUTTON_NOT_VISIBLE);
 
@@ -347,7 +347,7 @@
 
         assertFalse(isDisplayed(LOC_CLEAR_ALL_BUTTON_STYLE), MSG_CLEAR_ALL_BUTTON_NOT_VISIBLE);
 
-        int count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
     }
 
@@ -360,8 +360,8 @@
      */
     @Test
     public void testClearUploadedDataButton() {
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 1), "file://" + FILE_YELLOW);
-        selenium.attachFile(format(LOC_ADD_BUTTON_N, 2), "file://" + FILE_CYAN);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_YELLOW);
+        selenium.attachFile(LOC_ADD_BUTTON, "file://" + FILE_CYAN);
 
         assertFalse(selenium.isElementPresent(LOC_CLEAR_UPLOADED_DATA_BUTTON),
                 MSG_CLEAR_UPLOADED_DATA_BUTTON_NOT_VISIBLE);
@@ -385,10 +385,10 @@
         assertFalse(selenium.isElementPresent(LOC_CLEAR_UPLOADED_DATA_BUTTON),
                 MSG_CLEAR_UPLOADED_DATA_BUTTON_NOT_VISIBLE);
 
-        int count = selenium.getXpathCount(LOC_NOT_UPLOADED_LIST_TR).intValue();
+        int count = getJQueryCount(LOC_NOT_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_LEFT_PANEL_NUMBER_OF_ITEMS);
 
-        count = selenium.getXpathCount(LOC_UPLOADED_LIST_TR).intValue();
+        count = getJQueryCount(LOC_UPLOADED_LIST_TR);
         assertEquals(count, 0, MSG_RIGHT_PANEL_NUMBER_OF_ITEMS);
     }
 

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/listShuttle/ListShuttleTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/listShuttle/ListShuttleTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/listShuttle/ListShuttleTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -62,22 +62,20 @@
      */
     @Test
     public void testCopyButton() {
-        int leftCount = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
-        int rightCount = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        int leftCount = getJQueryCount(LOC_LEFT_TABLE_LINES);
+        int rightCount = getJQueryCount(LOC_RIGHT_TABLE_LINES);
 
         selenium.click(LOC_LEFT_TABLE_LINE_1);
         assertTrue(isDisplayed(LOC_COPY_BUTTON), "Copy button should be enabled.");
-
         selenium.click(LOC_COPY_BUTTON);
-
-        int tmpInt = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
+        int tmpInt = getJQueryCount(LOC_LEFT_TABLE_LINES);
         assertEquals(tmpInt, leftCount - 1, "In left table, one item should be removed.");
 
-        tmpInt = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        tmpInt = getJQueryCount(LOC_RIGHT_TABLE_LINES);
         assertEquals(tmpInt, rightCount + 1, "In right table, one item should be added.");
 
         // check that it was added also to the toolbar
-        tmpInt = selenium.getXpathCount(LOC_TOOLBAR_ITEMS).intValue();
+        tmpInt = getJQueryCount(LOC_TOOLBAR_ITEMS);
         assertEquals(tmpInt, rightCount + 1, "Number of items in toolbar.");
     }
 
@@ -98,21 +96,21 @@
      */
     @Test
     public void testCopyAllButton() {
-        int leftCount = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
-        int rightCount = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        int leftCount = getJQueryCount(LOC_LEFT_TABLE_LINES);
+        int rightCount = getJQueryCount(LOC_RIGHT_TABLE_LINES);
 
         assertTrue(isDisplayed(LOC_COPY_ALL_BUTTON), "Copy all button should be enabled.");
 
         selenium.click(LOC_COPY_ALL_BUTTON);
 
-        int count = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
+        int count = getJQueryCount(LOC_LEFT_TABLE_LINES);
         assertEquals(count, 0, "All items from left table should be removed.");
 
-        count = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        count = getJQueryCount(LOC_RIGHT_TABLE_LINES);
         assertEquals(count, rightCount + leftCount, "All items should be added to the right table.");
 
         // check that they were added also to the toolbar
-        count = selenium.getXpathCount(LOC_TOOLBAR_ITEMS).intValue();
+        count = getJQueryCount(LOC_TOOLBAR_ITEMS);
         assertEquals(count, rightCount + leftCount, "Number of items in toolbar.");
     }
 
@@ -124,22 +122,22 @@
      */
     @Test
     public void testRemoveButton() {
-        int leftCount = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
-        int rightCount = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        int leftCount = getJQueryCount(LOC_LEFT_TABLE_LINES);
+        int rightCount = getJQueryCount(LOC_RIGHT_TABLE_LINES);
 
-        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         assertTrue(isDisplayed(LOC_REMOVE_BUTTON), "Remove button should be enabled.");
 
         selenium.click(LOC_REMOVE_BUTTON);
 
-        int tmpInt = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
+        int tmpInt = getJQueryCount(LOC_LEFT_TABLE_LINES);
         assertEquals(tmpInt, leftCount + 1, "One item should be added to the left table.");
 
-        tmpInt = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        tmpInt = getJQueryCount(LOC_RIGHT_TABLE_LINES);
         assertEquals(tmpInt, rightCount - 1, "One item should be removed from the right table.");
 
         // check that one item was removed from toolbar
-        tmpInt = selenium.getXpathCount(LOC_TOOLBAR_ITEMS).intValue();
+        tmpInt = getJQueryCount(LOC_TOOLBAR_ITEMS);
         assertEquals(tmpInt, rightCount - 1, "Number of items in toolbar.");
     }
 
@@ -160,21 +158,21 @@
      */
     @Test
     public void testRemoveAllButton() {
-        int leftCount = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
-        int rightCount = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        int leftCount = getJQueryCount(LOC_LEFT_TABLE_LINES);
+        int rightCount = getJQueryCount(LOC_RIGHT_TABLE_LINES);
 
         assertTrue(isDisplayed(LOC_REMOVE_ALL_BUTTON), "Remove all button should be enabled.");
 
         selenium.click(LOC_REMOVE_ALL_BUTTON);
 
-        int tmpInt = selenium.getXpathCount(LOC_LEFT_TABLE_LINES).intValue();
+        int tmpInt = getJQueryCount(LOC_LEFT_TABLE_LINES);
         assertEquals(tmpInt, leftCount + rightCount, "All items should be added to the left table.");
 
-        tmpInt = selenium.getXpathCount(LOC_RIGHT_TABLE_LINES).intValue();
+        tmpInt = getJQueryCount(LOC_RIGHT_TABLE_LINES);
         assertEquals(tmpInt, 0, "All items from right table should be removed.");
 
         // check that everything was removed from toolbar
-        tmpInt = selenium.getXpathCount(LOC_TOOLBAR_ITEMS).intValue();
+        tmpInt = getJQueryCount(LOC_TOOLBAR_ITEMS);
         assertEquals(tmpInt, 0, "Number of items in toolbar.");
     }
 
@@ -185,28 +183,28 @@
      */
     @Test
     public void testUpButton() {
-        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
-        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
-        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
-        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
+        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
+        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
 
         assertEquals(secondItemFromToolbar, secondItemFromTable,
                 "The second item in right table and toolbar should be the same.");
 
-        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
         selenium.click(LOC_UP_BUTTON);
 
         // check items in the table
-        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromTable, "The first and the second item in the table should be swapped.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromTable, "The first and the second item in the table should be swapped.");
 
         // check items in the toolbar
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromToolbar,
                 "The first and the second item in the toolbar should be swapped.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromToolbar, "The first and the second item in the toolbar should be swapped.");
     }
 
@@ -227,33 +225,33 @@
      */
     @Test
     public void testFirstButton() {
-        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
-        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
-        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
-        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
-        String thirdItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 3));
-        String thirdItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 3));
+        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
+        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
+        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        String thirdItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        String thirdItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
 
         assertEquals(secondItemFromToolbar, secondItemFromTable,
                 "The second item in right table and toolbar should be the same.");
 
-        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 3));
+        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
         selenium.click(LOC_FIRST_BUTTON);
 
         // check items in the table
-        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromTable, "The first item from the table should be now the second.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 3));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
         assertEquals(tmpString, secondItemFromTable, "The second item from the table should be now the third.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         assertEquals(tmpString, thirdItemFromTable, "The third item from the table should be now the first.");
 
         // check items in the toolbar
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromToolbar, "The first item from the toolbar should be now the second.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 3));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
         assertEquals(tmpString, secondItemFromToolbar, "The second item from the toolbar should be now the third.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
         assertEquals(tmpString, thirdItemFromToolbar, "The third item from the toolbar should be now the first.");
     }
 
@@ -264,28 +262,28 @@
      */
     @Test
     public void testDownButton() {
-        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
-        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
-        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
-        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
+        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
+        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
 
         assertEquals(secondItemFromToolbar, secondItemFromTable,
                 "The second item in right table and toolbar should be the same.");
 
-        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         selenium.click(LOC_DOWN_BUTTON);
 
         // check items in the table
-        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromTable, "The first and the second item in the table should be swapped.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromTable, "The first and the second item in the table should be swapped.");
 
         // check items in the toolbar
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromToolbar,
                 "The first and the second item in the toolbar should be swapped.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
         assertEquals(tmpString, firstItemFromToolbar, "The first and the second item in the toolbar should be swapped.");
     }
 
@@ -306,33 +304,33 @@
      */
     @Test
     public void testLastButton() {
-        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
-        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
-        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
-        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
-        String thirdItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 3));
-        String thirdItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 3));
+        String firstItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
+        String firstItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
+        String secondItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        String secondItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        String thirdItemFromTable = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        String thirdItemFromToolbar = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
 
         assertEquals(secondItemFromToolbar, secondItemFromTable,
                 "The second item in right table and toolbar should be the same.");
 
-        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         selenium.click(LOC_LAST_BUTTON);
 
         // check items in the table
-        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 3));
+        String tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
         assertEquals(tmpString, firstItemFromTable, "The first item from the table should be now last.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromTable, "The second item from the table should be now the first.");
-        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_RIGHT_TABLE_LINE_PREFORMATTED, 1));
         assertEquals(tmpString, thirdItemFromTable, "The third item from the table should be now the second.");
 
         // check items in the toolbar
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 3));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
         assertEquals(tmpString, firstItemFromToolbar, "The first item from the toolbar should be now last.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 0));
         assertEquals(tmpString, secondItemFromToolbar, "The second item from the toolbar should be now the first.");
-        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 2));
+        tmpString = selenium.getText(format(LOC_TOOLBAR_ITEM_PREFORMATTED, 1));
         assertEquals(tmpString, thirdItemFromToolbar, "The third item from the toolbar should be now the second.");
     }
 

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -62,7 +62,7 @@
      */
     @Test
     public void testOrderingList() {
-        int count = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int count = getJQueryCount(LOC_TABLE_LINES);
         assertTrue(count > 0, "There are no lines in the table.");
 
         waitFor(1000);
@@ -75,8 +75,8 @@
      */
     @Test
     public void testClickSingleSong() {
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        String text = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        String text = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
 
         waitFor(1000);
         String text2 = selenium.getText(LOC_SELECTION);
@@ -93,21 +93,21 @@
         String[] fromPanel = new String[3];
 
         // click lines nr. 1, 3, and 5 in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
         selenium.controlKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 4));
         selenium.controlKeyUp();
 
-        fromTable[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        fromTable[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        fromTable[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        fromTable[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        fromTable[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        fromTable[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
 
         waitFor(1000);
 
         // get all selections from the panel on the right
         for (int i = 0; i < 3; i++) {
-            fromPanel[i] = selenium.getText(format(LOC_SELECTION_PREFORMATTED, i + 1));
+            fromPanel[i] = selenium.getText(format(LOC_SELECTION_PREFORMATTED, i+1));
         }
 
         assertEqualsNoOrder(fromPanel, fromTable, "Items chosen in table should be also in the right panel.");
@@ -122,20 +122,20 @@
         String[] fromPanel = new String[3];
 
         // click lines nr. 1 and 3 in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
         selenium.shiftKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 3));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 2));
         selenium.shiftKeyUp();
 
-        fromTable[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        fromTable[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        fromTable[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
+        fromTable[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        fromTable[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        fromTable[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
 
         waitFor(1000);
 
         // get all selections from the panel on the right
         for (int i = 0; i < 3; i++) {
-            fromPanel[i] = selenium.getText(format(LOC_SELECTION_PREFORMATTED, i + 1));
+            fromPanel[i] = selenium.getText(format(LOC_SELECTION_PREFORMATTED, i+1));
         }
 
         assertEqualsNoOrder(fromPanel, fromTable, "Items chosen in table should be also in the right panel.");
@@ -149,16 +149,16 @@
         String[] before = new String[2];
         String[] after = new String[2];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
 
         // click line nr. 6 in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
         // click the 'Up' button
         selenium.click(LOC_BUTTON_UP);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
 
         assertEquals(after[0], before[1], "The sixth line should be now fifth.");
         assertEquals(after[1], before[0], "The fifth line should be now sixth.");
@@ -172,22 +172,22 @@
         String[] before = new String[3];
         String[] after = new String[3];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         // click line nr. 6 and 7 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        selenium.shiftKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        selenium.shiftKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 7));
         selenium.shiftKeyUp();
 
         // click the 'Up' button (5,6,7 -> 6,7,5)
         selenium.click(LOC_BUTTON_UP);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         assertEquals(after[0], before[1], "The sixth line should be now fifth.");
         assertEquals(after[1], before[2], "The seventh line should be now sixth.");
@@ -202,22 +202,22 @@
         String[] before = new String[3];
         String[] after = new String[3];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         // click line nr. 6 and 7 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        selenium.controlKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        selenium.controlKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 7));
         selenium.controlKeyUp();
 
         // click the 'Up' button (5,6,7 -> 6,7,5)
         selenium.click(LOC_BUTTON_UP);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         assertEquals(after[0], before[1], "The sixth line should be now fifth.");
         assertEquals(after[1], before[2], "The seventh line should be now sixth.");
@@ -232,16 +232,16 @@
         String[] before = new String[2];
         String[] after = new String[2];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         // click line nr. 6 in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
         // click the 'Down' button
         selenium.click(LOC_BUTTON_DOWN);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         assertEquals(after[0], before[1], "The sixth line should be now seventh.");
         assertEquals(after[1], before[0], "The seventh line should be now sixth.");
@@ -255,22 +255,22 @@
         String[] before = new String[3];
         String[] after = new String[3];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         // click line nr. 5 and 6 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        selenium.shiftKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        selenium.shiftKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
         selenium.shiftKeyUp();
 
         // click the 'Down' button (5,6,7 -> 7,5,6)
         selenium.click(LOC_BUTTON_DOWN);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         assertEquals(after[0], before[2], "The seventh line should be now fifth.");
         assertEquals(after[1], before[0], "The fifth line should be now sixth.");
@@ -285,26 +285,26 @@
         String[] before = new String[3];
         String[] after = new String[3];
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
         // click line nr. 5 and 6 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        selenium.controlKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        selenium.controlKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 6));
         selenium.controlKeyUp();
 
         // click the 'Down' button (5,6,7 -> 7,5,6)
         selenium.click(LOC_BUTTON_DOWN);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 7));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
 
-        assertEquals(after[0], before[2], "The seventh line should be now fifth.");
-        assertEquals(after[1], before[0], "The fifth line should be now sixth.");
-        assertEquals(after[2], before[1], "The sixth line should be now seventh.");
+        assertEquals(after[0], before[2], "The seventh line should be now sixth.");
+        assertEquals(after[1], before[0], "The fifth line should be now seventh.");
+        assertEquals(after[2], before[1], "The sixth line should be now fifth.");
     }
 
     /**
@@ -314,20 +314,20 @@
     public void testLastSingleSong() {
         String[] before = new String[3];
         String[] after = new String[3];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click line nr. 1 in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
         // click the 'Last' button (1,2,..,last-1,last --> 2,..,last,1)
         selenium.click(LOC_BUTTON_LAST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[1], "The second line should be now first.");
         assertEquals(after[1], before[2], "The last line should be now last but one.");
@@ -341,26 +341,26 @@
     public void testLastMultipleSongsShift() {
         String[] before = new String[4];
         String[] after = new String[4];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click line nr. 1 and 2 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        selenium.shiftKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        selenium.shiftKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 2));
         selenium.shiftKeyUp();
 
         // click the 'Last' button (1,2,3,..,last --> 3,..,last,1,2)
         selenium.click(LOC_BUTTON_LAST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 2));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-3));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[2], "The third line should be now first.");
         assertEquals(after[1], before[3], "The last line should be now last but two.");
@@ -375,26 +375,26 @@
     public void testLastMultipleSongsCtrl() {
         String[] before = new String[4];
         String[] after = new String[4];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click line nr. 1 and 2 in the table
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        selenium.controlKeyDown();
         selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        selenium.controlKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, 2));
         selenium.controlKeyUp();
 
         // click the 'Last' button (1,2,3,..,last --> 3,..,last,1,2)
         selenium.click(LOC_BUTTON_LAST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 2));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-3));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[2], "The third line should be now first.");
         assertEquals(after[1], before[3], "The last line should be now last but two.");
@@ -409,20 +409,20 @@
     public void testFirstSingleSong() {
         String[] before = new String[3];
         String[] after = new String[3];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click the last line in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
         // click the 'First' button (1...last-1,last --> last,1...last-1)
         selenium.click(LOC_BUTTON_FIRST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[2], "The second line should be now first.");
         assertEquals(after[1], before[0], "The first line should be now second.");
@@ -436,27 +436,27 @@
     public void testFirstMultipleSongsShift() {
         String[] before = new String[4];
         String[] after = new String[4];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 2));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-3));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click last 2 lines in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
         selenium.shiftKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
         selenium.shiftKeyUp();
 
         // click the 'First' button (1...last-2,last-1,last -->
         // last-1,last,1...last-2)
         selenium.click(LOC_BUTTON_FIRST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[2], "The last but one line should be now first.");
         assertEquals(after[1], before[3], "The last line should be now second.");
@@ -471,27 +471,27 @@
     public void testFirstMultipleSongsCtrl() {
         String[] before = new String[4];
         String[] after = new String[4];
-        int countOfLines = selenium.getXpathCount(LOC_TABLE_LINES).intValue();
+        int countOfLines = getJQueryCount(LOC_TABLE_LINES);
 
-        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 2));
-        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
-        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        before[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        before[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-3));
+        before[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
+        before[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         // click last 2 lines in the table
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines - 1));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-2));
         selenium.controlKeyDown();
-        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        selenium.click(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
         selenium.controlKeyUp();
 
         // click the 'First' button (1...last-2,last-1,last -->
         // last-1,last,1...last-2)
         selenium.click(LOC_BUTTON_FIRST);
 
-        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
-        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
-        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 3));
-        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines));
+        after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
+        after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
+        after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
+        after[3] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, countOfLines-1));
 
         assertEquals(after[0], before[2], "The last but one line should be now first.");
         assertEquals(after[1], before[3], "The last line should be now second.");

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/pickList/PickListTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/pickList/PickListTestCase.java	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/pickList/PickListTestCase.java	2009-11-06 17:32:08 UTC (rev 15848)
@@ -75,10 +75,10 @@
     public void testFirstPickList() {
         scrollIntoView(LOC_FIRST_EXAMPLE_HEADER, true);
         
-        int count = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        int count = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
         assertTrue(count > 0, "There are no lines in the upper left table.");
 
-        count = selenium.getXpathCount(LOC_FIRST_RIGHT_ITEMS).intValue();
+        count = getJQueryCount(LOC_FIRST_RIGHT_ITEMS);
         assertEquals(count, 0, "There should be no lines in the upper right table.");
     }
 
@@ -89,14 +89,14 @@
     public void testFirstCopySingleItem() {
         scrollIntoView(LOC_FIRST_EXAMPLE_HEADER, true);
         
-        final int count = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
 
         selenium.click(LOC_FIRST_LEFT_FIRST_ITEM);
         selenium.click(LOC_FIRST_BUTTON_COPY);
 
         Wait.failWith("There should be less lines in the left table.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue() == count -1;
+                return getJQueryCount(LOC_FIRST_LEFT_ITEMS) == count -1;
             }
         });
     }
@@ -118,17 +118,17 @@
     public void testFirstCopyAll() {
         scrollIntoView(LOC_FIRST_EXAMPLE_HEADER, true);
         
-        final int count = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
 
         selenium.click(LOC_FIRST_BUTTON_COPY_ALL);
 
         Wait.failWith("All items from left table should be now in the right table.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_FIRST_RIGHT_ITEMS).intValue() == count;
+                return getJQueryCount(LOC_FIRST_RIGHT_ITEMS) == count;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
         assertEquals(newCount, 0, "There should be no lines in the left table.");
     }
 
@@ -141,14 +141,14 @@
         
         selenium.click(LOC_FIRST_BUTTON_COPY_ALL);
 
-        final int count = selenium.getXpathCount(LOC_FIRST_RIGHT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_FIRST_RIGHT_ITEMS);
 
         selenium.click(LOC_FIRST_RIGHT_FIRST_ITEM);
         selenium.click(LOC_FIRST_BUTTON_REMOVE);
 
         Wait.failWith("There should be less lines in the right table.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_FIRST_RIGHT_ITEMS).intValue() == count - 1;
+                return getJQueryCount(LOC_FIRST_RIGHT_ITEMS) == count - 1;
             }
         });
     }
@@ -170,18 +170,18 @@
     public void testFirstRemoveAll() {
         scrollIntoView(LOC_FIRST_EXAMPLE_HEADER, true);
         
-        final int count = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
 
         selenium.click(LOC_FIRST_BUTTON_COPY_ALL);
         selenium.click(LOC_FIRST_BUTTON_REMOVE_ALL);
 
         Wait.failWith("There should be no lines in the right table.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_FIRST_RIGHT_ITEMS).intValue() == 0;
+                return getJQueryCount(LOC_FIRST_RIGHT_ITEMS) == 0;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_FIRST_LEFT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_FIRST_LEFT_ITEMS);
         assertEquals(newCount, count, "All items from right table should be now in the left table.");
     }
 
@@ -192,10 +192,10 @@
     public void testSecondPickList() {
         scrollIntoView(LOC_SECOND_EXAMPLE_HEADER, true);
         
-        int count = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        int count = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
         assertTrue(count > 0, "There are no lines in the lower left table.");
 
-        count = selenium.getXpathCount(LOC_SECOND_RIGHT_ITEMS).intValue();
+        count = getJQueryCount(LOC_SECOND_RIGHT_ITEMS);
         assertEquals(count, 0, "There should be no lines in the lower right table.");
 
         boolean empty = !selenium.isElementPresent(LOC_SECOND_CHOSEN_OPTIONS_UL);
@@ -209,18 +209,18 @@
     public void testSecondCopySingleItem() {
         scrollIntoView(LOC_SECOND_EXAMPLE_HEADER, true);
         
-        int count = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        int count = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
 
         selenium.click(LOC_SECOND_LEFT_FIRST_ITEM);
         selenium.click(LOC_SECOND_BUTTON_COPY);
 
         Wait.failWith("There should be only one capital city.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue() == 1;
+                return getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI) == 1;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
         assertEquals(newCount, count - 1, "There should be less lines in the left table.");
 
         String capital = selenium.getText(LOC_SECOND_CHOSEN_OPTIONS_LI1);
@@ -244,23 +244,23 @@
     public void testSecondCopyAll() {
         scrollIntoView(LOC_SECOND_EXAMPLE_HEADER, true);
       
-        final int count = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
 
         selenium.click(LOC_SECOND_BUTTON_COPY_ALL);
 
         Wait.failWith("Not all capital cities were displayed in the panel.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue() == count;
+                return getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI) == count;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
         assertEquals(newCount, 0, "There should be no lines in the left table.");
 
-        newCount = selenium.getXpathCount(LOC_SECOND_RIGHT_ITEMS).intValue();
+        newCount = getJQueryCount(LOC_SECOND_RIGHT_ITEMS);
         assertEquals(newCount, count, "All items from left table should be now in the right table.");
 
-        newCount = selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue();
+        newCount = getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI);
         assertEquals(newCount, count, "Not all capital cities were displayed in the panel.");
     }
 
@@ -273,21 +273,21 @@
 
         selenium.click(LOC_SECOND_BUTTON_COPY_ALL);
 
-        final int count = selenium.getXpathCount(LOC_SECOND_RIGHT_ITEMS).intValue();
+        final int count = getJQueryCount(LOC_SECOND_RIGHT_ITEMS);
 
         selenium.click(LOC_SECOND_RIGHT_FIRST_ITEM);
         selenium.click(LOC_SECOND_BUTTON_REMOVE);
 
         Wait.failWith("The capital city was not removed from panel.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue() == count - 1;
+                return getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI) == count - 1;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_SECOND_RIGHT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_SECOND_RIGHT_ITEMS);
         assertEquals(newCount, count - 1, "There should be less lines in the right table.");
 
-        newCount = selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue();
+        newCount = getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI);
         assertEquals(newCount, count - 1, "The capital city was not removed from panel.");
     }
 
@@ -308,21 +308,21 @@
     public void testSecondRemoveAll() {
         scrollIntoView(LOC_SECOND_EXAMPLE_HEADER, true);
 
-        int count = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        int count = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
 
         selenium.click(LOC_SECOND_BUTTON_COPY_ALL);
         selenium.click(LOC_SECOND_BUTTON_REMOVE_ALL);
 
         Wait.failWith("All capitals from the panel should be removed.").until(new Condition() {
             public boolean isTrue() {
-                return selenium.getXpathCount(LOC_SECOND_CHOSEN_OPTIONS_LI).intValue() == 0;
+                return getJQueryCount(LOC_SECOND_CHOSEN_OPTIONS_LI) == 0;
             }
         });
         
-        int newCount = selenium.getXpathCount(LOC_SECOND_RIGHT_ITEMS).intValue();
+        int newCount = getJQueryCount(LOC_SECOND_RIGHT_ITEMS);
         assertEquals(newCount, 0, "There should be no lines in the right table.");
 
-        newCount = selenium.getXpathCount(LOC_SECOND_LEFT_ITEMS).intValue();
+        newCount = getJQueryCount(LOC_SECOND_LEFT_ITEMS);
         assertEquals(newCount, count, "All items from right table should be now in the left table.");
     }
 

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,4 +1,5 @@
-LEGEND_HEADER=//legend[text()\='AjaxForm Demo']
-BUTTON_AJAX=//input[@type\='submit' and @value\="Set Local Name to John (Ajax)"]
-BUTTON_NON_AJAX=//input[@type\='submit' and @value\="Set Both Name to Mark (non-Ajax)"]
-OUTPUT_TEXT_RELATIVE={0}/../../../tr[2]/*/*/text()
\ No newline at end of file
+LEGEND_HEADER=jquery=fieldset:eq(1) > legend
+BUTTON_AJAX=jquery=input[value=Set Local Name to John (Ajax)]
+BUTTON_NON_AJAX=jquery=input[value=Set Both Name to Mark (non-Ajax)]
+OUTPUT_AJAX=jquery=fieldset:eq(1) div.rich-panel:eq(0) span
+OUTPUT_NON_AJAX=jquery=fieldset:eq(1) div.rich-panel:eq(1) span
\ No newline at end of file

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,5 +1,10 @@
-INPUT_RELATIVE=//fieldset[{0}]//table//td[{1}]//table//tr[{2}]//input[@type\='text']
-OUTPUT_VALIDATION_MESSAGE=//fieldset[1]/div[1]/*[2]/ul/li
-OUTPUT_TEST1_TYPED_NAME=//span[@id\='outname']
-OUTPUT_TEST2_TYPED_NAME=//span[@id\='outname2']
-OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED=//span[@id\='out{0}']
+INPUT_TEST1_NAME1=jquery=fieldset:eq(0) form#form1 td input:eq(0)
+INPUT_TEST1_JOB1=jquery=fieldset:eq(0) form#form1 td input:eq(1)
+INPUT_TEST1_NAME2=jquery=fieldset:eq(0) form#form2 td input:eq(0)
+INPUT_TEST2_NAME1=jquery=fieldset:eq(1) form:eq(0) td input
+INPUT_TEST2_NAME2=jquery=fieldset:eq(1) form:eq(1) td input
+ 
+OUTPUT_VALIDATION_MESSAGE=jquery=fieldset:eq(0) li
+OUTPUT_TEST1_TYPED_NAME=jquery=span#outname
+OUTPUT_TEST2_TYPED_NAME=jquery=span#outname2
+OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED=jquery=span#out{0}

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,2 +1,2 @@
-INPUT_TEXT=//input[@type\='text']
-OUTPUT_TEXT_RELATIVE={0}/../../td[2]/*/text()
\ No newline at end of file
+INPUT_TEXT=jquery=input[id=myform:myinput]
+OUTPUT_TEXT=jquery=span[id=myform:outtext]
\ No newline at end of file

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/fileUpload/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/fileUpload/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/fileUpload/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,22 +1,22 @@
-EXAMPLE_HEADER=//fieldset[1]/legend
-ADD_BUTTON_N=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[1]/div/div[2]/input[{0}]
-ADD_BUTTON_CLASS=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[1]/div
-UPLOAD_BUTTON_STYLE=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[2]
-UPLOAD_BUTTON=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[2]/div
-CLEAR_ALL_BUTTON=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[3]/div
-CLEAR_ALL_BUTTON_STYLE=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr/td/div[3]
-CLEAR_UPLOADED_DATA_BUTTON=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/input
+EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+ADD_BUTTON=jquery=fieldset:eq(0) input[type=file]:last
+ADD_BUTTON_CLASS=jquery=fieldset:eq(0) table.rich-fileupload-toolbar-decor td > div:eq(0) > div
+UPLOAD_BUTTON_STYLE=jquery=fieldset:eq(0) table.rich-fileupload-toolbar-decor td > div:eq(1)
+UPLOAD_BUTTON=jquery=fieldset:eq(0) table.rich-fileupload-toolbar-decor td > div:eq(1) > div
+CLEAR_ALL_BUTTON=jquery=fieldset:eq(0) table.rich-fileupload-toolbar-decor td > div:eq(2) > div
+CLEAR_ALL_BUTTON_STYLE=jquery=fieldset:eq(0) table.rich-fileupload-toolbar-decor td > div:eq(2)
+CLEAR_UPLOADED_DATA_BUTTON=jquery=fieldset:eq(0) input[value=Clear Uploaded Data]
 	
-NOT_UPLOADED_LIST_TR=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div/table/tbody/tr
-NOT_UPLOADED_LIST_N_NAME=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div/table[{0}]/tbody/tr/td[1]/div[1]
-NOT_UPLOADED_LIST_N_DONE=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div/table[{0}]/tbody/tr/td[1]/div[3]
-NOT_UPLOADED_LIST_N_CANCEL=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div/table[{0}]/tbody/tr/td[2]/div/a
+NOT_UPLOADED_LIST_TR=jquery=fieldset:eq(0) td.top:eq(0) div.rich-fileupload-list-overflow tr
+NOT_UPLOADED_LIST_N_NAME=jquery=fieldset:eq(0) td.top:eq(0) div.rich-fileupload-list-overflow tr:eq({0}) > td:eq(0) > div:eq(0)
+NOT_UPLOADED_LIST_N_DONE=jquery=fieldset:eq(0) td.top:eq(0) div.rich-fileupload-list-overflow tr:eq({0}) > td:eq(0) > div:eq(2)
+NOT_UPLOADED_LIST_N_CANCEL=jquery=fieldset:eq(0) td.top:eq(0) div.rich-fileupload-list-overflow tr:eq({0}) > td:eq(1) > div > a
 	
-UPLOADED_FILES_INFO=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/div/div[2]
-UPLOADED_LIST_TR=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/div/div[2]/table/tbody/tr
-UPLOADED_LIST_N_IMG=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/div/div[2]/table/tbody/tr[{0}]/td/div/div/table/tbody/tr/td[1]/img
-UPLOADED_LIST_N_NAME=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/div/div[2]/table/tbody/tr[{0}]/td/div/div/table/tbody/tr/td[2]/table/tbody/tr[1]/td[2]
-UPLOADED_LIST_N_SIZE=//fieldset[1]/div/form/table/tbody/tr/td[2]/span/div/div[2]/table/tbody/tr[{0}]/td/div/div/table/tbody/tr/td[2]/table/tbody/tr[2]/td[2]
+UPLOADED_FILES_INFO=jquery=fieldset:eq(0) td.top:eq(1) > span > div > div:eq(1)
+UPLOADED_LIST_TR=jquery=fieldset:eq(0) td.top:eq(1) table:eq(0) > tbody > tr
+UPLOADED_LIST_N_IMG=jquery=fieldset:eq(0) td.top:eq(1) td[class*=rich-table-cell]:eq({0}) img
+UPLOADED_LIST_N_NAME=jquery=fieldset:eq(0) td.top:eq(1) td[class*=rich-table-cell]:eq({0}) td:eq(1) tr:eq(0) > td:eq(1)
+UPLOADED_LIST_N_SIZE=jquery=fieldset:eq(0) td.top:eq(1) td[class*=rich-table-cell]:eq({0}) td:eq(1) tr:eq(1) > td:eq(1)
 	
-AUTOMATIC_UPLOAD=//fieldset[2]/form/table/tbody/tr/td[1]/input
-FLASH=//fieldset[2]/form/table/tbody/tr/td[2]/input
\ No newline at end of file
+AUTOMATIC_UPLOAD=jquery=fieldset:eq(1) table input:eq(0)
+FLASH=jquery=fieldset:eq(1) table input:eq(0)
\ No newline at end of file

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/listShuttle/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/listShuttle/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/listShuttle/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,16 +1,16 @@
-EXAMPLE_HEADER=//fieldset/legend
-LEFT_TABLE_LINES=//fieldset/div/form/table[2]/tbody/tr[2]/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr
-RIGHT_TABLE_LINES=//fieldset/div/form/table[2]/tbody/tr[2]/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr
-LEFT_TABLE_LINE_1=//fieldset/div/form/table[2]/tbody/tr[2]/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr[1]
-RIGHT_TABLE_LINE_PREFORMATTED=//fieldset/div/form/table[2]/tbody/tr[2]/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr[{0}]
-TOOLBAR_ITEMS=//fieldset/div/form/table[1]/tbody/tr[1]/td[contains(@class,'rich-toolbar-item')]
-TOOLBAR_ITEM_PREFORMATTED=//fieldset/div/form/table[1]/tbody/tr/td[{0}*2-1]
+EXAMPLE_HEADER=jquery=fieldset > legend
+LEFT_TABLE_LINES=jquery=div.rich-shuttle-source-items table.rich-shuttle-internal-tab tr
+RIGHT_TABLE_LINES=jquery=div.rich-shuttle-target-items table.rich-shuttle-internal-tab tr
+LEFT_TABLE_LINE_1=jquery=div.rich-shuttle-source-items table.rich-shuttle-internal-tab tr:eq(0)
+RIGHT_TABLE_LINE_PREFORMATTED=jquery=div.rich-shuttle-target-items table.rich-shuttle-internal-tab tr:eq({0})
+TOOLBAR_ITEMS=jquery=table.rich-toolbar td[class*=rich-toolbar-item]
+TOOLBAR_ITEM_PREFORMATTED=jquery=table.rich-toolbar td[class*=rich-toolbar-item]:eq({0})
 
-COPY_ALL_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[2]/div/div[1]
-COPY_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[2]/div/div[3]
-REMOVE_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[2]/div/div[5]
-REMOVE_ALL_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[2]/div/div[7]
-FIRST_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[4]/div/div[1]
-UP_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[4]/div/div[3]
-DOWN_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[4]/div/div[5]
-LAST_BUTTON=//fieldset/div/form/table[2]/tbody/tr[2]/td[4]/div/div[7]
+COPY_ALL_BUTTON=jquery=div.rich-shuttle-controls:eq(0) div.rich-shuttle-control-copyall
+COPY_BUTTON=jquery=div.rich-shuttle-controls:eq(0) div.rich-shuttle-control-copy
+REMOVE_BUTTON=jquery=div.rich-shuttle-controls:eq(0) div.rich-shuttle-control-remove
+REMOVE_ALL_BUTTON=jquery=div.rich-shuttle-controls:eq(0) div.rich-shuttle-control-removeall
+FIRST_BUTTON=jquery=div.rich-shuttle-controls:eq(1) div.rich-shuttle-control-top
+UP_BUTTON=jquery=div.rich-shuttle-controls:eq(1) div.rich-shuttle-control-up
+DOWN_BUTTON=jquery=div.rich-shuttle-controls:eq(1) div.rich-shuttle-control-down
+LAST_BUTTON=jquery=div.rich-shuttle-controls:eq(1) div.rich-shuttle-control-bottom

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/orderingList/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/orderingList/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/orderingList/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,10 +1,10 @@
-EXAMPLE_HEADER=//fieldset[1]/legend
-TABLE_LINES=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[1]/div/div[2]/table/tbody/tr
-TABLE_LINE_PREFORMATTED=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[1]/div/div[2]/table/tbody/tr[{0}]/td[1]
-SELECTION=//fieldset[1]/div/form/table/tbody/tr/td[2]/div/div[2]
-SELECTION_PREFORMATTED=//fieldset[1]/div/form/table/tbody/tr/td[2]/div/div[2]/ul/li[{0}]
+EXAMPLE_HEADER=jquery=fieldset > legend
+TABLE_LINES=jquery=table.rich-ordering-list-items tr.rich-ordering-list-row
+TABLE_LINE_PREFORMATTED=jquery=table.rich-ordering-list-items tr:eq({0}) > td:eq(0)
+SELECTION=jquery=div[id$=output] div.rich-panel-body
+SELECTION_PREFORMATTED=jquery=div[id$=output] div.rich-panel-body li:nth-child({0})
 
-BUTTON_FIRST=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[2]/div/div[1]
-BUTTON_UP=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[2]/div/div[3]
-BUTTON_DOWN=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[2]/div/div[5]
-BUTTON_LAST=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td[2]/div/div[7]
\ No newline at end of file
+BUTTON_FIRST=jquery=div.rich-ordering-list-button-layout div.rich-ordering-control-top
+BUTTON_UP=jquery=div.rich-ordering-list-button-layout div.rich-ordering-control-up
+BUTTON_DOWN=jquery=div.rich-ordering-list-button-layout div.rich-ordering-control-down
+BUTTON_LAST=jquery=div.rich-ordering-list-button-layout div.rich-ordering-control-bottom
\ No newline at end of file

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/pickList/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/pickList/locators.properties	2009-11-06 10:03:04 UTC (rev 15847)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/pickList/locators.properties	2009-11-06 17:32:08 UTC (rev 15848)
@@ -1,23 +1,23 @@
-FIRST_EXAMPLE_HEADER=//fieldset[1]/legend
-FIRST_LEFT_ITEMS=//fieldset[1]/div/table/tbody/tr/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr
-FIRST_LEFT_FIRST_ITEM=//fieldset[1]/div/table/tbody/tr/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr[1]
-FIRST_RIGHT_ITEMS=//fieldset[1]/div/table/tbody/tr/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr
-FIRST_RIGHT_FIRST_ITEM=//fieldset[1]/div/table/tbody/tr/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr[1]
-FIRST_BUTTON_COPY_ALL=//fieldset[1]/div/table/tbody/tr/td[2]/div/div[1]
-FIRST_BUTTON_COPY=//fieldset[1]/div/table/tbody/tr/td[2]/div/div[3]
-FIRST_BUTTON_REMOVE=//fieldset[1]/div/table/tbody/tr/td[2]/div/div[5]
-FIRST_BUTTON_REMOVE_ALL=//fieldset[1]/div/table/tbody/tr/td[2]/div/div[7]
+FIRST_EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+FIRST_LEFT_ITEMS=jquery=fieldset:eq(0) div.rich-picklist-source-items tr.rich-picklist-source-row
+FIRST_LEFT_FIRST_ITEM=jquery=fieldset:eq(0) div.rich-picklist-source-items tr.rich-picklist-source-row:eq(0)
+FIRST_RIGHT_ITEMS=jquery=fieldset:eq(0) div.rich-picklist-target-items tr.rich-picklist-source-row
+FIRST_RIGHT_FIRST_ITEM=jquery=fieldset:eq(0) div.rich-picklist-target-items tr.rich-picklist-source-row:eq(0)
+FIRST_BUTTON_COPY_ALL=jquery=fieldset:eq(0) div.rich-picklist-controls div.rich-picklist-control-copyall
+FIRST_BUTTON_COPY=jquery=fieldset:eq(0) div.rich-picklist-controls div.rich-picklist-control-copy
+FIRST_BUTTON_REMOVE=jquery=fieldset:eq(0) div.rich-picklist-controls div.rich-picklist-control-remove
+FIRST_BUTTON_REMOVE_ALL=jquery=fieldset:eq(0) div.rich-picklist-controls div.rich-picklist-control-removeall
 
-SECOND_EXAMPLE_HEADER=//fieldset[1]/legend
-SECOND_LEFT_ITEMS=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr
-SECOND_LEFT_FIRST_ITEM=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[1]/div/table/tbody/tr/td/div/div/table/tbody/tr[1]
-SECOND_RIGHT_ITEMS=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr
-SECOND_RIGHT_FIRST_ITEM=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[3]/div/table/tbody/tr/td/div/div/table/tbody/tr[1]
-SECOND_BUTTON_COPY_ALL=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[2]/div/div[1]
-SECOND_BUTTON_COPY=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[2]/div/div[3]
-SECOND_BUTTON_REMOVE=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[2]/div/div[5]
-SECOND_BUTTON_REMOVE_ALL=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr/td[2]/div/div[7]
+SECOND_EXAMPLE_HEADER=jquery=fieldset:eq(1) > legend
+SECOND_LEFT_ITEMS=jquery=fieldset:eq(1) div.rich-picklist-source-items tr.rich-picklist-source-row
+SECOND_LEFT_FIRST_ITEM=jquery=fieldset:eq(1) div.rich-picklist-source-items tr.rich-picklist-source-row:eq(0)
+SECOND_RIGHT_ITEMS=jquery=fieldset:eq(1) div.rich-picklist-target-items tr.rich-picklist-source-row
+SECOND_RIGHT_FIRST_ITEM=jquery=fieldset:eq(1) div.rich-picklist-target-items tr.rich-picklist-source-row:eq(0)
+SECOND_BUTTON_COPY_ALL=jquery=fieldset:eq(1) div.rich-picklist-controls div.rich-picklist-control-copyall
+SECOND_BUTTON_COPY=jquery=fieldset:eq(1) div.rich-picklist-controls div.rich-picklist-control-copy
+SECOND_BUTTON_REMOVE=jquery=fieldset:eq(1) div.rich-picklist-controls div.rich-picklist-control-remove
+SECOND_BUTTON_REMOVE_ALL=jquery=fieldset:eq(1) div.rich-picklist-controls div.rich-picklist-control-removeall
 
-SECOND_CHOSEN_OPTIONS_UL=//fieldset[2]/div/form/table/tbody/tr/td[2]/div/div[2]/ul
-SECOND_CHOSEN_OPTIONS_LI=//fieldset[2]/div/form/table/tbody/tr/td[2]/div/div[2]/ul/li
-SECOND_CHOSEN_OPTIONS_LI1=//fieldset[2]/div/form/table/tbody/tr/td[2]/div/div[2]/ul/li[1]
\ No newline at end of file
+SECOND_CHOSEN_OPTIONS_UL=jquery=fieldset:eq(1) td.top:eq(1) ul
+SECOND_CHOSEN_OPTIONS_LI=jquery=fieldset:eq(1) td.top:eq(1) li
+SECOND_CHOSEN_OPTIONS_LI1=jquery=fieldset:eq(1) td.top:eq(1) li:eq(0)
\ No newline at end of file



More information about the richfaces-svn-commits mailing list