Uses of Class
org.htmlunit.html.HtmlPage
-
Packages that use HtmlPage Package Description org.htmlunit Framework classes (contains theWebClient
class which is the main entry point).org.htmlunit.html Classes specific to HTML pages, particularly theHtmlPage
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.background Classes relating to background JavaScript execution, which is usually triggered viasetTimeout()
orsetInterval()
.org.htmlunit.javascript.host Implementations of the various JavaScript host objects - 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.org.htmlunit.javascript.preprocessor Some special ScriptPreProcessor's to make this working with common js libs. -
-
Uses of HtmlPage in org.htmlunit
Fields in org.htmlunit declared as HtmlPage Modifier and Type Field Description private HtmlPage
ScriptException. page_
Methods in org.htmlunit that return HtmlPage Modifier and Type Method 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.HtmlPage
WebClient. loadHtmlCodeIntoCurrentWindow(java.lang.String htmlCode)
Parses the given XHtml code string and loads the resulting XHtmlPage into the current window.Methods in org.htmlunit with parameters of type HtmlPage Modifier and Type Method Description static void
WebAssert. assertAllAccessKeyAttributesUnique(HtmlPage page)
Many HTML components can have anaccesskey
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 atabindex
attribute that determines the order in which the components are navigated when pressing the tab key.static void
WebAssert. assertElementNotPresent(HtmlPage page, java.lang.String id)
Verifies that the specified page does not contain an element with the specified ID.static void
WebAssert. assertElementNotPresentByXPath(HtmlPage page, java.lang.String xpath)
Verifies that the specified page does not contain an element matching the specified XPath expression.static void
WebAssert. assertElementPresent(HtmlPage page, java.lang.String id)
Verifies that the specified page contains an element with the specified ID.static void
WebAssert. assertElementPresentByXPath(HtmlPage page, java.lang.String xpath)
Verifies that the specified page contains an element matching the specified XPath expression.static void
WebAssert. assertFormNotPresent(HtmlPage page, java.lang.String name)
Verifies that the specified page does not contain a form with the specified name.static void
WebAssert. assertFormPresent(HtmlPage page, java.lang.String name)
Verifies that the specified page contains a form with the specified name.static void
WebAssert. assertInputContainsValue(HtmlPage page, java.lang.String name, java.lang.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, java.lang.String name, java.lang.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, java.lang.String name)
Verifies that the specified page does not contain an input element with the specified name.static void
WebAssert. assertInputPresent(HtmlPage page, java.lang.String name)
Verifies that the specified page contains an input element with the specified name.static void
WebAssert. assertLinkNotPresent(HtmlPage page, java.lang.String id)
Verifies that the specified page does not contain a link with the specified ID.static void
WebAssert. assertLinkNotPresentWithText(HtmlPage page, java.lang.String text)
Verifies that the specified page does not contain a link with the specified text.static void
WebAssert. assertLinkPresent(HtmlPage page, java.lang.String id)
Verifies that the specified page contains a link with the specified ID.static void
WebAssert. assertLinkPresentWithText(HtmlPage page, java.lang.String text)
Verifies that the specified page contains a link with the specified text.static void
WebAssert. assertTextNotPresent(HtmlPage page, java.lang.String text)
Verifies that the specified page does not contain the specified text.static void
WebAssert. assertTextNotPresentInElement(HtmlPage page, java.lang.String text, java.lang.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, java.lang.String text)
Verifies that the specified page contains the specified text.static void
WebAssert. assertTextPresentInElement(HtmlPage page, java.lang.String text, java.lang.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, java.lang.String titlePortion)
Verifies that the specified page's title contains the specified substring.static void
WebAssert. assertTitleEquals(HtmlPage page, java.lang.String title)
Verifies that the specified page's title equals the specified expected title.static void
WebAssert. assertTitleMatches(HtmlPage page, java.lang.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().java.lang.String
ScriptPreProcessor. preProcess(HtmlPage htmlPage, java.lang.String sourceCode, java.lang.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.Constructors in org.htmlunit with parameters of type HtmlPage Constructor Description ScriptException(HtmlPage page, java.lang.Throwable throwable)
Creates an instance.ScriptException(HtmlPage page, java.lang.Throwable throwable, java.lang.String scriptSourceCode)
Creates an instance. -
Uses of HtmlPage in org.htmlunit.html
Subclasses of HtmlPage in org.htmlunit.html Modifier and Type Class Description class
XHtmlPage
A representation of an XHTML page returned from a server.Methods in org.htmlunit.html that return HtmlPage Modifier and Type Method 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.Methods in org.htmlunit.html with parameters of type HtmlPage Modifier and Type Method Description private void
HtmlElement. fireAttributeChangeImpl(HtmlAttributeChangeEvent event, HtmlPage htmlPage, boolean mappedElement, java.lang.String oldAttributeValue)
HtmlElement
ElementFromPointHandler. getElementFromPoint(HtmlPage htmlPage, int x, int y)
Returns the element for the specified x coordinate and the specified y coordinate.static java.net.URL
HtmlAnchor. getTargetUrl(java.lang.String href, HtmlPage page)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.private boolean
HtmlPage. isOnbeforeunloadAccepted(HtmlPage page, Event event)
private void
HtmlRadioButtonInput. setCheckedForPage(HtmlPage htmlPage)
Select the specified radio button in the page (outside any <form>). -
Uses of HtmlPage in org.htmlunit.html.parser
Methods in org.htmlunit.html.parser with parameters of type HtmlPage Modifier and Type Method Description void
HTMLParser. parse(WebResponse webResponse, HtmlPage page, boolean xhtml, boolean createdByJavascript)
Parses the WebResponse into an object tree representation. -
Uses of HtmlPage in org.htmlunit.html.parser.neko
Fields in org.htmlunit.html.parser.neko declared as HtmlPage Modifier and Type Field Description private HtmlPage
HtmlUnitNekoDOMBuilder. page_
Methods in org.htmlunit.html.parser.neko with parameters of type HtmlPage Modifier and Type Method Description void
HtmlUnitNekoHtmlParser. parse(WebResponse webResponse, HtmlPage page, boolean xhtml, boolean createdByJavascript)
Parses the WebResponse into an object tree representation. -
Uses of HtmlPage in org.htmlunit.javascript
Fields in org.htmlunit.javascript declared as HtmlPage Modifier and Type Field Description private HtmlPage
JavaScriptEngine.HtmlUnitContextAction. page_
Methods in org.htmlunit.javascript with parameters of type HtmlPage Modifier and Type Method Description java.lang.Object
JavaScriptEngine. callFunction(HtmlPage page, org.htmlunit.corejs.javascript.Function javaScriptFunction, org.htmlunit.corejs.javascript.Scriptable thisObject, java.lang.Object[] args, DomNode node)
Calls a JavaScript function and return the result.java.lang.Object
JavaScriptEngine. callFunction(HtmlPage page, org.htmlunit.corejs.javascript.Function function, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObject, java.lang.Object[] args)
Calls the given function taking care of synchronization issues.<T> T
HtmlUnitContextFactory. callSecured(org.htmlunit.corejs.javascript.ContextAction<T> action, HtmlPage page)
Same asContextFactory
ContextFactory.call(ContextAction)
but with handling of some exceptions.<T> T
JavaScriptEngine. callSecured(org.htmlunit.corejs.javascript.ContextAction<T> action, HtmlPage page)
Forwards this to theHtmlUnitContextFactory
but with checking shutdown handling.SCRIPT
AbstractJavaScriptEngine. compile(HtmlPage page, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Deprecated.as of version 3.12.0; useAbstractJavaScriptEngine.compile(HtmlPage, Scriptable, String, String, int)
insteadSCRIPT
AbstractJavaScriptEngine. compile(HtmlPage owningPage, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Compiles the specified JavaScript code in the context of a given scope.org.htmlunit.corejs.javascript.Script
JavaScriptEngine. compile(HtmlPage owningPage, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Deprecated.org.htmlunit.corejs.javascript.Script
JavaScriptEngine. compile(HtmlPage owningPage, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Compiles the specified JavaScript code in the context of a given scope.java.lang.Object
AbstractJavaScriptEngine. execute(HtmlPage page, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Deprecated.as of version 3.12.0; useAbstractJavaScriptEngine.execute(HtmlPage, Scriptable, String, String, int)
insteadjava.lang.Object
AbstractJavaScriptEngine. execute(HtmlPage page, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Executes the specified JavaScript code in the context of a given page.java.lang.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.java.lang.Object
AbstractJavaScriptEngine. execute(HtmlPage page, SCRIPT script)
Deprecated.as of version 3.12.0; useAbstractJavaScriptEngine.execute(HtmlPage, Scriptable, Object)
insteadjava.lang.Object
JavaScriptEngine. execute(HtmlPage page, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Deprecated.java.lang.Object
JavaScriptEngine. execute(HtmlPage page, org.htmlunit.corejs.javascript.Script script)
Deprecated.java.lang.Object
JavaScriptEngine. execute(HtmlPage page, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String sourceCode, java.lang.String sourceName, int startLine)
Executes the specified JavaScript code in the context of a given page.java.lang.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.private static org.htmlunit.corejs.javascript.Scriptable
JavaScriptEngine. getScope(HtmlPage page, DomNode node)
protected void
JavaScriptEngine. handleJavaScriptTimeoutError(HtmlPage page, TimeoutError e)
Handles an exception that occurred during execution of JavaScript code.void
DefaultJavaScriptErrorListener. loadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)
Informs about an exception during load of a javascript file refereed from a page.void
JavaScriptErrorListener. loadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)
Informs about an exception during load of a javascript file refereed from a page.void
SilentJavaScriptErrorListener. loadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)
void
DefaultJavaScriptErrorListener. malformedScriptURL(HtmlPage page, java.lang.String url, java.net.MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.void
JavaScriptErrorListener. malformedScriptURL(HtmlPage page, java.lang.String url, java.net.MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.void
SilentJavaScriptErrorListener. malformedScriptURL(HtmlPage page, java.lang.String url, java.net.MalformedURLException malformedURLException)
protected java.lang.String
HtmlUnitContextFactory. preProcess(HtmlPage htmlPage, java.lang.String sourceCode, java.lang.String sourceName, int lineNumber, HtmlElement htmlElement)
Pre process the specified source code in the context of the given page using the processor specified in theWebClient
.void
DefaultJavaScriptErrorListener. scriptException(HtmlPage page, ScriptException scriptException)
Informs about a javascript exceptions.void
JavaScriptErrorListener. scriptException(HtmlPage page, ScriptException scriptException)
Informs about a javascript exceptions.void
SilentJavaScriptErrorListener. scriptException(HtmlPage page, ScriptException scriptException)
void
DefaultJavaScriptErrorListener. timeoutError(HtmlPage page, long allowedTime, long executionTime)
Informs about a javascript timeout error.void
JavaScriptErrorListener. timeoutError(HtmlPage page, long allowedTime, long executionTime)
Informs about a javascript timeout error.void
SilentJavaScriptErrorListener. timeoutError(HtmlPage page, long allowedTime, long executionTime)
Constructors in org.htmlunit.javascript with parameters of type HtmlPage Constructor Description HtmlUnitContextAction(org.htmlunit.corejs.javascript.Scriptable scope, HtmlPage page)
-
Uses of HtmlPage in org.htmlunit.javascript.background
Methods in org.htmlunit.javascript.background with parameters of type HtmlPage Modifier and Type Method Description protected abstract void
JavaScriptExecutionJob. runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.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. -
Uses of HtmlPage in org.htmlunit.javascript.host
Fields in org.htmlunit.javascript.host declared as HtmlPage Modifier and Type Field Description private HtmlPage
WebSocket. containingPage_
Methods in org.htmlunit.javascript.host with parameters of type HtmlPage Modifier and Type Method Description private java.lang.Object
Window. getElementsByName(HtmlPage page, java.lang.String name)
private static java.lang.Object
Window. getFrameWindowByName(HtmlPage page, java.lang.String name)
Constructors in org.htmlunit.javascript.host with parameters of type HtmlPage Constructor Description HTMLCollectionFrames(HtmlPage page)
-
Uses of HtmlPage in org.htmlunit.javascript.host.html
Methods in org.htmlunit.javascript.host.html that return HtmlPage Modifier and Type Method Description HtmlPage
HTMLDocument. getPage()
Returns the HTML page that this document is modeling.Methods in org.htmlunit.javascript.host.html with parameters of type HtmlPage Modifier and Type Method Description (package private) static java.util.List<DomNode>
HTMLDocument. getItComputeElements(HtmlPage page, java.lang.String name, boolean alsoFrames)
-
Uses of HtmlPage in org.htmlunit.javascript.preprocessor
Methods in org.htmlunit.javascript.preprocessor with parameters of type HtmlPage Modifier and Type Method Description java.lang.String
HtmxOneNineTenScriptPreProcessor. preProcess(HtmlPage htmlPage, java.lang.String sourceCode, java.lang.String sourceName, int lineNumber, HtmlElement htmlElement)
-