Class TapirHtmlUnitDriver
- java.lang.Object
-
- org.openqa.selenium.htmlunit.HtmlUnitDriver
-
- de.bmiag.tapir.selenium.htmlunit.driver.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
TheTapirHtmlUnitDriver
fixes some issues withHtmlUnitDriver
.- It implements
implicitlyWaitFor(Callable)
in a more efficient way - Adds proxy support via system properties (http.proxyHost and http.proxyPort
- Sychronizes
lastPage()
calls - Uses
TapirThreadedRefreshHandler
asRefreshHandler
- 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 forlastPage()
-
Constructor Summary
Constructors Constructor Description TapirHtmlUnitDriver()
Deprecated.TapirHtmlUnitDriver(boolean enableJavascript)
Deprecated.TapirHtmlUnitDriver(com.gargoylesoftware.htmlunit.BrowserVersion version)
Deprecated.TapirHtmlUnitDriver(com.gargoylesoftware.htmlunit.BrowserVersion version, boolean enableJavascript)
Deprecated.TapirHtmlUnitDriver(org.openqa.selenium.Capabilities capabilities)
Constructs a new instance with the specifiedBrowserVersion
.
-
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
-
-
-
-
Field Detail
-
PAGE_SYNCHROIZATION_OBJECT
public static final java.lang.Object PAGE_SYNCHROIZATION_OBJECT
Synchronization point forlastPage()
- Since:
- 2.0.0
-
-
Constructor Detail
-
TapirHtmlUnitDriver
@Deprecated public TapirHtmlUnitDriver()
Deprecated.Constructs a new instance with JavaScript disabled, and thedefault
BrowserVersion.- Since:
- 2.0.0
-
TapirHtmlUnitDriver
@Deprecated public TapirHtmlUnitDriver(boolean enableJavascript)
Deprecated.Constructs a new instance, specify JavaScript support and using thedefault
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)
Deprecated.Constructs a new instance with the specifiedBrowserVersion
and the JavaScript support.- Parameters:
version
- the browser version to useenableJavascript
- whether to enable JavaScript support or not- Since:
- 2.0.0
-
TapirHtmlUnitDriver
@Deprecated public TapirHtmlUnitDriver(com.gargoylesoftware.htmlunit.BrowserVersion version)
Deprecated.Constructs a new instance with the specifiedBrowserVersion
.- 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 specifiedBrowserVersion
.- 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 classorg.openqa.selenium.htmlunit.HtmlUnitDriver
-
modifyWebClient
protected com.gargoylesoftware.htmlunit.WebClient modifyWebClient(com.gargoylesoftware.htmlunit.WebClient client)
- Overrides:
modifyWebClient
in classorg.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 classorg.openqa.selenium.htmlunit.HtmlUnitDriver
-
-