我正在尝试从我的行为测试用例访问网页网址。以下代码用于:
@When("the user opens the sys admin login page of jset application")
public void openSysAdminLoginPage() throws Exception {
htmlPage = webClient.getPage("http://localhost:8080/jset/login.jsp");
assertEquals(200, htmlPage.getWebResponse().getStatusCode());
assertEquals("OK", htmlPage.getWebResponse().getStatusMessage());
}
在将应用程序部署到服务器上运行时,会抛出以下异常:
When the user opens the sys admin login page of jset application
10 Nov 2012 11:45:04,636 [main]ERROR com.gargoylesoftware.htmlunit.html.HtmlPage
Malformed refresh string (found ';' but no 'url='): 3600;
我可以从浏览器访问该页面。已经坚持了一段时间。有什么想法吗?
答案 0 :(得分:0)
通过在我的标头jsp文件中注释以下内容来解决它:
META HTTP-EQUIV =“刷新”内容=“3600”