Skip to content

Commit

Permalink
Change webdriver proxy settings and add todo #3622
Browse files Browse the repository at this point in the history
  • Loading branch information
winzj committed Nov 25, 2024
1 parent 1232db8 commit e4a4459
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,8 @@ public FirefoxDriver createFirefoxWebdriver(ProxyInformation proxyInformation, b

if (proxyInformation != null) {
LOG.info("Adding proxy to firefox browser options.");
String username = proxyInformation.getUsername();
String password = proxyInformation.getPassword();
String host = proxyInformation.getHost();
int port = proxyInformation.getPort();
// Realm seems to be not supported by default
String proxyString = null;
if (username != null && password != null) {
proxyString = "%s:%s@%s:%s".formatted(username, password, host, port);
} else {
proxyString = "%s:%s".formatted(host, port);
}
// TODO 2024-11-25 jan: add additional proxy data like credentials
String proxyString = "%s:%s".formatted(proxyInformation.getHost(), proxyInformation.getPort());
Proxy proxy = new Proxy();
proxy.setHttpProxy(proxyString);
proxy.setSslProxy(proxyString);
Expand Down

0 comments on commit e4a4459

Please sign in to comment.