Skip to content

Commit

Permalink
Fix selenium issue (#2236)
Browse files Browse the repository at this point in the history
https: //github.com/SeleniumHQ/selenium/issues/11750
https: //www.selenium.dev/blog/2022/using-java11-httpclient/

- cherry-picked from develop branch,
as 74.5.x branch CI has the same issue.

Co-authored-by: Peter Chen <peterch@vmware.com>
  • Loading branch information
2 people authored and hsinn0 committed Mar 20, 2023
1 parent b2d4a69 commit 35a83dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ libraries.mockitoJunit5 = "org.mockito:mockito-junit-jupiter"
libraries.passay = "org.passay:passay:1.6.2"
libraries.beanutils = "commons-beanutils:commons-beanutils:1.9.4"
libraries.postgresql = "org.postgresql:postgresql"
libraries.selenium = "org.seleniumhq.selenium:selenium-java"
libraries.selenium = "org.seleniumhq.selenium:selenium-java:4.8.1"
libraries.seleniumHttp = "org.seleniumhq.selenium:selenium-http-jdk-client:4.8.1"
libraries.slf4jApi = "org.slf4j:slf4j-api"
libraries.slf4jImpl = "org.apache.logging.log4j:log4j-slf4j-impl"
libraries.snakeyaml = "org.yaml:snakeyaml"
Expand Down
1 change: 1 addition & 0 deletions uaa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies {
testImplementation(libraries.hibernateValidator)
testImplementation(libraries.junit)
testImplementation(libraries.selenium)
testImplementation(libraries.seleniumHttp)
testImplementation(libraries.dumbster)
testImplementation(libraries.zxing)
testImplementation(libraries.jsonAssert)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderCon
public ChromeDriver webDriver() {
System.setProperty("webdriver.chrome.logfile", "/tmp/chromedriver.log");
System.setProperty("webdriver.chrome.verboseLogging", "true");
System.setProperty("webdriver.http.factory", "jdk-http-client");

ChromeOptions options = new ChromeOptions();
options.addArguments(
Expand All @@ -63,7 +64,8 @@ public ChromeDriver webDriver() {
"--allow-running-insecure-content",
"--allow-insecure-localhost",
"--no-sandbox",
"--disable-gpu"
"--disable-gpu",
"--remote-allow-origins=*"
);

LoggingPreferences logs = new LoggingPreferences();
Expand Down

0 comments on commit 35a83dc

Please sign in to comment.