diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-06-09 23:39:38 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-06-09 23:39:38 +0200 |
commit | aab52dc461840f4de98081a76016ec700bc49223 (patch) | |
tree | 5dbec117ec9e4c41ed615dd2c3529f814a0f31eb /archiva-modules | |
parent | 2513029e2e6c3333073c265fa496bc50fb2e405d (diff) | |
download | archiva-aab52dc461840f4de98081a76016ec700bc49223.tar.gz archiva-aab52dc461840f4de98081a76016ec700bc49223.zip |
Additional fix for chrome WebDriver
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java index 7922997e5..40d3f9852 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java @@ -639,6 +639,14 @@ public abstract class AbstractSeleniumTest ex = e; count--; } + try + { + Thread.currentThread().sleep(500); + } + catch ( InterruptedException e ) + { + // Ignore + } } if (ex!=null) { Assert.fail( message); @@ -671,16 +679,32 @@ public abstract class AbstractSeleniumTest Exception ex = null; while(count>0) { + if (count<attempts) { + try + { + result = conditions.apply( getWebDriver() ); + return result; + } catch (Exception e) { + // Ignore + } + } el.click(); try { result = wait.until( conditions ); - count=0; - ex = null; + return result; } catch (Exception e) { ex = e; count--; } + try + { + Thread.currentThread().sleep(500); + } + catch ( InterruptedException e ) + { + // Ignore + } } if (ex!=null) { Assert.fail( message); |