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

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 3620d10abb Task #2016 : remove chromedriver and dynamically load 
correct one
     new 04fc91edf4 Merge pull request #2017 from hansva/master
3620d10abb is described below

commit 3620d10abb5cdb121eee01eb6ee64e64db260c1a
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Wed Dec 7 16:05:56 2022 +0100

    Task #2016 : remove chromedriver and dynamically load correct one
---
 integration-tests/hopweb/pom.xml                     |   5 +++++
 .../java/org/apache/hop/ui/hopgui/HopWebTest.java    |   5 ++++-
 .../hopweb/src/test/resources/chromedriver           | Bin 13158208 -> 0 bytes
 .../hopweb/src/test/resources/chromedriver-mac       | Bin 17211808 -> 0 bytes
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/integration-tests/hopweb/pom.xml b/integration-tests/hopweb/pom.xml
index 8f57ed5205..8eaad51f75 100644
--- a/integration-tests/hopweb/pom.xml
+++ b/integration-tests/hopweb/pom.xml
@@ -66,6 +66,11 @@
             <version>1.17.6</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.github.bonigarcia</groupId>
+            <artifactId>webdrivermanager</artifactId>
+            <version>5.3.1</version>
+        </dependency>
     </dependencies>
 
     <reporting>
diff --git 
a/integration-tests/hopweb/src/test/java/org/apache/hop/ui/hopgui/HopWebTest.java
 
b/integration-tests/hopweb/src/test/java/org/apache/hop/ui/hopgui/HopWebTest.java
index 65c410814e..701f69d521 100644
--- 
a/integration-tests/hopweb/src/test/java/org/apache/hop/ui/hopgui/HopWebTest.java
+++ 
b/integration-tests/hopweb/src/test/java/org/apache/hop/ui/hopgui/HopWebTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.hop.ui.hopgui;
 
+import io.github.bonigarcia.wdm.WebDriverManager;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Order;
@@ -93,9 +94,11 @@ public class HopWebTest {
         isHeadless = Boolean.valueOf(properties.getProperty("headless"));
         transformsFile = properties.getProperty("transformsFile");
 
-        System.setProperty("webdriver.chrome.driver", 
driverFile.getAbsolutePath());
         System.setProperty("webdriver.chrome.whitelistedIps", "");
 
+        //Use webDriverManager to fetch correct chromedriver
+        WebDriverManager.chromedriver().setup();
+
         ChromeOptions options = new ChromeOptions();
         if (isHeadless) {
             options.addArguments("headless");
diff --git a/integration-tests/hopweb/src/test/resources/chromedriver 
b/integration-tests/hopweb/src/test/resources/chromedriver
deleted file mode 100755
index 696aabcb73..0000000000
Binary files a/integration-tests/hopweb/src/test/resources/chromedriver and 
/dev/null differ
diff --git a/integration-tests/hopweb/src/test/resources/chromedriver-mac 
b/integration-tests/hopweb/src/test/resources/chromedriver-mac
deleted file mode 100755
index 0b46cc423f..0000000000
Binary files a/integration-tests/hopweb/src/test/resources/chromedriver-mac and 
/dev/null differ

Reply via email to