繁体   English   中英

找不到Selenium Webdriver和Firefox Server错误

[英]Selenium Webdriver and Firefox Server Not Found error

我正在使用Win 7 64,Selenium IDE 2.5.0,WebDriver 2.42和Eclipse Kepler SR2。 我正在尝试使用driver.get启动浏览器,但是无论我输入什么URL,我都会打开浏览器,但出现“找不到服务器”错误。 这让我发疯。 似乎它打开了Firefox的一个实例,该实例看起来不像我用来浏览Internet的Firefox,它没有我的书签和附件,也没有连接到Internet。 有什么帮助吗? 谢谢。

这是我正在使用的代码:

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");
    }

}

尝试以下代码:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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