Class TapirHtmlUnitDriver

  • All Implemented Interfaces:
    org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.WebDriver

    public class TapirHtmlUnitDriver
    extends org.openqa.selenium.htmlunit.HtmlUnitDriver
    The TapirHtmlUnitDriver fixes some issues with HtmlUnitDriver.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    See Also:
    TapirThreadedRefreshHandler
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.openqa.selenium.htmlunit.HtmlUnitDriver

        org.openqa.selenium.htmlunit.HtmlUnitDriver.HtmlUnitWindow, org.openqa.selenium.htmlunit.HtmlUnitDriver.JavaScriptResultsCollection
      • Nested classes/interfaces inherited from interface 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Object PAGE_SYNCHROIZATION_OBJECT
      Synchronization point for lastPage()
      • Fields inherited from class org.openqa.selenium.htmlunit.HtmlUnitDriver

        BROWSER_LANGUAGE_CAPABILITY, DOWNLOAD_IMAGES_CAPABILITY, INVALIDSELECTIONERROR, INVALIDXPATHERROR, JAVASCRIPT_ENABLED
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <X> X implicitlyWaitFor​(java.util.concurrent.Callable<X> condition)  
      com.gargoylesoftware.htmlunit.Page lastPage()  
      protected com.gargoylesoftware.htmlunit.WebClient modifyWebClient​(com.gargoylesoftware.htmlunit.WebClient client)  
      void setHTTPProxy​(java.lang.String host, int port, java.util.Optional<java.lang.String> username, java.util.Optional<java.lang.String> password, java.util.List<java.lang.String> noProxyHosts)  
      • Methods inherited from class 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, getWebClient, getWindowHandle, getWindowHandles, isAcceptSslCertificates, isDownloadImages, isJavascriptEnabled, manage, navigate, newWebClient, pickWindow, quit, setAcceptSslCertificates, setAutoProxy, setDownloadImages, setExecutor, setHTTPProxy, setJavascriptEnabled, setProxy, setProxySettings, setSocksProxy, setSocksProxy, switchTo, toWebElement
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PAGE_SYNCHROIZATION_OBJECT

        public static final java.lang.Object PAGE_SYNCHROIZATION_OBJECT
        Synchronization point for lastPage()
        Since:
        2.0.0
    • Constructor Detail

      • TapirHtmlUnitDriver

        @Deprecated
        public TapirHtmlUnitDriver()
        Constructs a new instance with JavaScript disabled, and the default BrowserVersion.
        Since:
        2.0.0
      • TapirHtmlUnitDriver

        @Deprecated
        public TapirHtmlUnitDriver​(boolean enableJavascript)
        Constructs a new instance, specify JavaScript support and using the default BrowserVersion.
        Parameters:
        enableJavascript - whether to enable JavaScript support or not
        Since:
        2.0.0
      • TapirHtmlUnitDriver

        @Deprecated
        public TapirHtmlUnitDriver​(com.gargoylesoftware.htmlunit.BrowserVersion version,
                                   boolean enableJavascript)
        Constructs a new instance with the specified BrowserVersion and the JavaScript support.
        Parameters:
        version - the browser version to use
        enableJavascript - whether to enable JavaScript support or not
        Since:
        2.0.0
      • TapirHtmlUnitDriver

        @Deprecated
        public TapirHtmlUnitDriver​(com.gargoylesoftware.htmlunit.BrowserVersion version)
        Constructs a new instance with the specified BrowserVersion.
        Parameters:
        version - the browser version to use
        Since:
        2.0.0
      • TapirHtmlUnitDriver

        public TapirHtmlUnitDriver​(org.openqa.selenium.Capabilities capabilities)
        Constructs a new instance with the specified BrowserVersion.
        Parameters:
        capabilities - the capabilities to use
        Since:
        3.5.0
    • Method Detail

      • implicitlyWaitFor

        protected <X> X implicitlyWaitFor​(java.util.concurrent.Callable<X> condition)
        Overrides:
        implicitlyWaitFor in class org.openqa.selenium.htmlunit.HtmlUnitDriver
      • modifyWebClient

        protected com.gargoylesoftware.htmlunit.WebClient modifyWebClient​(com.gargoylesoftware.htmlunit.WebClient client)
        Overrides:
        modifyWebClient in class org.openqa.selenium.htmlunit.HtmlUnitDriver
      • setHTTPProxy

        public void setHTTPProxy​(java.lang.String host,
                                 int port,
                                 java.util.Optional<java.lang.String> username,
                                 java.util.Optional<java.lang.String> password,
                                 java.util.List<java.lang.String> noProxyHosts)
      • lastPage

        public com.gargoylesoftware.htmlunit.Page lastPage()
        Overrides:
        lastPage in class org.openqa.selenium.htmlunit.HtmlUnitDriver