prompt window
I found 3 ways to setup a proxy for Selenium WebDriver:
- Pass as an argument like:
chromeOptions.addArguments("--proxy-server=http://104.239.10.110:5781");
- Create a Proxy object:
Proxy proxy = new Proxy();
proxy.setHttpProxy(proxyAddress + ":" + proxyPort);
proxy.setSslProxy(proxyAddress + ":" + proxyPort);
// Set proxy authentication
String proxyAuth = proxyUsername + ":" + proxyPassword;
proxy.setProxyType(Proxy.ProxyType.MANUAL);
proxy.setHttpProxy(proxyAuth + "@" + proxyAddress + ":" + proxyPort);
proxy.setSslProxy(proxyAuth + "@" + proxyAddress + ":" + proxyPort);
chromeOptions.setProxy(proxy);
- Create the extension and import it
2 and 3 aren’t working for me (no idea why). 1 is working but there is no option to setup username and password. So the questions are:
- Is there any way to setup a username+password?
- Chrome asks for a login and pass in a prompt window. Anybody know how to pass arguments there? In the documentation i found that i should handle it as an alert window but it also not works – no such alert error
Already tried all ways to setup a proxy with authentication.
Already tried to handle prompt window due to the documentation
New contributor
EviaaL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.