|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gargoylesoftware.htmlunit.WebClient
org.jvnet.hudson.test.HudsonTestCase.WebClient
public class HudsonTestCase.WebClient
Extends WebClient and provide convenience methods
for accessing Hudson.
| Field Summary |
|---|
| Fields inherited from class com.gargoylesoftware.htmlunit.WebClient |
|---|
HTMLUNIT_COOKIE_POLICY, URL_ABOUT_BLANK |
| Constructor Summary | |
|---|---|
HudsonTestCase.WebClient()
|
|
| Method Summary | |
|---|---|
com.gargoylesoftware.htmlunit.WebRequestSettings |
addCrumb(com.gargoylesoftware.htmlunit.WebRequestSettings req)
Adds a security crumb to the quest |
java.net.URL |
createCrumbedUrl(java.lang.String relativePath)
Creates a URL with crumb parameters relative to { getContextPath() |
java.lang.String |
getContextPath()
Returns the URL of the webapp top page. |
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Item item)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Item item,
java.lang.String relative)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Node item)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Node item,
java.lang.String relative)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Run r)
Short for getPage(r,""), to access the top page of a build. |
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(Run r,
java.lang.String relative)
Accesses a page inside Run. |
com.gargoylesoftware.htmlunit.Page |
getPage(java.lang.String url)
Deprecated. This method expects a full URL. This method is marked as deprecated to warn you that you probably should be using goTo(String) method, which accepts
a relative path within the Hudson being tested. (IOW, if you really need to hit
a website on the internet, there's nothing wrong with using this method.) |
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(View view)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
getPage(View view,
java.lang.String relative)
|
com.gargoylesoftware.htmlunit.html.HtmlPage |
goTo(java.lang.String relative)
Requests a page within Hudson. |
com.gargoylesoftware.htmlunit.Page |
goTo(java.lang.String relative,
java.lang.String expectedContentType)
|
HudsonTestCase.WebClient |
login(java.lang.String username)
Logs in to Hudson, by using the user name as the password. |
HudsonTestCase.WebClient |
login(java.lang.String username,
java.lang.String password)
Logs in to Hudson. |
com.gargoylesoftware.htmlunit.html.HtmlPage |
search(java.lang.String q)
|
| Methods inherited from class com.gargoylesoftware.htmlunit.WebClient |
|---|
addHostsToProxyBypass, addRequestHeader, addWebWindowListener, deregisterWebWindow, encodeUrl, expandUrl, getActiveXObjectMap, getAjaxController, getAlertHandler, getAttachmentHandler, getBrowserVersion, getCache, getConfirmHandler, getCredentialsProvider, getCurrentWindow, getHomePage, getHTMLParserListener, getIgnoreOutsideContent, getIncorrectnessListener, getJavaScriptEngine, getJavaScriptTimeout, getLog, getOnbeforeunloadHandler, getPage, getPage, getPage, getPage, getPageCreator, getPrintContentOnFailingStatusCode, getPromptHandler, getProxyConfig, getRefreshHandler, getScriptPreProcessor, getStatusHandler, getTimeout, getWebConnection, getWebWindowByName, getWebWindows, guessContentType, initialize, initialize, initializeEmptyWindow, isCookiesEnabled, isCssEnabled, isJavaScriptEnabled, isPopupBlockerEnabled, isRedirectEnabled, isThrowExceptionOnFailingAjax, isThrowExceptionOnFailingStatusCode, isThrowExceptionOnScriptError, loadWebResponse, loadWebResponseInto, openWindow, openWindow, popFirstWindow, printContentIfNecessary, pushClearFirstWindow, registerWebWindow, removeHostsFromProxyBypass, removeRequestHeader, removeWebWindowListener, setActiveXObjectMap, setAjaxController, setAlertHandler, setAttachmentHandler, setCache, setConfirmHandler, setCookiesEnabled, setCredentialsProvider, setCssEnabled, setCurrentWindow, setHomePage, setHTMLParserListener, setIgnoreOutsideContent, setIncorrectnessListener, setJavaScriptEnabled, setJavaScriptEngine, setJavaScriptTimeout, setOnbeforeunloadHandler, setPageCreator, setPopupBlockerEnabled, setPrintContentOnFailingStatusCode, setPromptHandler, setProxyConfig, setProxyHost, setProxyPort, setRedirectEnabled, setRefreshHandler, setScriptPreProcessor, setStatusHandler, setThrowExceptionOnFailingAjax, setThrowExceptionOnFailingStatusCode, setThrowExceptionOnScriptError, setTimeout, setUseInsecureSSL, setWebConnection, throwFailingHttpStatusCodeExceptionIfNecessary |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HudsonTestCase.WebClient()
| Method Detail |
|---|
public HudsonTestCase.WebClient login(java.lang.String username,
java.lang.String password)
throws java.lang.Exception
java.lang.Exception
public HudsonTestCase.WebClient login(java.lang.String username)
throws java.lang.Exception
See HudsonTestCase.configureUserRealm() for how the container is set up with the user names
and passwords. All the test accounts have the same user name and password.
java.lang.Exception
public com.gargoylesoftware.htmlunit.html.HtmlPage search(java.lang.String q)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Run r)
throws java.io.IOException,
org.xml.sax.SAXException
getPage(r,""), to access the top page of a build.
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Run r,
java.lang.String relative)
throws java.io.IOException,
org.xml.sax.SAXException
Run.
relative - Relative URL within the build URL, like "changes". Doesn't start with '/'. Can be empty.
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Item item)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Item item,
java.lang.String relative)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Node item)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(Node item,
java.lang.String relative)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(View view)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.html.HtmlPage getPage(View view,
java.lang.String relative)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.Page getPage(java.lang.String url)
throws java.io.IOException,
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException
goTo(String) method, which accepts
a relative path within the Hudson being tested. (IOW, if you really need to hit
a website on the internet, there's nothing wrong with using this method.)
getPage in class com.gargoylesoftware.htmlunit.WebClientjava.io.IOException
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException
public com.gargoylesoftware.htmlunit.html.HtmlPage goTo(java.lang.String relative)
throws java.io.IOException,
org.xml.sax.SAXException
relative - Relative path within Hudson. Starts without '/'.
For example, "job/test/" to go to a job top page.
java.io.IOException
org.xml.sax.SAXException
public com.gargoylesoftware.htmlunit.Page goTo(java.lang.String relative,
java.lang.String expectedContentType)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXExceptionpublic java.lang.String getContextPath()
public com.gargoylesoftware.htmlunit.WebRequestSettings addCrumb(com.gargoylesoftware.htmlunit.WebRequestSettings req)
public java.net.URL createCrumbedUrl(java.lang.String relativePath)
throws java.net.MalformedURLException
getContextPath()
java.net.MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||