我正在使用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
的网页?