Author: drobiazko
Date: Thu Jul 7 18:48:23 2011
New Revision: 1143967
URL: http://svn.apache.org/viewvc?rev=1143967&view=rev
Log:
Added waitForAjaxRequestsToComplete method.
Modified:
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
Modified:
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java?rev=1143967&r1=1143966&r2=1143967&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
Thu Jul 7 18:48:23 2011
@@ -1378,4 +1378,16 @@ public abstract class SeleniumTestCase e
throw ex;
}
}
+
+ /**
+ * Waits until all active XHR requests are completed.
+ *
+ * @since 5.3
+ *
+ * @param timeout timeout to wait for
+ */
+ protected final void waitForAjaxRequestsToComplete(String timeout)
+ {
+
waitForCondition("selenium.browserbot.getCurrentWindow().Ajax.activeRequestCount
== 0", timeout);
+ }
}