You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/07/24 16:30:22 UTC

svn commit: r1365082 - /myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java

Author: lofwyr
Date: Tue Jul 24 14:30:22 2012
New Revision: 1365082

URL: http://svn.apache.org/viewvc?rev=1365082&view=rev
Log:
TOBAGO-1174: Easier handling of Selenium tests
- make test more robust

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java?rev=1365082&r1=1365081&r2=1365082&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumScript.java Tue Jul 24 14:30:22 2012
@@ -61,6 +61,11 @@ public class SeleniumScript {
     DocumentFragment fragment = document.createDocumentFragment();
     try {
       parser.parse(scriptUrl, fragment);
+      // not nice, it seems that parse also throws a FileNotFoundException sometimes.
+      // XXX I don't know why
+      if (fragment.getTextContent().contains("The page was not found!")) {
+        throw new FileNotFoundException(scriptUrl);
+      }
       addSeleniumItems(fragment, url);
     } catch (FileNotFoundException e) {
       // using default