Author: lfryc(a)redhat.com
Date: 2009-12-02 02:41:13 -0500 (Wed, 02 Dec 2009)
New Revision: 16033
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/RichfacesSelenium.java
Log:
- RichfacesSelenium modified to throw AssertionError instead of SeleniumException (and
removed modifications of stacktrace)
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/RichfacesSelenium.java
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/RichfacesSelenium.java 2009-12-02
01:39:54 UTC (rev 16032)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/RichfacesSelenium.java 2009-12-02
07:41:13 UTC (rev 16033)
@@ -38,22 +38,22 @@
"ERROR: Threw an exception: Object doesn't support this property or
method" };
private <T> T doAjax(final Command<T> command) {
+ final AssertionError fail = new AssertionError("Fails with Permission denied when
trying to execute jQuery");
+
final T start = null;
- final SeleniumException fail = new SeleniumException(
- "Fails with Permission denied when trying to execute jQuery");
-
- return
Wait.timeout(Wait.DEFAULT_TIMEOUT).interval(25).failWith(fail).waitForChangeAndReturn(start,
+ return
Wait.timeout(Wait.DEFAULT_TIMEOUT).interval(1000).failWith(fail).waitForChangeAndReturn(start,
new Retrieve<T>() {
public T retrieve() {
try {
return command.command();
} catch (SeleniumException e) {
final String message = StringUtils.defaultString(e.getMessage());
+
if (ArrayUtils.contains(PERMISSION_DENIED, message)) {
- fail.setStackTrace((StackTraceElement[]) ArrayUtils.add(fail.getStackTrace(), e
- .getStackTrace()[0]));
+ System.err.println(message);
return null;
}
+
throw e;
}
}
Show replies by date