1 year ago
#3148
Muddyblack k
Java JRE what Modules are needed for Webdrivermanager?
I have created an exe with launch4j
that does with the help of Selenium
and Webdrivermanager
some webautomation. For this I created a small Java Runtime Engine
.
To create it I used jdeps to get all required dependencies: jdeps -s file.jar
.
But as you can see one has been not found and I think this causes my problem:
com.google.gson -> jdk8internals
com.google.gson -> java.base
com.google.gson -> java.logging
com.google.gson -> java.sql
com.google.gson -> java.xml
com.google.gson -> not found
I created my JRE
(Version 17.0.1) via: jlink --add-modules jdk.internal.ed,jdk.internal.jvmstat,jdk.internal.le,jdk.internal.opt,jdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,java.base,java.sql --compress=2 --output jre
The Error I get in my error file is as follows:
error is: io.github.bonigarcia.wdm.config.WebDriverManagerException: io.github.bonigarcia.wdm.config.WebDriverManagerException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
All code I have for Webdrivemanager is:
public static void startDriver(String preferredBrowser) throws Exception{
WebDriverManager.chromedriver().cachePath(driversPath).avoidOutputTree().setup();
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
driver = new ChromeDriver(options);
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})");
driver.get(visitingWebsite);
}
If I let it run via my JDK it does work so the problem is for 100% my JRE and a missing module for Webdrivemanager
. But I don't know why jdeps
can't find it.
I hope you can help me out.
Best Regards
Christian
java
selenium-webdriver
launch4j
jlink
jdeps
0 Answers
Your Answer