简体   繁体   中英

Selenium Webdriver and Firefox Server Not Found error

I'm using Win 7 64, Selenium IDE 2.5.0, WebDriver 2.42 and Eclipse Kepler SR2. I'm trying to launch the browser using driver.get but no matter what URL I put, I get the browser opening but with Server Not Found error. It is driving me crazy. It looks like it opens an instance of Firefox that doesn't look like the one I use to navigate Internet, it doesn't have my bookmarks and my addons and doesn't connect to Internet. Any help? Thanks.

This is the code that I'm using:

package com.packt.webdriver.chapter1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa
public class NavigateToAUrl {
    public static void main (String[] args) {
        WebDriver driver = new FirefoxDriver () ;
        driver.get("https://www.google.com");
    }

}

Try with the below code:

System.setProperty("webdriver.firefox.profile", "default");
FirefoxDriver driver = new FirefoxDriver();
driver.get("http://google.com/");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM