Class Node
- java.lang.Object
-
- org.openqa.selenium.devtools.v112.dom.model.Node
-
public class Node extends java.lang.Object
DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
-
-
Constructor Summary
Constructors Constructor Description Node(NodeId nodeId, java.util.Optional<NodeId> parentId, BackendNodeId backendNodeId, java.lang.Integer nodeType, java.lang.String nodeName, java.lang.String localName, java.lang.String nodeValue, java.util.Optional<java.lang.Integer> childNodeCount, java.util.Optional<java.util.List<Node>> children, java.util.Optional<java.util.List<java.lang.String>> attributes, java.util.Optional<java.lang.String> documentURL, java.util.Optional<java.lang.String> baseURL, java.util.Optional<java.lang.String> publicId, java.util.Optional<java.lang.String> systemId, java.util.Optional<java.lang.String> internalSubset, java.util.Optional<java.lang.String> xmlVersion, java.util.Optional<java.lang.String> name, java.util.Optional<java.lang.String> value, java.util.Optional<PseudoType> pseudoType, java.util.Optional<java.lang.String> pseudoIdentifier, java.util.Optional<ShadowRootType> shadowRootType, java.util.Optional<FrameId> frameId, java.util.Optional<Node> contentDocument, java.util.Optional<java.util.List<Node>> shadowRoots, java.util.Optional<Node> templateContent, java.util.Optional<java.util.List<Node>> pseudoElements, java.util.Optional<Node> importedDocument, java.util.Optional<java.util.List<BackendNode>> distributedNodes, java.util.Optional<java.lang.Boolean> isSVG, java.util.Optional<CompatibilityMode> compatibilityMode, java.util.Optional<BackendNode> assignedSlot)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Optional<BackendNode>
getAssignedSlot()
java.util.Optional<java.util.List<java.lang.String>>
getAttributes()
Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.BackendNodeId
getBackendNodeId()
The BackendNodeId for this node.java.util.Optional<java.lang.String>
getBaseURL()
Base URL that `Document` or `FrameOwner` node uses for URL completion.java.util.Optional<java.lang.Integer>
getChildNodeCount()
Child count for `Container` nodes.java.util.Optional<java.util.List<Node>>
getChildren()
Child nodes of this node when requested with children.java.util.Optional<CompatibilityMode>
getCompatibilityMode()
java.util.Optional<Node>
getContentDocument()
Content document for frame owner elements.java.util.Optional<java.util.List<BackendNode>>
getDistributedNodes()
Distributed nodes for given insertion point.java.util.Optional<java.lang.String>
getDocumentURL()
Document URL that `Document` or `FrameOwner` node points to.java.util.Optional<FrameId>
getFrameId()
Frame ID for frame owner elements.java.util.Optional<Node>
getImportedDocument()
Deprecated.java.util.Optional<java.lang.String>
getInternalSubset()
`DocumentType`'s internalSubset.java.util.Optional<java.lang.Boolean>
getIsSVG()
Whether the node is SVG.java.lang.String
getLocalName()
`Node`'s localName.java.util.Optional<java.lang.String>
getName()
`Attr`'s name.NodeId
getNodeId()
Node identifier that is passed into the rest of the DOM messages as the `nodeId`.java.lang.String
getNodeName()
`Node`'s nodeName.java.lang.Integer
getNodeType()
`Node`'s nodeType.java.lang.String
getNodeValue()
`Node`'s nodeValue.java.util.Optional<NodeId>
getParentId()
The id of the parent node if any.java.util.Optional<java.util.List<Node>>
getPseudoElements()
Pseudo elements associated with this node.java.util.Optional<java.lang.String>
getPseudoIdentifier()
Pseudo element identifier for this node.java.util.Optional<PseudoType>
getPseudoType()
Pseudo element type for this node.java.util.Optional<java.lang.String>
getPublicId()
`DocumentType`'s publicId.java.util.Optional<java.util.List<Node>>
getShadowRoots()
Shadow root list for given element host.java.util.Optional<ShadowRootType>
getShadowRootType()
Shadow root type.java.util.Optional<java.lang.String>
getSystemId()
`DocumentType`'s systemId.java.util.Optional<Node>
getTemplateContent()
Content document fragment for template elements.java.util.Optional<java.lang.String>
getValue()
`Attr`'s value.java.util.Optional<java.lang.String>
getXmlVersion()
`Document`'s XML version in case of XML documents.
-
-
-
Constructor Detail
-
Node
public Node(NodeId nodeId, java.util.Optional<NodeId> parentId, BackendNodeId backendNodeId, java.lang.Integer nodeType, java.lang.String nodeName, java.lang.String localName, java.lang.String nodeValue, java.util.Optional<java.lang.Integer> childNodeCount, java.util.Optional<java.util.List<Node>> children, java.util.Optional<java.util.List<java.lang.String>> attributes, java.util.Optional<java.lang.String> documentURL, java.util.Optional<java.lang.String> baseURL, java.util.Optional<java.lang.String> publicId, java.util.Optional<java.lang.String> systemId, java.util.Optional<java.lang.String> internalSubset, java.util.Optional<java.lang.String> xmlVersion, java.util.Optional<java.lang.String> name, java.util.Optional<java.lang.String> value, java.util.Optional<PseudoType> pseudoType, java.util.Optional<java.lang.String> pseudoIdentifier, java.util.Optional<ShadowRootType> shadowRootType, java.util.Optional<FrameId> frameId, java.util.Optional<Node> contentDocument, java.util.Optional<java.util.List<Node>> shadowRoots, java.util.Optional<Node> templateContent, java.util.Optional<java.util.List<Node>> pseudoElements, java.util.Optional<Node> importedDocument, java.util.Optional<java.util.List<BackendNode>> distributedNodes, java.util.Optional<java.lang.Boolean> isSVG, java.util.Optional<CompatibilityMode> compatibilityMode, java.util.Optional<BackendNode> assignedSlot)
-
-
Method Detail
-
getNodeId
public NodeId getNodeId()
Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
-
getParentId
public java.util.Optional<NodeId> getParentId()
The id of the parent node if any.
-
getBackendNodeId
public BackendNodeId getBackendNodeId()
The BackendNodeId for this node.
-
getNodeType
public java.lang.Integer getNodeType()
`Node`'s nodeType.
-
getNodeName
public java.lang.String getNodeName()
`Node`'s nodeName.
-
getLocalName
public java.lang.String getLocalName()
`Node`'s localName.
-
getNodeValue
public java.lang.String getNodeValue()
`Node`'s nodeValue.
-
getChildNodeCount
public java.util.Optional<java.lang.Integer> getChildNodeCount()
Child count for `Container` nodes.
-
getChildren
public java.util.Optional<java.util.List<Node>> getChildren()
Child nodes of this node when requested with children.
-
getAttributes
public java.util.Optional<java.util.List<java.lang.String>> getAttributes()
Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
-
getDocumentURL
public java.util.Optional<java.lang.String> getDocumentURL()
Document URL that `Document` or `FrameOwner` node points to.
-
getBaseURL
public java.util.Optional<java.lang.String> getBaseURL()
Base URL that `Document` or `FrameOwner` node uses for URL completion.
-
getPublicId
public java.util.Optional<java.lang.String> getPublicId()
`DocumentType`'s publicId.
-
getSystemId
public java.util.Optional<java.lang.String> getSystemId()
`DocumentType`'s systemId.
-
getInternalSubset
public java.util.Optional<java.lang.String> getInternalSubset()
`DocumentType`'s internalSubset.
-
getXmlVersion
public java.util.Optional<java.lang.String> getXmlVersion()
`Document`'s XML version in case of XML documents.
-
getName
public java.util.Optional<java.lang.String> getName()
`Attr`'s name.
-
getValue
public java.util.Optional<java.lang.String> getValue()
`Attr`'s value.
-
getPseudoType
public java.util.Optional<PseudoType> getPseudoType()
Pseudo element type for this node.
-
getPseudoIdentifier
public java.util.Optional<java.lang.String> getPseudoIdentifier()
Pseudo element identifier for this node. Only present if there is a valid pseudoType.
-
getShadowRootType
public java.util.Optional<ShadowRootType> getShadowRootType()
Shadow root type.
-
getFrameId
public java.util.Optional<FrameId> getFrameId()
Frame ID for frame owner elements.
-
getContentDocument
public java.util.Optional<Node> getContentDocument()
Content document for frame owner elements.
-
getShadowRoots
public java.util.Optional<java.util.List<Node>> getShadowRoots()
Shadow root list for given element host.
-
getTemplateContent
public java.util.Optional<Node> getTemplateContent()
Content document fragment for template elements.
-
getPseudoElements
public java.util.Optional<java.util.List<Node>> getPseudoElements()
Pseudo elements associated with this node.
-
getImportedDocument
@Deprecated public java.util.Optional<Node> getImportedDocument()
Deprecated.Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.
-
getDistributedNodes
public java.util.Optional<java.util.List<BackendNode>> getDistributedNodes()
Distributed nodes for given insertion point.
-
getIsSVG
public java.util.Optional<java.lang.Boolean> getIsSVG()
Whether the node is SVG.
-
getCompatibilityMode
public java.util.Optional<CompatibilityMode> getCompatibilityMode()
-
getAssignedSlot
public java.util.Optional<BackendNode> getAssignedSlot()
-
-