Selenium Webdriver - 使用driver.get()打开指定的URL时出现问题

时间:2014-02-19 13:22:34

标签: selenium selenium-webdriver

网址“http:// localhost :8080 / Login.aspx”正在打开“http:// www.localhost.com :8080 /登录.aspx“在firefox / chrome中,错误页面显示”The connection was reset The connection to the server was reset while the page was loading“。如何避免www。**。com问题?

我尝试在google中搜索解决方案,但是不能解决这个问题。

代码示例:

 `BeforeClass
public void Setup(){

    driver = new FirefoxDriver();
    driver.get("http://localhost:8080/Login.aspx");
    driver.manage().window().maximize();
}`

1 个答案:

答案 0 :(得分:-1)

使用open命令在IDE中尝试相同的操作,并检查它是否有效......如果只是导出代码并使用它。

希望它有效。