Selenium Firefox驱动程序没有通过端口从URL接收数据

时间:2015-01-13 02:29:52

标签: java selenium selenium-webdriver

我正在使用Selenium Firefox WebDriver从http://localhost:5000/mywebpage的REST服务接收数据。

我的网络驱动程序代码是:

public class MyClass
{
     //Target URL http://localhost:5000/mywebpage
     private WebDriver driver;

     @Before
     public void setup()
     {
           driver=new FirefoxDriver();
     }

     @Test
     public void myTest()
     {
           driver.get("http://127.0.0.1:5000/mywebpage"); //This will eventually timeout
           //If I setup my webserver to serve on port 80, everything works
           //e.g. driver.get("http://127.0.0.1/mywebpage");
     }
   ......
}

如何让Selenium检索my_url_here:5000/mywebpage的网页?

0 个答案:

没有答案