クラス WebConnectionHtmlUnitDriver

java.lang.ObjectSE
org.openqa.selenium.htmlunit.HtmlUnitDriver
org.springframework.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver
実装されたすべてのインターフェース:
org.openqa.selenium.HasCapabilitiesorg.openqa.selenium.interactions.HasInputDevicesorg.openqa.selenium.internal.FindsByClassNameorg.openqa.selenium.internal.FindsByCssSelectororg.openqa.selenium.internal.FindsByIdorg.openqa.selenium.internal.FindsByLinkTextorg.openqa.selenium.internal.FindsByNameorg.openqa.selenium.internal.FindsByTagNameorg.openqa.selenium.internal.FindsByXPathorg.openqa.selenium.JavascriptExecutororg.openqa.selenium.SearchContextorg.openqa.selenium.WebDriver

public class WebConnectionHtmlUnitDriver extends org.openqa.selenium.htmlunit.HtmlUnitDriver
WebConnectionHtmlUnitDriver は、HtmlUnitDriver インスタンスの WebConnection の構成を有効にします。

これは、MockMvcWebConnection を注入できるため便利です。

導入:
4.2
作成者:
Rob Winch, Sam Brannen, Juergen Hoeller
関連事項:
  • ネストされたクラスのサマリー

    クラス org.openqa.selenium.htmlunit.HtmlUnitDriver から継承されたネストクラス / インターフェース

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

    インターフェース org.openqa.selenium.WebDriver から継承されたネストクラス / インターフェース

    org.openqa.selenium.WebDriver.ImeHandler, 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, INVALIDSELECTIONERROR, INVALIDXPATHERROR, JAVASCRIPT_ENABLED
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
    WebConnectionHtmlUnitDriver(boolean enableJavascript)
    WebConnectionHtmlUnitDriver(com.gargoylesoftware.htmlunit.BrowserVersion browserVersion)
    WebConnectionHtmlUnitDriver(org.openqa.selenium.Capabilities capabilities)
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    com.gargoylesoftware.htmlunit.WebClient
    現在の WebClient を公開して返します。
    com.gargoylesoftware.htmlunit.WebConnection
    WebClient の現在の WebConnection にアクセスします。
    protected final com.gargoylesoftware.htmlunit.WebClient
    modifyWebClient(com.gargoylesoftware.htmlunit.WebClient webClient)
    付属の WebClient を変更し、その WebConnection に後で使用できるように、その WebClient への参照を保持します。
    protected com.gargoylesoftware.htmlunit.WebClient
    modifyWebClientInternal(com.gargoylesoftware.htmlunit.WebClient webClient)
    付属の WebClient を変更します。
    void
    setWebConnection(com.gargoylesoftware.htmlunit.WebConnection webConnection)
    WebClient で使用する WebConnection を設定します。

    クラス org.openqa.selenium.htmlunit.HtmlUnitDriver から継承されたメソッド

    assertElementNotStale, close, executeAsyncScript, executeScript, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, get, getBrowserVersion, getCapabilities, getCurrentUrl, getCurrentWindow, getElementById, getKeyboard, getMouse, getPageSource, getTitle, getWindowHandle, getWindowHandles, implicitlyWaitFor, isAcceptSslCertificates, isDownloadImages, isJavascriptEnabled, lastPage, manage, navigate, newWebClient, pickWindow, quit, setAcceptSslCertificates, setAutoProxy, setDownloadImages, setExecutor, setHTTPProxy, setJavascriptEnabled, setProxy, setProxySettings, setSocksProxy, setSocksProxy, switchTo, toWebElement

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver()
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(com.gargoylesoftware.htmlunit.BrowserVersion browserVersion)
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(boolean enableJavascript)
    • WebConnectionHtmlUnitDriver

      public WebConnectionHtmlUnitDriver(org.openqa.selenium.Capabilities capabilities)
  • メソッドの詳細

    • modifyWebClient

      protected final com.gargoylesoftware.htmlunit.WebClient modifyWebClient(com.gargoylesoftware.htmlunit.WebClient webClient)
      付属の WebClient を変更し、その WebConnection に後で使用できるように、その WebClient への参照を保持します。

      デフォルトの動作については HtmlUnitDriver.modifyWebClient(com.gargoylesoftware.htmlunit.WebClient) に、さらにカスタマイズするには modifyWebClientInternal(com.gargoylesoftware.htmlunit.WebClient) に委譲します。

      オーバーライド:
      クラス org.openqa.selenium.htmlunit.HtmlUnitDrivermodifyWebClient 
      パラメーター:
      webClient - 変更するクライアント
      戻り値:
      変更されたクライアント
      関連事項:
    • modifyWebClientInternal

      protected com.gargoylesoftware.htmlunit.WebClient modifyWebClientInternal(com.gargoylesoftware.htmlunit.WebClient webClient)
      付属の WebClient を変更します。

      デフォルトの実装は、提供されたクライアントを変更せずに返すだけです。

      サブクラスは、このメソッドをオーバーライドして、HtmlUnitDriver が使用する WebClient をカスタマイズできます。

      パラメーター:
      webClient - 変更するクライアント
      戻り値:
      変更されたクライアント
    • getWebClient

      public com.gargoylesoftware.htmlunit.WebClient getWebClient()
      現在の WebClient を公開して返します。
      オーバーライド:
      クラス org.openqa.selenium.htmlunit.HtmlUnitDrivergetWebClient 
      導入:
      4.3
    • setWebConnection

      public void setWebConnection(com.gargoylesoftware.htmlunit.WebConnection webConnection)
      WebClient で使用する WebConnection を設定します。
      パラメーター:
      webConnection - 使用する WebConnection 
    • getWebConnection

      public com.gargoylesoftware.htmlunit.WebConnection getWebConnection()
      WebClient の現在の WebConnection にアクセスします。
      戻り値:
      現在の WebConnection