Java WebDriver chrome proxy authentication

13 views
Skip to first unread message

Milad Nazari

unread,
Jun 20, 2024, 3:28:49 AM (13 days ago) Jun 20
to Selenium Users
Hello!
I have tried to authenticate different proxies without any success in multiple ways.
I mostly get a Sign in popup.

What I have tried (unsuccessfully) so far:
1.
Proxy proxy = new Proxy();
proxy.setHttpProxy(proxyUrl + ":" + proxyPort);
proxy.setSslProxy(proxyUrl + ":" + proxyPort);

String proxyAuth = proxyUsername + ":" + proxyPassword;
String encodedAuth = Base64.getEncoder().encodeToString(proxyAuth.getBytes());

ChromeOptions options = new ChromeOptions();
options.setProxy(proxy);
options.addArguments("--proxy-auth=" + encodedAuth);

2.
Same setup as above but not encoded proxyAuth
options.addArguments("--proxy-auth=" proxyAuth);

3.
ChromeOptions options = new ChromeOptions();
options.addArguments(--proxy-server=

Does anyone know how to get the proxy authentication to work?


Reply all
Reply to author
Forward
0 new messages