1
Im在使用phantomjs驱动程序在硒中添加代理时遇到问题。 这是我的代码:Selenium中使用phantomjs驱动程序C代理#
Proxy proxy = new Proxy();
proxy.HttpProxy = string.Format("xxx.xx.xxx.xxx:xxxx");
//options.AddAdditionalCapability(CapabilityType.Proxy, "xxx.xx.xxx.xxx:xxxx");
service.ProxyType = "HTTP";
service.Proxy = "222.88.236.236:81";
service.HideCommandPromptWindow = true;
service.IgnoreSslErrors = true;
service.WebSecurity = false;
service.LocalToRemoteUrlAccess = true;
service.LoadImages = false;
webDriver = new PhantomJSDriver(service, options);
此代码在这里有时有效。我只是使用Web中可用的代理列表。不太稳定。 也可以向我解释代理身份验证吗?
请帮助我。我很喜欢这个!谢谢!