added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13980 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-12-30 15:49:58 +00:00
1 parent 597ee5ac73
commit 5f55f7e4d9
1 file changed
+10
@@ -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.
*/