Class LocalHostWebClient

java.lang.Object
com.gargoylesoftware.htmlunit.WebClient
org.springframework.boot.test.web.htmlunit.LocalHostWebClient
All Implemented Interfaces:
Serializable, AutoCloseable

public class LocalHostWebClient extends com.gargoylesoftware.htmlunit.WebClient
WebClient will automatically prefix relative URLs with localhost:${local.server.port}.
Since:
1.4.0
Author:
Phillip Webb
See Also:
  • Field Summary

    Fields inherited from class com.gargoylesoftware.htmlunit.WebClient

    ABOUT_BLANK, ABOUT_SCHEME, TARGET_BLANK, TARGET_SELF, URL_ABOUT_BLANK
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <P extends com.gargoylesoftware.htmlunit.Page>
    P
     

    Methods inherited from class com.gargoylesoftware.htmlunit.WebClient

    addCookie, addRequestHeader, addWebWindowListener, close, containsWebWindow, deregisterWebWindow, download, expandUrl, getActiveXObjectMap, getAjaxController, getAlertHandler, getAppletConfirmHandler, getAttachmentHandler, getBrowserVersion, getCache, getClipboardHandler, getConfirmHandler, getCookieManager, getCookies, getCredentialsProvider, getCssErrorHandler, getCurrentWindow, getExecutor, getFrameContentHandler, getHTMLParserListener, getIncorrectnessListener, getInternals, getJavaScriptEngine, getJavaScriptErrorListener, getJavaScriptTimeout, getMSXMLActiveXObjectFactory, getOnbeforeunloadHandler, getOptions, getPage, getPage, getPage, getPageCreator, getPromptHandler, getRefreshHandler, getScriptPreProcessor, getStatusHandler, getStorageHolder, getTopLevelWindows, getWebConnection, getWebConsole, getWebStartHandler, getWebWindowByName, getWebWindows, guessContentType, initialize, initializeEmptyWindow, isJavaScriptEnabled, isJavaScriptEngineEnabled, loadDownloadedResponses, loadHtmlCodeIntoCurrentWindow, loadWebResponse, loadWebResponseInto, loadWebResponseInto, loadXHtmlCodeIntoCurrentWindow, openDialogWindow, openTargetWindow, openWindow, openWindow, printContentIfNecessary, registerWebWindow, removeRequestHeader, removeWebWindowListener, setActiveXObjectMap, setAjaxController, setAlertHandler, setAppletConfirmHandler, setAttachmentHandler, setCache, setClipboardHandler, setConfirmHandler, setCookieManager, setCredentialsProvider, setCssErrorHandler, setCurrentWindow, setExecutor, setFrameContentHandler, setHTMLParserListener, setIncorrectnessListener, setJavaScriptEngine, setJavaScriptErrorListener, setJavaScriptTimeout, setOnbeforeunloadHandler, setPageCreator, setPromptHandler, setRefreshHandler, setScriptPreProcessor, setStatusHandler, setWebConnection, setWebStartHandler, throwFailingHttpStatusCodeExceptionIfNecessary, waitForBackgroundJavaScript, waitForBackgroundJavaScriptStartingBefore

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocalHostWebClient

      public LocalHostWebClient(Environment environment)
  • Method Details

    • getPage

      public <P extends com.gargoylesoftware.htmlunit.Page> P getPage(String url) throws IOException, com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException
      Overrides:
      getPage in class com.gargoylesoftware.htmlunit.WebClient
      Throws:
      IOException
      com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException