Author: jharting
Date: 2009-02-25 08:48:12 -0500 (Wed, 25 Feb 2009)
New Revision: 10087
Modified:
trunk/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java
Log:
JBSEAM-3690 browser compatibility fixes
Modified:
trunk/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java
===================================================================
---
trunk/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java 2009-02-24
23:25:13 UTC (rev 10086)
+++
trunk/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java 2009-02-25
13:48:12 UTC (rev 10087)
@@ -55,7 +55,7 @@
public static final String USER_CANCEL = "id=user:cancel";
public static final String USER_TABLE_ROW_BY_NAME =
"xpath=//table[(a)id=\"threads\"]/tbody/tr[normalize-space(./td[1]/text()) =
\"{0}\"]";
// these locators can only be used catenated with USER_TABLE_ROW_BY_NAME
- public static final String USER_TABLE_ROLES = "/td[2]/text()";
+ public static final String USER_TABLE_ROLES = "/td[2]";
public static final String USER_TABLE_CHECKBOX_CHECKED =
"/td[3]/div[@class=\"checkmark\"]";
public static final String USER_TABLE_CHECKBOX_UNCHECKED =
"/td[3]/div[@class=\"cross\"]";
public static final String USER_TABLE_DELETE = "//a[contains(@id,
\"delete\")]";
@@ -70,7 +70,7 @@
public static final String ROLE_CANCEL = "id=role:cancel";
public static final String ROLE_TABLE_ROW_BY_NAME =
"xpath=//table[(a)id=\"threads\"]/tbody/tr[normalize-space(./td[1]/text()) =
\"{0}\"]";
// these locators can only be used catenated with ROLE_TABLE_ROW_BY_NAME
- public static final String ROLE_TABLE_ROLES = "/td[2]/text()";
+ public static final String ROLE_TABLE_ROLES = "/td[2]";
public static final String ROLE_TABLE_DELETE = "//a[contains(@id,
\"delete\")]";
public static final String ROLE_TABLE_EDIT = "//a[contains(@id,
\"edit\")]";
Modified:
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java
===================================================================
---
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java 2009-02-24
23:25:13 UTC (rev 10086)
+++
trunk/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java 2009-02-25
13:48:12 UTC (rev 10087)
@@ -27,6 +27,8 @@
import java.text.MessageFormat;
import java.text.NumberFormat;
import java.text.ParseException;
+import java.util.Locale;
+
import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -124,7 +126,8 @@
protected Double parseBalance(String text) throws ParseException
{
- String number = text.replaceAll("\\$", "").trim();
- return (Double) nf.parse(number);
+ // dirty but can hardly be parsed nicer
+ String number = text.replaceAll("\\$", new String()).replaceAll("
", new String()).trim();
+ return nf.parse(number).doubleValue();
}
}
Show replies by thread