0

Java で Selenium を使用して FirefoxDriver をセットアップしたいと考えています。私は次のようにそれを試しました:

    FirefoxProfile profile = new FirefoxProfile();
    profile.setPreference("network.proxy.http", "proxy");
    profile.setPreference("network.proxy.http_port", "1234");
    WebDriver driver = new FirefoxDriver(profile);

    driver.get("http://www.stackoverflow.com");

しかし、それは常に私にエラーを与えます:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

これをグーグルで調べた後、これは一般的な問題であることが判明しましたが、解決策が見つかりませんでした! 私は selenium-server-standalone-2.41.0.jar と Firefox 29.0 を使用しています。

4

1 に答える 1

1

Firefox ブラウザで手動でプロキシの詳細を設定してみて、アクセスできるかどうかを確認してください。

于 2014-05-30T13:47:27.723 に答える