Java用に3.0.0-beta2のSeleniumを使用しています。プロキシを設定できません。私は多くのことを試しましたが、何も動いていません。Seleniumを使用してFirefox用のプロファイルを作成できません
`FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http", "someproxy");
profile.setPreference("network.proxy.http_port", 3128);
WebDriver driver = new FirefoxDriver(profile);`
私はFirefox用geckodriverを使用しています:私は、私もこれを試してみました、
`String PROXY = "localhost:8080";
DesiredCapabilities.
Proxy proxy = new Proxy();
proxy.setHttpProxy(PROXY).setFtpProxy(PROXY).setSslProxy(PROXY)
.setSocksProxy(PROXY);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);
driver = new FirefoxDriver(cap);`
を以下を試してみました。私はまた、プロキシ機能はまだサポートされていないhereを発見し、この
System.setProperty("webdriver.gecko.driver", ".\\lib\\geckodriver.exe");
などのシステムプロパティとして定義されます。プロキシを設定する方法はありますか?
Shivshanker Mhadiwale Tried。 Din't仕事:( –