public abstract class InteractivePage extends SgmlPage
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>
AS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
InteractivePage(WebResponse webResponse,
WebWindow webWindow)
Creates an instance of
InteractiveSgmlPage . |
Modifier and Type | Method and Description |
---|---|
protected InteractivePage |
clone()
Creates a clone of this instance.
|
InteractivePage |
cloneNode(boolean deep)
Override cloneNode to add cloned elements to the clone, not to the original.
|
ScriptResult |
executeJavaScriptFunctionIfPossible(net.sourceforge.htmlunit.corejs.javascript.Function function,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObject,
Object[] args,
DomNode htmlElementScope)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Execute a Function in the given context. |
DomElement |
getFocusedElement()
Returns the element with the focus or null if no element has the focus.
|
List<org.w3c.dom.ranges.Range> |
getSelectionRanges()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
void |
setElementWithFocus(DomElement elementWithFocus)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
boolean |
setFocusedElement(DomElement newElement)
Moves the focus to the specified element.
|
boolean |
setFocusedElement(DomElement newElement,
boolean windowActivated)
Moves the focus to the specified element.
|
void |
setSelectionRange(org.w3c.dom.ranges.Range selectionRange)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
asXml, cleanUp, createAttribute, createCDATASection, createComment, createDocumentFragment, createDomDocumentFragment, createElement, createElementNS, createTextNode, getCanonicalXPath, getDoctype, getDocumentElement, getElementsByTagName, getEnclosingWindow, getNodeName, getNodeType, getPage, getPageEncoding, getUrl, getWebClient, getWebResponse, hasCaseSensitiveTagNames, initialize, isHtmlPage, normalizeDocument, setDocumentType, setEnclosingWindow
addCharacterDataChangeListener, addDomChangeListener, appendChild, asText, checkChildHierarchy, compareDocumentPosition, detach, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getAttributes, getBaseURI, getByXPath, getByXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadyState, getScriptableObject, getScriptObject, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, hasAttributes, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isBlock, isDefaultNamespace, isDirectlyAttachedToPage, isDisplayed, isEqualNode, isSameNode, isSupported, isTrimmedText, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, printXml, processImportNode, querySelector, querySelectorAll, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setNextSibling, setNodeValue, setParentNode, setPrefix, setPreviousSibling, setReadyState, setScriptableObject, setTextContent, setUserData
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adoptNode, createAttributeNS, createEntityReference, createProcessingInstruction, getDocumentURI, getDomConfig, getElementById, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public InteractivePage(WebResponse webResponse, WebWindow webWindow)
InteractiveSgmlPage
.webResponse
- the web response that was used to create this pagewebWindow
- the window that this page is being loaded intopublic boolean setFocusedElement(DomElement newElement)
newElement
- the element that will receive the focus, use null
to remove focus from any elementgetFocusedElement()
public boolean setFocusedElement(DomElement newElement, boolean windowActivated)
newElement
- the element that will receive the focus, use null
to remove focus from any elementwindowActivated
- - whether the enclosing window got focus resulting in specified element getting focusgetFocusedElement()
public DomElement getFocusedElement()
setFocusedElement(DomElement)
public void setElementWithFocus(DomElement elementWithFocus)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Sets the element with focus.elementWithFocus
- the element with focuspublic List<org.w3c.dom.ranges.Range> getSelectionRanges()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the page's current selection ranges. Note that some browsers, like IE, only allow a single selection at a time.
public void setSelectionRange(org.w3c.dom.ranges.Range selectionRange)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Makes the specified selection range the *only* selection range on this page.
selectionRange
- the selection rangepublic InteractivePage cloneNode(boolean deep)
public ScriptResult executeJavaScriptFunctionIfPossible(net.sourceforge.htmlunit.corejs.javascript.Function function, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObject, Object[] args, DomNode htmlElementScope)
function
- the JavaScript Function to callthisObject
- the "this" object to be used during invocationargs
- the arguments to pass into the callhtmlElementScope
- the HTML element for which this script is being executed
This element will be the context during the JavaScript execution. If null,
the context will default to the page.protected InteractivePage clone()
Copyright © 2002–2017 Gargoyle Software Inc.. All rights reserved.