提交 5f55f7e4 编写于 作者: K kohsuke

added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13980 71c3de6d-444a-0410-be80-ed276b4c234a
上级 597ee5ac
......@@ -318,6 +318,16 @@ public abstract class HudsonTestCase extends TestCase {
new BufferedReader(new InputStreamReader(System.in)).readLine();
}
/**
* Performs a search from the search box.
*/
protected Page search(String q) throws Exception {
HtmlPage top = new WebClient().goTo("");
HtmlForm search = top.getFormByName("search");
search.getInputByName("q").setValueAttribute(q);
return search.submit(null);
}
/**
* Asserts that the outcome of the build is a specific outcome.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册