Class DOMNode
- java.lang.Object
-
- org.openqa.selenium.devtools.domsnapshot.model.DOMNode
-
public class DOMNode extends java.lang.Object
A Node in the DOM tree.
-
-
Constructor Summary
Constructors Constructor Description DOMNode(java.lang.Integer nodeType, java.lang.String nodeName, java.lang.String nodeValue, java.lang.String textValue, java.lang.String inputValue, java.lang.Boolean inputChecked, java.lang.Boolean optionSelected, BackendNodeId backendNodeId, java.util.List<java.lang.Integer> childNodeIndexes, java.util.List<NameValue> attributes, java.util.List<java.lang.Integer> pseudoElementIndexes, java.lang.Integer layoutNodeIndex, java.lang.String documentURL, java.lang.String baseURL, java.lang.String contentLanguage, java.lang.String documentEncoding, java.lang.String publicId, java.lang.String systemId, FrameId frameId, java.lang.Integer contentDocumentIndex, PseudoType pseudoType, ShadowRootType shadowRootType, java.lang.Boolean isClickable, java.util.List<EventListener> eventListeners, java.lang.String currentSourceURL, java.lang.String originURL, java.lang.Number scrollOffsetX, java.lang.Number scrollOffsetY)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<NameValue>
getAttributes()
Attributes of an `Element` node.BackendNodeId
getBackendNodeId()
`Node`'s id, corresponds to DOM.Node.backendNodeId.java.lang.String
getBaseURL()
Base URL that `Document` or `FrameOwner` node uses for URL completion.java.util.List<java.lang.Integer>
getChildNodeIndexes()
The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.java.lang.Integer
getContentDocumentIndex()
The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.java.lang.String
getContentLanguage()
Only set for documents, contains the document's content language.java.lang.String
getCurrentSourceURL()
The selected url for nodes with a srcset attribute.java.lang.String
getDocumentEncoding()
Only set for documents, contains the document's character set encoding.java.lang.String
getDocumentURL()
Document URL that `Document` or `FrameOwner` node points to.java.util.List<EventListener>
getEventListeners()
Details of the node's event listeners, if any.FrameId
getFrameId()
Frame ID for frame owner elements and also for the document node.java.lang.Boolean
getInputChecked()
Only set for radio and checkbox input elements, indicates if the element has been checkedjava.lang.String
getInputValue()
Only set for input elements, contains the input's associated text value.java.lang.Boolean
getIsClickable()
Whether this DOM node responds to mouse clicks.java.lang.Integer
getLayoutNodeIndex()
The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.java.lang.String
getNodeName()
`Node`'s nodeName.java.lang.Integer
getNodeType()
`Node`'s nodeType.java.lang.String
getNodeValue()
`Node`'s nodeValue.java.lang.Boolean
getOptionSelected()
Only set for option elements, indicates if the element has been selectedjava.lang.String
getOriginURL()
The url of the script (if any) that generates this node.java.util.List<java.lang.Integer>
getPseudoElementIndexes()
Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.PseudoType
getPseudoType()
Type of a pseudo element node.java.lang.String
getPublicId()
`DocumentType` node's publicId.java.lang.Number
getScrollOffsetX()
Scroll offsets, set when this node is a Document.java.lang.Number
getScrollOffsetY()
ShadowRootType
getShadowRootType()
Shadow root type.java.lang.String
getSystemId()
`DocumentType` node's systemId.java.lang.String
getTextValue()
Only set for textarea elements, contains the text value.
-
-
-
Constructor Detail
-
DOMNode
public DOMNode(java.lang.Integer nodeType, java.lang.String nodeName, java.lang.String nodeValue, java.lang.String textValue, java.lang.String inputValue, java.lang.Boolean inputChecked, java.lang.Boolean optionSelected, BackendNodeId backendNodeId, java.util.List<java.lang.Integer> childNodeIndexes, java.util.List<NameValue> attributes, java.util.List<java.lang.Integer> pseudoElementIndexes, java.lang.Integer layoutNodeIndex, java.lang.String documentURL, java.lang.String baseURL, java.lang.String contentLanguage, java.lang.String documentEncoding, java.lang.String publicId, java.lang.String systemId, FrameId frameId, java.lang.Integer contentDocumentIndex, PseudoType pseudoType, ShadowRootType shadowRootType, java.lang.Boolean isClickable, java.util.List<EventListener> eventListeners, java.lang.String currentSourceURL, java.lang.String originURL, java.lang.Number scrollOffsetX, java.lang.Number scrollOffsetY)
-
-
Method Detail
-
getNodeType
public java.lang.Integer getNodeType()
`Node`'s nodeType.
-
getNodeName
public java.lang.String getNodeName()
`Node`'s nodeName.
-
getNodeValue
public java.lang.String getNodeValue()
`Node`'s nodeValue.
-
getTextValue
public java.lang.String getTextValue()
Only set for textarea elements, contains the text value.
-
getInputValue
public java.lang.String getInputValue()
Only set for input elements, contains the input's associated text value.
-
getInputChecked
public java.lang.Boolean getInputChecked()
Only set for radio and checkbox input elements, indicates if the element has been checked
-
getOptionSelected
public java.lang.Boolean getOptionSelected()
Only set for option elements, indicates if the element has been selected
-
getBackendNodeId
public BackendNodeId getBackendNodeId()
`Node`'s id, corresponds to DOM.Node.backendNodeId.
-
getChildNodeIndexes
public java.util.List<java.lang.Integer> getChildNodeIndexes()
The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.
-
getAttributes
public java.util.List<NameValue> getAttributes()
Attributes of an `Element` node.
-
getPseudoElementIndexes
public java.util.List<java.lang.Integer> getPseudoElementIndexes()
Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.
-
getLayoutNodeIndex
public java.lang.Integer getLayoutNodeIndex()
The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.
-
getDocumentURL
public java.lang.String getDocumentURL()
Document URL that `Document` or `FrameOwner` node points to.
-
getBaseURL
public java.lang.String getBaseURL()
Base URL that `Document` or `FrameOwner` node uses for URL completion.
-
getContentLanguage
public java.lang.String getContentLanguage()
Only set for documents, contains the document's content language.
-
getDocumentEncoding
public java.lang.String getDocumentEncoding()
Only set for documents, contains the document's character set encoding.
-
getPublicId
public java.lang.String getPublicId()
`DocumentType` node's publicId.
-
getSystemId
public java.lang.String getSystemId()
`DocumentType` node's systemId.
-
getFrameId
public FrameId getFrameId()
Frame ID for frame owner elements and also for the document node.
-
getContentDocumentIndex
public java.lang.Integer getContentDocumentIndex()
The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.
-
getPseudoType
public PseudoType getPseudoType()
Type of a pseudo element node.
-
getShadowRootType
public ShadowRootType getShadowRootType()
Shadow root type.
-
getIsClickable
public java.lang.Boolean getIsClickable()
Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
-
getEventListeners
public java.util.List<EventListener> getEventListeners()
Details of the node's event listeners, if any.
-
getCurrentSourceURL
public java.lang.String getCurrentSourceURL()
The selected url for nodes with a srcset attribute.
-
getOriginURL
public java.lang.String getOriginURL()
The url of the script (if any) that generates this node.
-
getScrollOffsetX
public java.lang.Number getScrollOffsetX()
Scroll offsets, set when this node is a Document.
-
getScrollOffsetY
public java.lang.Number getScrollOffsetY()
-
-