2011-12-07 10 views
2

私はプロキシ設定をしてもFirefoxのドライバに問題があります。設定は適切に解決されていますが、遅くなり、Firefoxのドライバーはプログラムを続行できません。私の目的は、Googleを開いていくつかの検索基準を入力し、この基準を提出し、表示されている結果ページの1つを開くことです。私はプロキシを使わないとすべてが良いです。ここに私のコードは、プロキシのためにある:FirefoxのドライバがSelenium 2で動作するのが遅すぎる

 FirefoxProfile profile = new FirefoxProfile(); 
     profile.setPreference("network.proxy.type", 1); 
     profile.setPreference("network.proxy.http","some Proxy"); 
     profile.setPreference("network.proxy.http_port", port); 
     driver = new FirefoxDriver(profile); 
+1

そして、あなたはあなたのFirefoxで手動でプロキシ設定を使用している場合、ブラウジングは、滑らかすぎますか? –

答えて

0

1以下で試してみてください:

FirefoxProfile profile = new FirefoxProfile();   
profile.setPreference("network.proxy.type", ProxyType.AUTODETECT.ordinal());  
WebDriver driver = new FirefoxDriver(profile); 
関連する問題