Skip to content

Commit

Permalink
adding workaround for selenium httpclient issue (see notes)
Browse files Browse the repository at this point in the history
An updated version of the chromium webdriver fails due to some
issue with the httpclient that selenium uses.  The gist
is that chromedriveer refuses connections from selenium because
something about the request headers makes the chromedriver
rejects the connection as "remote" (or somesuch).  Work-around
was to allow chromedriver to accept remote connections.  This
doesn't affect the security of digital antiquity's filrewalled
build server, but worth noting.

 More info:
- https://stackoverflow.com/questions/75678572/java-io-ioexception-invalid-status-code-403-text-forbidden
- SeleniumHQ/selenium#11750
  • Loading branch information
jtdevos committed Apr 6, 2023
1 parent bc2f178 commit 1253a2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ private static void initBrowser() throws IOException {
// http://peter.sh/experiments/chromium-command-line-switches/
// ignore-certificate-errors ?
copts.addArguments(
"--remote-allow-origins=*"
"binary=" + CONFIG.getChromeApplicationPath(), // NOTE BINARY is needed for LINUX, may not be for Mac or Windows
"user-data-dir=" + browserProfileDir.getAbsolutePath(), // use specific profile path (random by default?)
// "bwsi" //browse without signin
"browser.passwords=false",
"--ignore-certificate-errors",
"--disable-features=ChromeWhatsNewUI",

"noerrdialogs");

copts.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
Expand Down

0 comments on commit 1253a2d

Please sign in to comment.