类 WebConnectionHtmlUnitDriver

java.lang.Object
org.openqa.selenium.htmlunit.HtmlUnitDriver
cn.taketoday.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver
所有已实现的接口:
org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.WebDriver

public class WebConnectionHtmlUnitDriver extends org.openqa.selenium.htmlunit.HtmlUnitDriver
WebConnectionHtmlUnitDriver enables configuration of the WebConnection for an HtmlUnitDriver instance.

This is useful because it allows a MockMvcWebConnection to be injected.

从以下版本开始:
4.0
作者:
Rob Winch, Sam Brannen, Juergen Hoeller
另请参阅:
  • 嵌套类概要

    从类继承的嵌套类/接口 org.openqa.selenium.htmlunit.HtmlUnitDriver

    org.openqa.selenium.htmlunit.HtmlUnitDriver.ElementsMap, org.openqa.selenium.htmlunit.HtmlUnitDriver.JavaScriptResultsCollection

    从接口继承的嵌套类/接口 org.openqa.selenium.WebDriver

    org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
  • 字段概要

    从类继承的字段 org.openqa.selenium.htmlunit.HtmlUnitDriver

    BROWSER_LANGUAGE_CAPABILITY, DOWNLOAD_IMAGES_CAPABILITY, JAVASCRIPT_ENABLED
  • 构造器概要

    构造器
    构造器
    说明
     
    WebConnectionHtmlUnitDriver(boolean enableJavascript)
     
    WebConnectionHtmlUnitDriver(org.htmlunit.BrowserVersion browserVersion)
     
    WebConnectionHtmlUnitDriver(org.openqa.selenium.Capabilities capabilities)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    org.htmlunit.WebClient
    Return the current WebClient in a public fashion.
    org.htmlunit.WebConnection
    Access the current WebConnection for the WebClient.
    protected final org.htmlunit.WebClient
    modifyWebClient(org.htmlunit.WebClient webClient)
    Modify the supplied WebClient and retain a reference to it so that its WebConnection is accessible for later use.
    protected org.htmlunit.WebClient
    modifyWebClientInternal(org.htmlunit.WebClient webClient)
    Modify the supplied WebClient.
    void
    setWebConnection(org.htmlunit.WebConnection webConnection)
    Set the WebConnection to be used with the WebClient.

    从类继承的方法 org.openqa.selenium.htmlunit.HtmlUnitDriver

    assertElementNotStale, click, close, doubleClick, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, get, get, getAlert, getBrowserVersion, getCapabilities, getCurrentUrl, getCurrentWindow, getElementsMap, getKeyboard, getMouse, getPageSource, getTitle, getWindowHandle, getWindowHandles, implicitlyWaitFor, isAcceptInsecureCerts, isDownloadImages, isJavascriptEnabled, manage, mouseDown, mouseMove, mouseUp, navigate, newWebClient, openNewWindow, perform, quit, resetInputState, runAsync, sendKeys, setAcceptInsecureCerts, setAutoProxy, setCurrentWindow, setDownloadImages, setExecutor, setHTTPProxy, setJavascriptEnabled, setProxy, setProxySettings, setSocksProxy, setSocksProxy, submit, switchTo, switchToDefaultContentOfWindow, toWebElement

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.openqa.selenium.JavascriptExecutor

    executeScript, getPinnedScripts, pin, unpin
  • 构造器详细资料

    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver()
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(org.htmlunit.BrowserVersion browserVersion)
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(boolean enableJavascript)
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(org.openqa.selenium.Capabilities capabilities)
  • 方法详细资料

    • modifyWebClient

      protected final org.htmlunit.WebClient modifyWebClient(org.htmlunit.WebClient webClient)
      Modify the supplied WebClient and retain a reference to it so that its WebConnection is accessible for later use.

      Delegates to HtmlUnitDriver.modifyWebClient(org.htmlunit.WebClient) for default behavior and to modifyWebClientInternal(org.htmlunit.WebClient) for further customization.

      覆盖:
      modifyWebClient 在类中 org.openqa.selenium.htmlunit.HtmlUnitDriver
      参数:
      webClient - the client to modify
      返回:
      the modified client
      另请参阅:
    • modifyWebClientInternal

      protected org.htmlunit.WebClient modifyWebClientInternal(org.htmlunit.WebClient webClient)
      Modify the supplied WebClient.

      The default implementation simply returns the supplied client unmodified.

      Subclasses can override this method to customize the WebClient that the HtmlUnitDriver uses.

      参数:
      webClient - the client to modify
      返回:
      the modified client
    • getWebClient

      public org.htmlunit.WebClient getWebClient()
      Return the current WebClient in a public fashion.
      覆盖:
      getWebClient 在类中 org.openqa.selenium.htmlunit.HtmlUnitDriver
    • setWebConnection

      public void setWebConnection(org.htmlunit.WebConnection webConnection)
      Set the WebConnection to be used with the WebClient.
      参数:
      webConnection - the WebConnection to use
    • getWebConnection

      public org.htmlunit.WebConnection getWebConnection()
      Access the current WebConnection for the WebClient.
      返回:
      the current WebConnection