如何在selenium和chromedriver中设置https代理?这是我的代码 设置http代理。
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\lll\\Desktop\\chromedriver.exe");
DesiredCapabilities cap = new DesiredCapabilities();
Proxy proxy=new Proxy();
String proxyIpAndPort= "123.123.123.123:31288";
proxy.setHttpProxy(proxyIpAndPort).setFtpProxy(proxyIpAndPort).setSslProxy(proxyIpAndPort);
cap.setCapability(CapabilityType.ForSeleniumServer.AVOIDING_PROXY, true);
cap.setCapability(CapabilityType.ForSeleniumServer.ONLY_PROXYING_SELENIUM_TRAFFIC, true);
cap.setCapability(CapabilityType.PROXY, proxy);
driver = new ChromeDriver(cap);
但是如何设置https代理?我试过了:
1.String proxyIpAndport =“123.123.123.123:443”,它不是互联网。
2.String proxyIpAndPort =“123.123.123.123:443@HTTPS”,它无法代理工作。