Author: lfryc(a)redhat.com
Date: 2010-07-10 17:04:01 -0400 (Sat, 10 Jul 2010)
New Revision: 17894
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataScroller.java
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataTable.java
Log:
following changes in library
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataScroller.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataScroller.java 2010-07-10
21:02:49 UTC (rev 17893)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataScroller.java 2010-07-10
21:04:01 UTC (rev 17894)
@@ -22,10 +22,11 @@
package org.richfaces.tests.testapp.richExtendedDataTable;
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
import org.jboss.test.selenium.locator.JQueryLocator;
import static org.jboss.test.selenium.locator.LocatorFactory.*;
-import static org.jboss.test.selenium.framework.AjaxSelenium.getCurrentSelenium;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.*;
/**
@@ -33,6 +34,9 @@
* @version $Revision$
*/
public class DataScroller {
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
JQueryLocator scrollerRoot;
JQueryLocator pageNumbers = jq(".rf-ds-dtl");
JQueryLocator firstPageButton = jq(".rf-ds-l[id$=ds_f]");
@@ -62,22 +66,22 @@
public void clickLastPageButton() {
JQueryLocator locator = scrollerRoot.getDescendant(lastPageButton);
- guardXhr(getCurrentSelenium()).click(locator);
+ guardXhr(selenium).click(locator);
}
public void clickFirstPageButton() {
JQueryLocator locator = scrollerRoot.getDescendant(firstPageButton);
- guardXhr(getCurrentSelenium()).click(locator);
+ guardXhr(selenium).click(locator);
}
public int getCountOfVisiblePages() {
JQueryLocator locator = scrollerRoot.getDescendant(pageNumbers);
- return getCurrentSelenium().getCount(locator);
+ return selenium.getCount(locator);
}
public boolean hasPages() {
JQueryLocator locator = scrollerRoot.getDescendant(lastVisiblePage);
- return getCurrentSelenium().isElementPresent(locator);
+ return selenium.isElementPresent(locator);
}
public Integer getLastVisiblePage() {
@@ -85,7 +89,7 @@
if (!hasPages()) {
return null;
}
- return integer(getCurrentSelenium().getText(locator));
+ return integer(selenium.getText(locator));
}
public int getCurrentPage() {
@@ -93,7 +97,7 @@
if (!hasPages()) {
return 1;
}
- return integer(getCurrentSelenium().getText(locator));
+ return integer(selenium.getText(locator));
}
public boolean isFirstPage() {
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataTable.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataTable.java 2010-07-10
21:02:49 UTC (rev 17893)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/richExtendedDataTable/DataTable.java 2010-07-10
21:04:01 UTC (rev 17894)
@@ -22,16 +22,20 @@
package org.richfaces.tests.testapp.richExtendedDataTable;
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
import org.jboss.test.selenium.locator.JQueryLocator;
import static org.jboss.test.selenium.locator.LocatorFactory.*;
-import static org.jboss.test.selenium.framework.AjaxSelenium.getCurrentSelenium;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
public class DataTable {
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
JQueryLocator tableRoot;
JQueryLocator tableRows = jq(".rf-dt-c:nth-child(1)");
@@ -42,11 +46,10 @@
public int getCountOfTableRows() {
JQueryLocator locator = tableRoot.getDescendant(tableRows);
- return getCurrentSelenium().getCount(locator);
-
+ return selenium.getCount(locator);
}
- public static int integer(String string) {
- return Integer.valueOf(string);
+ public String getTableText() {
+ return selenium.getText(tableRoot);
}
}
Show replies by date