Class HtmlUnitWebDriver
java.lang.Object
org.openqa.selenium.htmlunit.HtmlUnitDriver
org.apache.nutch.protocol.htmlunit.HtmlUnitWebDriver
- All Implemented Interfaces:
org.openqa.selenium.HasCapabilities,org.openqa.selenium.interactions.Interactive,org.openqa.selenium.JavascriptExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.WebDriver
public class HtmlUnitWebDriver
extends org.openqa.selenium.htmlunit.HtmlUnitDriver
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openqa.selenium.htmlunit.HtmlUnitDriver
org.openqa.selenium.htmlunit.HtmlUnitDriver.ElementsMap, org.openqa.selenium.htmlunit.HtmlUnitDriver.JavaScriptResultsCollectionNested classes/interfaces inherited from interface 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 -
Field Summary
Fields inherited from class org.openqa.selenium.htmlunit.HtmlUnitDriver
BROWSER_LANGUAGE_CAPABILITY, DOWNLOAD_IMAGES_CAPABILITY, JAVASCRIPT_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanUpDriver(org.openqa.selenium.WebDriver driver) static org.openqa.selenium.WebDrivergetDriverForPage(String url, Configuration conf) static StringgetHTMLContent(org.openqa.selenium.WebDriver driver, Configuration conf) static StringgetHtmlPage(String url, Configuration conf) Function for obtaining the HTML BODY using the selected selenium webdriver There are a number of configuration properties withinnutch-site.xmlwhich determine whether to take screenshots of the rendered pages and persist them as timestamped .png's into HDFS.protected com.gargoylesoftware.htmlunit.WebClientmodifyWebClient(com.gargoylesoftware.htmlunit.WebClient client) Methods inherited from class 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, getWebClient, getWindowHandle, getWindowHandles, implicitlyWaitFor, isAcceptSslCertificates, isDownloadImages, isJavascriptEnabled, manage, mouseDown, mouseMove, mouseUp, navigate, newWebClient, openNewWindow, perform, quit, resetInputState, runAsync, sendKeys, setAcceptSslCertificates, setAutoProxy, setCurrentWindow, setDownloadImages, setExecutor, setHTTPProxy, setJavascriptEnabled, setProxy, setProxySettings, setSocksProxy, setSocksProxy, submit, switchTo, switchToDefaultContentOfWindow, toWebElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.JavascriptExecutor
executeScript, getPinnedScripts, pin, unpin
-
Constructor Details
-
HtmlUnitWebDriver
public HtmlUnitWebDriver()
-
-
Method Details
-
modifyWebClient
protected com.gargoylesoftware.htmlunit.WebClient modifyWebClient(com.gargoylesoftware.htmlunit.WebClient client) - Overrides:
modifyWebClientin classorg.openqa.selenium.htmlunit.HtmlUnitDriver
-
getDriverForPage
-
getHTMLContent
-
cleanUpDriver
public static void cleanUpDriver(org.openqa.selenium.WebDriver driver) -
getHtmlPage
Function for obtaining the HTML BODY using the selected selenium webdriver There are a number of configuration properties withinnutch-site.xmlwhich determine whether to take screenshots of the rendered pages and persist them as timestamped .png's into HDFS.- Parameters:
url- the URL to fetch and renderconf- theConfiguration- Returns:
- the rendered inner HTML page
-