archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marti...@apache.org
Subject [47/50] archiva git commit: Trying additional fix for chrome WebDriver
Date Sat, 10 Jun 2017 11:26:32 GMT
Trying additional fix for chrome WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/0643a0fb
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/0643a0fb
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/0643a0fb

Branch: refs/heads/citest
Commit: 0643a0fb3f08fe80f2a5317569dc17108ca1d6ca
Parents: aab52dc
Author: Martin Stockhammer <martin_s@apache.org>
Authored: Sat Jun 10 00:20:04 2017 +0200
Committer: Martin Stockhammer <martin_s@apache.org>
Committed: Sat Jun 10 00:20:04 2017 +0200

----------------------------------------------------------------------
 .../web/test/parent/AbstractSeleniumTest.java       | 16 +++++++++++++---
 src/ci/docker/webtest/Dockerfile                    |  4 ++--
 src/ci/scripts/container_webtest.sh                 |  3 +++
 3 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
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 40d3f98..df0c09d 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
@@ -37,6 +37,7 @@ import java.util.function.Function;
 
 import org.openqa.selenium.*;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.interactions.Actions;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.FluentWait;
 import org.openqa.selenium.support.ui.Select;
@@ -626,16 +627,24 @@ public abstract class AbstractSeleniumTest
         WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
         V result = null;
         Exception ex = null;
+        WebElement el = null;
         while(count>0)
         {
             try
             {
-                WebElement el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator
));
+                el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator
));
+                Actions actions = new Actions(getWebDriver());
+                actions.moveToElement(el);
+                actions.perform();
                 el.click();
                 result = wait.until( conditions  );
-                count=0;
-                ex = null;
+                return result;
             } catch (Exception e) {
+                logger.info("Error: {}, {}, {}",count,e.getClass().getName(), e.getMessage());
+                if (el!=null) {
+                    Point elLoc = el.getLocation();
+                    logger.info("Location: x={} y={}", elLoc.getX(), elLoc.getY());
+                }
                 ex = e;
                 count--;
             }
@@ -694,6 +703,7 @@ public abstract class AbstractSeleniumTest
                 result = wait.until( conditions  );
                 return result;
             } catch (Exception e) {
+                logger.info("Error: {}, {}",count, e.getMessage());
                 ex = e;
                 count--;
             }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/src/ci/docker/webtest/Dockerfile
----------------------------------------------------------------------
diff --git a/src/ci/docker/webtest/Dockerfile b/src/ci/docker/webtest/Dockerfile
index b4c416f..8a7c2d0 100644
--- a/src/ci/docker/webtest/Dockerfile
+++ b/src/ci/docker/webtest/Dockerfile
@@ -65,8 +65,8 @@ COPY chrome_launcher.sh /usr/bin/google-chrome
 RUN chmod +x /opt/bin/entry_point.sh
 RUN chmod +x /usr/bin/google-chrome
 
-ENV SCREEN_WIDTH 1360
-ENV SCREEN_HEIGHT 1020
+ENV SCREEN_WIDTH 1600
+ENV SCREEN_HEIGHT 1200
 ENV SCREEN_DEPTH 24
 ENV X_START_NUM=3
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/src/ci/scripts/container_webtest.sh
----------------------------------------------------------------------
diff --git a/src/ci/scripts/container_webtest.sh b/src/ci/scripts/container_webtest.sh
index e06d5d2..fbd2c1a 100644
--- a/src/ci/scripts/container_webtest.sh
+++ b/src/ci/scripts/container_webtest.sh
@@ -33,6 +33,9 @@ INSTANCE_NAME="archiva-webtest"
 PORT_MAPPING="4444:4444"
 NETWORK_TYPE="host"
 
+export SCREEN_WIDTH="1600"
+export SCREEN_HEIGHT="1200"
+
 HERE=`dirname $0`
 
 TAG="${CONTAINER_NAME}:${CONTAINER_VERSION}"


Mime
View raw message