我是新來的網絡驅動程序,並試圖做一些簡單的自動化。我只是想啓動瀏覽器並使用selenium webdriver打開一個網頁。我設置了eclipse-selenium並啓動了Firefox,但沒有打開我指定的網頁。我收到了一些奇怪的錯誤。我瀏覽瞭解決方案並嘗試了很多我發現的建議。無法通過硒webdriver在Firefox中打開網頁
這裏是我試圖執行代碼:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class orderingpizza {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com/");
我正的錯誤是:
產生的原因:org.openqa.selenium.firefox.NotConnectedException:無法在45000毫秒後通過端口7055連接到主機127.0.0.1。 Firefox控制檯輸出:
我使用Selenium java 2.42.2,FF 29.這是什麼問題?
嘗試您使用SEL和Firefox火狐升級到31 – 2014-08-29 08:04:46
什麼版本? – Decypher 2014-08-29 08:41:48
當我與WebDriver和Chrome出現類似錯誤時。我不得不重新安裝Chrome,然後開始工作。 – 2014-08-29 10:58:47