Package | Description |
---|---|
org.htmlunit |
Framework classes (contains the
WebClient
class which is the main entry point). |
org.htmlunit.html |
Classes specific to HTML pages, particularly the
HtmlPage which represents
an HTML document and provides access to its content. |
org.htmlunit.html.parser |
Contains the html parser interface.
|
org.htmlunit.html.parser.neko |
Contains the neko html parser.
|
org.htmlunit.javascript |
Classes in this package are specific to the JavaScript engine - users of HtmlUnit shouldn't
need anything in this package.
|
org.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.
|
HtmlPage |
WebClient.loadHtmlCodeIntoCurrentWindow(String htmlCode)
Parses the given XHtml code string and loads the resulting XHtmlPage into
the current window.
|
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.
|
void |
PrintHandler.handlePrint(HtmlPage page)
Handle a call to Window.print().
|
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 |
NicelyResynchronizingAjaxController.processSynchron(HtmlPage page,
WebRequest settings,
boolean async)
Resynchronizes calls performed from the thread where this instance has been created.
|
boolean |
AjaxController.processSynchron(HtmlPage page,
WebRequest request,
boolean async)
Gets notified of an AJAX call to determine how it should be processed.
|
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) |
HtmlPage |
FrameWindow.getEnclosingPage()
Returns the HTML page in which the <frame> or <iframe> tag is contained
for this frame window.
|
HtmlPage |
DomNode.getHtmlPageOrNull()
Returns the page that contains this node.
|
HtmlPage |
HtmlPage.getPage()
Returns the page that contains this node.
|
Modifier and Type | Method and Description |
---|---|
HtmlElement |
ElementFromPointHandler.getElementFromPoint(HtmlPage htmlPage,
int x,
int y)
Returns the element for the specified x coordinate and the specified y coordinate.
|
static URL |
HtmlAnchor.getTargetUrl(String href,
HtmlPage page)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
Modifier and Type | Method and Description |
---|---|
void |
HTMLParser.parse(WebResponse webResponse,
HtmlPage page,
boolean xhtml,
boolean createdByJavascript)
Parses the WebResponse into an object tree representation.
|
Modifier and Type | Method and Description |
---|---|
void |
HtmlUnitNekoHtmlParser.parse(WebResponse webResponse,
HtmlPage page,
boolean xhtml,
boolean createdByJavascript)
Parses the WebResponse into an object tree representation.
|
Modifier and Type | Method and Description |
---|---|
Object |
JavaScriptEngine.callFunction(HtmlPage page,
org.htmlunit.corejs.javascript.Function javaScriptFunction,
org.htmlunit.corejs.javascript.Scriptable thisObject,
Object[] args,
DomNode node)
Calls a JavaScript function and return the result.
|
Object |
JavaScriptEngine.callFunction(HtmlPage page,
org.htmlunit.corejs.javascript.Function function,
org.htmlunit.corejs.javascript.Scriptable scope,
org.htmlunit.corejs.javascript.Scriptable thisObject,
Object[] args)
Calls the given function taking care of synchronization issues.
|
<T> T |
JavaScriptEngine.callSecured(org.htmlunit.corejs.javascript.ContextAction<T> action,
HtmlPage page)
Forwards this to the
HtmlUnitContextFactory but with checking shutdown handling. |
<T> T |
HtmlUnitContextFactory.callSecured(org.htmlunit.corejs.javascript.ContextAction<T> action,
HtmlPage page)
Same as
ContextFactory ContextFactory.call(ContextAction) but with handling
of some exceptions. |
org.htmlunit.corejs.javascript.Script |
JavaScriptEngine.compile(HtmlPage owningPage,
org.htmlunit.corejs.javascript.Scriptable scope,
String sourceCode,
String sourceName,
int startLine)
Compiles the specified JavaScript code in the context of a given scope.
|
SCRIPT |
AbstractJavaScriptEngine.compile(HtmlPage owningPage,
org.htmlunit.corejs.javascript.Scriptable scope,
String sourceCode,
String sourceName,
int startLine)
Compiles the specified JavaScript code in the context of a given scope.
|
Object |
JavaScriptEngine.execute(HtmlPage page,
org.htmlunit.corejs.javascript.Scriptable scope,
org.htmlunit.corejs.javascript.Script script)
Executes the specified JavaScript code in the context of a given page.
|
Object |
AbstractJavaScriptEngine.execute(HtmlPage page,
org.htmlunit.corejs.javascript.Scriptable scope,
SCRIPT script)
Executes the specified JavaScript code in the context of a given page.
|
Object |
JavaScriptEngine.execute(HtmlPage page,
org.htmlunit.corejs.javascript.Scriptable scope,
String sourceCode,
String sourceName,
int startLine)
Executes the specified JavaScript code in the context of a given page.
|
Object |
AbstractJavaScriptEngine.execute(HtmlPage page,
org.htmlunit.corejs.javascript.Scriptable scope,
String sourceCode,
String sourceName,
int startLine)
Executes the specified JavaScript code in the context of a given page.
|
protected void |
JavaScriptEngine.handleJavaScriptTimeoutError(HtmlPage page,
TimeoutError e)
Handles an exception that occurred during execution of JavaScript code.
|
void |
SilentJavaScriptErrorListener.loadScriptError(HtmlPage page,
URL scriptUrl,
Exception exception) |
void |
JavaScriptErrorListener.loadScriptError(HtmlPage page,
URL scriptUrl,
Exception exception)
Informs about an exception during load of a javascript file refereed from a page.
|
void |
DefaultJavaScriptErrorListener.loadScriptError(HtmlPage page,
URL scriptUrl,
Exception exception)
Informs about an exception during load of a javascript file refereed from a page.
|
void |
SilentJavaScriptErrorListener.malformedScriptURL(HtmlPage page,
String url,
MalformedURLException malformedURLException) |
void |
JavaScriptErrorListener.malformedScriptURL(HtmlPage page,
String url,
MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.
|
void |
DefaultJavaScriptErrorListener.malformedScriptURL(HtmlPage page,
String url,
MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.
|
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 . |
void |
SilentJavaScriptErrorListener.scriptException(HtmlPage page,
ScriptException scriptException) |
void |
JavaScriptErrorListener.scriptException(HtmlPage page,
ScriptException scriptException)
Informs about a javascript exceptions.
|
void |
DefaultJavaScriptErrorListener.scriptException(HtmlPage page,
ScriptException scriptException)
Informs about a javascript exceptions.
|
void |
SilentJavaScriptErrorListener.timeoutError(HtmlPage page,
long allowedTime,
long executionTime) |
void |
JavaScriptErrorListener.timeoutError(HtmlPage page,
long allowedTime,
long executionTime)
Informs about a javascript timeout error.
|
void |
DefaultJavaScriptErrorListener.timeoutError(HtmlPage page,
long allowedTime,
long executionTime)
Informs about a javascript timeout error.
|
Modifier and Type | Method and Description |
---|---|
HtmlPage |
HTMLDocument.getPage()
Returns the HTML page that this document is modeling.
|
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.