mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-20 07:22:32 +00:00
added more convenience method.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12318 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
2df9ccab33
commit
7f98ffbd24
1 file changed
+18
@@ -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,"");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user