Package | Description |
---|---|
com.gargoylesoftware.htmlunit |
Framework classes (contains the WebClient class which is the main entry point).
|
com.gargoylesoftware.htmlunit.html |
Classes specific to HTML pages, particularly the HtmlPage which represents
an HTML document and provides access to its content.
|
com.gargoylesoftware.htmlunit.javascript |
Classes in this package are specific to the JavaScript engine - users of HtmlUnit shouldn't
need anything in this package.
|
com.gargoylesoftware.htmlunit.javascript.background |
Classes relating to background JavaScript execution, which is usually triggered via
setTimeout() or setInterval().
|
com.gargoylesoftware.htmlunit.javascript.host.html |
Implementations of the HTML JavaScript host objects - users of HtmlUnit shouldn't
need anything in this package.
|
Modifier and Type | Method and Description |
---|---|
protected HtmlPage |
DefaultPageCreator.createHtmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an HtmlPage for this WebResponse.
|
HtmlPage |
ScriptException.getPage()
Gets the HTML page in which the script error occurred.
Caution: this page may be only partially parsed if the exception occurred in a script executed at parsing time. |
Modifier and Type | Method and Description |
---|---|
static void |
WebAssert.assertAllAccessKeyAttributesUnique(HtmlPage page)
Many HTML components can have an accesskey attribute which defines a hot key for
keyboard navigation.
|
static void |
WebAssert.assertAllIdAttributesUnique(HtmlPage page)
Verifies that all element IDs in the specified page are unique.
|
static void |
WebAssert.assertAllTabIndexAttributesSet(HtmlPage page)
Many HTML elements are "tabbable" and can have a tabindex attribute
that determines the order in which the components are navigated when
pressing the tab key.
|
static void |
WebAssert.assertElementNotPresent(HtmlPage page,
String id)
Verifies that the specified page does not contain an element with the specified ID.
|
static void |
WebAssert.assertElementNotPresentByXPath(HtmlPage page,
String xpath)
Verifies that the specified page does not contain an element matching the specified XPath
expression.
|
static void |
WebAssert.assertElementPresent(HtmlPage page,
String id)
Verifies that the specified page contains an element with the specified ID.
|
static void |
WebAssert.assertElementPresentByXPath(HtmlPage page,
String xpath)
Verifies that the specified page contains an element matching the specified XPath expression.
|
static void |
WebAssert.assertFormNotPresent(HtmlPage page,
String name)
Verifies that the specified page does not contain a form with the specified name.
|
static void |
WebAssert.assertFormPresent(HtmlPage page,
String name)
Verifies that the specified page contains a form with the specified name.
|
static void |
WebAssert.assertInputContainsValue(HtmlPage page,
String name,
String value)
Verifies that the input element with the specified name on the specified page contains the
specified value.
|
static void |
WebAssert.assertInputDoesNotContainValue(HtmlPage page,
String name,
String value)
Verifies that the input element with the specified name on the specified page does not
contain the specified value.
|
static void |
WebAssert.assertInputNotPresent(HtmlPage page,
String name)
Verifies that the specified page does not contain an input element with the specified name.
|
static void |
WebAssert.assertInputPresent(HtmlPage page,
String name)
Verifies that the specified page contains an input element with the specified name.
|
static void |
WebAssert.assertLinkNotPresent(HtmlPage page,
String id)
Verifies that the specified page does not contain a link with the specified ID.
|
static void |
WebAssert.assertLinkNotPresentWithText(HtmlPage page,
String text)
Verifies that the specified page does not contain a link with the specified text.
|
static void |
WebAssert.assertLinkPresent(HtmlPage page,
String id)
Verifies that the specified page contains a link with the specified ID.
|
static void |
WebAssert.assertLinkPresentWithText(HtmlPage page,
String text)
Verifies that the specified page contains a link with the specified text.
|
static void |
WebAssert.assertTextNotPresent(HtmlPage page,
String text)
Verifies that the specified page does not contain the specified text.
|
static void |
WebAssert.assertTextNotPresentInElement(HtmlPage page,
String text,
String id)
Verifies that the element on the specified page which matches the specified ID does not
contain the specified text.
|
static void |
WebAssert.assertTextPresent(HtmlPage page,
String text)
Verifies that the specified page contains the specified text.
|
static void |
WebAssert.assertTextPresentInElement(HtmlPage page,
String text,
String id)
Verifies that the element on the specified page which matches the specified ID contains the
specified text.
|
static void |
WebAssert.assertTitleContains(HtmlPage page,
String titlePortion)
Verifies that the specified page's title contains the specified substring.
|
static void |
WebAssert.assertTitleEquals(HtmlPage page,
String title)
Verifies that the specified page's title equals the specified expected title.
|
static void |
WebAssert.assertTitleMatches(HtmlPage page,
String regex)
Verifies that the specified page's title matches the specified regular expression.
|
String |
ScriptPreProcessor.preProcess(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int lineNumber,
HtmlElement htmlElement)
Pre process the specified source code in the context of the given page.
|
boolean |
AjaxController.processSynchron(HtmlPage page,
WebRequest request,
boolean async)
Gets notified of an AJAX call to determine how it should be processed.
|
boolean |
NicelyResynchronizingAjaxController.processSynchron(HtmlPage page,
WebRequest settings,
boolean async)
Resynchronizes calls performed from the thread where this instance has been created.
|
Constructor and Description |
---|
ScriptException(HtmlPage page,
Throwable throwable)
Creates an instance.
|
ScriptException(HtmlPage page,
Throwable throwable,
String scriptSourceCode)
Creates an instance.
|
Modifier and Type | Class and Description |
---|---|
class |
XHtmlPage
A representation of an XHTML page returned from a server.
|
Modifier and Type | Method and Description |
---|---|
protected HtmlPage |
HtmlPage.clone()
Creates a clone of this instance, and clears cached state
to be not shared with the original.
|
HtmlPage |
HtmlPage.cloneNode(boolean deep)
Override cloneNode to add cloned elements to the clone, not to the original.
|
HtmlPage |
FrameWindow.getEnclosingPage()
Returns the HTML page in which the <frame> or <iframe> tag is contained
for this frame window.
|
HtmlPage |
HtmlPage.getPage()
Returns the page that contains this node.
|
static HtmlPage |
HTMLParser.parseHtml(WebResponse webResponse,
WebWindow webWindow)
Parses the HTML content from the specified WebResponse into an object tree representation.
|
Modifier and Type | Method and Description |
---|---|
Object |
JavaScriptEngine.callFunction(HtmlPage htmlPage,
net.sourceforge.htmlunit.corejs.javascript.Function javaScriptFunction,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObject,
Object[] args,
DomNode htmlElement)
Calls a JavaScript function and return the result.
|
Object |
JavaScriptEngine.callFunction(HtmlPage htmlPage,
net.sourceforge.htmlunit.corejs.javascript.Function function,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObject,
Object[] args)
Calls the given function taking care of synchronization issues.
|
net.sourceforge.htmlunit.corejs.javascript.Script |
JavaScriptEngine.compile(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int startLine)
Compiles the specified JavaScript code in the context of a given HTML page.
|
Object |
JavaScriptEngine.execute(HtmlPage htmlPage,
net.sourceforge.htmlunit.corejs.javascript.Script script)
Executes the specified JavaScript code in the context of a given HTML page.
|
Object |
JavaScriptEngine.execute(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int startLine)
Executes the specified JavaScript code in the context of a given HTML page.
|
void |
JavaScriptErrorListener.loadScriptError(HtmlPage htmlPage,
URL scriptUrl,
Exception exception)
Informs about an exception during load of an javascript file refereed from a page.
|
void |
JavaScriptErrorListener.malformedScriptURL(HtmlPage htmlPage,
String url,
MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.
|
String |
IEWeirdSyntaxScriptPreProcessor.preProcess(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int lineNumber,
HtmlElement htmlElement)
Pre process the specified source code in the context of the given page.
|
protected String |
HtmlUnitContextFactory.preProcess(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int lineNumber,
HtmlElement htmlElement)
Pre process the specified source code in the context of the given page using the processor specified
in the webclient.
|
String |
IEConditionalCompilationScriptPreProcessor.preProcess(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int lineNumber,
HtmlElement htmlElement)
Pre process the specified source code in the context of the given page.
|
void |
JavaScriptErrorListener.scriptException(HtmlPage htmlPage,
ScriptException scriptException)
Informs about a javascript exceptions.
|
void |
JavaScriptErrorListener.timeoutError(HtmlPage htmlPage,
long allowedTime,
long executionTime)
Informs about a javascript timeout error.
|
Modifier and Type | Method and Description |
---|---|
protected void |
JavaScriptFunctionJob.runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.
|
protected void |
JavaScriptStringJob.runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.
|
protected abstract void |
JavaScriptExecutionJob.runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.
|
Modifier and Type | Method and Description |
---|---|
HtmlPage |
HTMLDocument.getHtmlPage()
Returns the HTML page that this document is modeling.
|
HtmlPage |
HTMLDocument.getHtmlPageOrNull()
Returns the HTML page that this document is modeling, or null if the page is empty.
|
Copyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.