Author: dsvyatobatsko
Date: 2008-05-22 11:56:44 -0400 (Thu, 22 May 2008)
New Revision: 8709
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/InplaceSelectTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PickListTest.java
Log:
dom->xpath
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/InplaceSelectTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/InplaceSelectTest.java 2008-05-22
15:55:00 UTC (rev 8708)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/InplaceSelectTest.java 2008-05-22
15:56:44 UTC (rev 8709)
@@ -65,8 +65,7 @@
writeStatus("Select second element"); //Birch
-
selenium.mouseMove("dom=selenium.browserbot.getCurrentWindow().$('list" +
inplaceSelectId
- + "').down('span', 1)");
+ selenium.mouseMove("xpath=//div[@id='list" + inplaceSelectId +
"']/span[2]");
selenium.fireEvent(okButton, "mousedown");
writeStatus("Check that a new element is selected");
@@ -76,8 +75,8 @@
writeStatus("Select another element"); // Aspen
selenium.doubleClick(inplaceSelectId);
-
selenium.mouseMove("dom=selenium.browserbot.getCurrentWindow().$('list" +
inplaceSelectId
- + "').down('span', 2)");
+
+ selenium.mouseMove("xpath=//div[@id='list" + inplaceSelectId +
"']/span[3]");
selenium.fireEvent(cancelButton, "mousedown");
writeStatus("Cancel selected value.");
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PickListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PickListTest.java 2008-05-22
15:55:00 UTC (rev 8708)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/PickListTest.java 2008-05-22
15:56:44 UTC (rev 8709)
@@ -65,18 +65,16 @@
writeStatus("Verify initial selected items.");
-
Assert.assertEquals(selenium.getText("dom=selenium.browserbot.getCurrentWindow().$('"
+ destListId
- + "').down('tr', 0)"), "ZHURIK");
-
Assert.assertEquals(selenium.getText("dom=selenium.browserbot.getCurrentWindow().$('"
+ destListId
- + "').down('tr', 1)"), "MELESHKO");
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[1]"), "ZHURIK");
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[2]"), "MELESHKO");
writeStatus("Try to select first item and check state thereafter");
-
selenium.doubleClick("dom=selenium.browserbot.getCurrentWindow().$('" +
srcListId + "').down('tr').down('td')");
+ selenium.doubleClick("xpath=//tbody[@id='" + srcListId +
"']/tr/td");
+
Assert.assertEquals(getNumberOfChildren(srcListId), 5);
Assert.assertEquals(getNumberOfChildren(destListId), 3);
-
Assert.assertEquals(selenium.getText("dom=selenium.browserbot.getCurrentWindow().$('"
+ destListId
- + "').down('tr', 2)"), "LEONTIEV");
+ Assert.assertEquals(selenium.getText("xpath=//tbody[@id='" +
destListId + "']/tr[3]"), "LEONTIEV");
}
Show replies by date