You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2023/01/15 13:18:43 UTC

[tapestry-5] 02/02: Adding a bit of test code for our tests

This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch better-page-invalidation
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit b8d3cbb777896033579550088d4b4d6d85041d06
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Sun Jan 15 10:18:29 2023 -0300

    Adding a bit of test code for our tests
---
 .../main/java/org/apache/tapestry5/test/SeleniumTestCase.java  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
index 339e28ed8..be431348e 100644
--- a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
+++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
@@ -1696,7 +1696,15 @@ public abstract class SeleniumTestCase extends Assert implements Selenium
         // openBaseURL() couldn't find it.
         if (linkText.length > 0)
         {
-            waitForCondition(ExpectedConditions.presenceOfElementLocated(By.linkText(linkText[0])), 3);
+            try 
+            {
+                waitForCondition(ExpectedConditions.presenceOfElementLocated(By.linkText(linkText[0])), 3);
+            }
+            catch (org.openqa.selenium.TimeoutException e)
+            {
+                LOGGER.warn("Current URL: {} Page content: {}", getHtmlSource());
+                throw e;
+            }
         }
         
         if (getTitle().toLowerCase().contains("service unavailable")) {