selenium+phantomjs方式下载页面,如何设置账号密码验证?
Java代码如下:(账号密码不知道怎么设置)
Proxy proxy = new Proxy();
proxy.setHttpProxy(ipport)
.setFtpProxy(ipport)
.setSslProxy(ipport);
proxy.setProxyType(Proxy.ProxyType.MANUAL);
proxy.setNoProxy("localhost");
// sCaps.setCapability(CapabilityType.ForSeleniumServer.AVOIDING_PROXY, true);
// sCaps.setCapability(CapabilityType.ForSeleniumServer.ONLY_PROXYING_SELENIUM_TRAFFIC, true);
sCaps.setCapability(CapabilityType.PROXY, proxy);