[seam-commits] Seam SVN: r13517 - branches/community/Seam_2_2/src/test/ftest/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/test/selenium.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jul 27 11:26:50 EDT 2010


Author: plenyi at redhat.com
Date: 2010-07-27 11:26:49 -0400 (Tue, 27 Jul 2010)
New Revision: 13517

Modified:
   branches/community/Seam_2_2/src/test/ftest/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java
Log:
Fixed seamdiscs functional tests failing in Internet Explorer on Windows.

Modified: branches/community/Seam_2_2/src/test/ftest/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java	2010-07-27 09:07:36 UTC (rev 13516)
+++ branches/community/Seam_2_2/src/test/ftest/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java	2010-07-27 15:26:49 UTC (rev 13517)
@@ -25,6 +25,7 @@
 
 import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
 import org.testng.annotations.BeforeMethod;
+import com.thoughtworks.selenium.SeleniumException;
 
 import static org.testng.AssertJUnit.assertTrue;
 import static org.testng.AssertJUnit.fail;
@@ -128,8 +129,12 @@
       assertTrue("This is not expected (" + expectedDiscTitle + ") album (" + actualDiscTitle + ")!", actualDiscTitle.equals(expectedDiscTitle));
       
       String actualReleaseDate = "";
-      if (browser.isElementPresent(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow) + "/attribute::value")) {
-         actualReleaseDate = browser.getAttribute(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow) + "@value");
+      if (browser.isElementPresent(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow))) {
+         try {
+            actualReleaseDate = browser.getAttribute(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow) + "@value");
+         } catch (SeleniumException ex) {
+            // intentianally left blank
+         }
          assertTrue("This is not expected (" + expectedReleaseDate + ") release date (" + actualReleaseDate + ")!", actualReleaseDate.equals(expectedReleaseDate));
       }
 



More information about the seam-commits mailing list