[英]How to set multiple proxies in Selenium Webdriver Java
我的要求是打开我的项目网站,它需要两个不同的代理。 如何使用Selenium Webdriver处理它?
请帮我。
你还没有提到你正在使用的驱动程序(Firefox,Chrome,..),但这是你为Firefox做的:
FirefoxProfile profile = new FirefoxProfile();
profile.setEnableNativeEvents(true);
profile.setPreference("network.proxy.http_port", proxyPort);
profile.setPreference("network.proxy.ssl", proxyHost);
profile.setPreference("network.proxy.ssl_port", proxyPort);
FirefoxDriver driver = new FirefoxDriver(profile);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.