提交 7f98ffbd 编写于 作者: K kohsuke

added more convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12318 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2df9ccab
......@@ -15,6 +15,7 @@ import hudson.model.Hudson;
import hudson.model.Item;
import hudson.model.UpdateCenter;
import hudson.model.Saveable;
import hudson.model.Run;
import hudson.tasks.Mailer;
import hudson.Launcher.LocalLauncher;
import hudson.util.StreamTaskListener;
......@@ -332,6 +333,23 @@ public abstract class HudsonTestCase extends TestCase {
return this;
}
/**
* Short for {@code getPage(r,"")}, to access the top page of a build.
*/
public HtmlPage getPage(Run r) throws IOException, SAXException {
return getPage(r,"");
}
/**
* Accesses a page inside {@link Run}.
*
* @param relative
* Relative URL within the build URL, like "changes". Doesn't start with '/'. Can be empty.
*/
public HtmlPage getPage(Run r, String relative) throws IOException, SAXException {
return goTo(r.getUrl()+relative);
}
public HtmlPage getPage(Item item) throws IOException, SAXException {
return getPage(item,"");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册