java.lang.Object
org.openqa.selenium.devtools.v85.domsnapshot.model.DOMNode

public class DOMNode extends Object
A Node in the DOM tree.
  • Constructor Details

  • Method Details

    • getNodeType

      public Integer getNodeType()
      `Node`'s nodeType.
    • getNodeName

      public String getNodeName()
      `Node`'s nodeName.
    • getNodeValue

      public String getNodeValue()
      `Node`'s nodeValue.
    • getTextValue

      public Optional<String> getTextValue()
      Only set for textarea elements, contains the text value.
    • getInputValue

      public Optional<String> getInputValue()
      Only set for input elements, contains the input's associated text value.
    • getInputChecked

      public Optional<Boolean> getInputChecked()
      Only set for radio and checkbox input elements, indicates if the element has been checked
    • getOptionSelected

      public Optional<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 Optional<List<Integer>> getChildNodeIndexes()
      The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.
    • getAttributes

      public Optional<List<NameValue>> getAttributes()
      Attributes of an `Element` node.
    • getPseudoElementIndexes

      public Optional<List<Integer>> getPseudoElementIndexes()
      Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.
    • getLayoutNodeIndex

      public Optional<Integer> getLayoutNodeIndex()
      The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.
    • getDocumentURL

      public Optional<String> getDocumentURL()
      Document URL that `Document` or `FrameOwner` node points to.
    • getBaseURL

      public Optional<String> getBaseURL()
      Base URL that `Document` or `FrameOwner` node uses for URL completion.
    • getContentLanguage

      public Optional<String> getContentLanguage()
      Only set for documents, contains the document's content language.
    • getDocumentEncoding

      public Optional<String> getDocumentEncoding()
      Only set for documents, contains the document's character set encoding.
    • getPublicId

      public Optional<String> getPublicId()
      `DocumentType` node's publicId.
    • getSystemId

      public Optional<String> getSystemId()
      `DocumentType` node's systemId.
    • getFrameId

      public Optional<FrameId> getFrameId()
      Frame ID for frame owner elements and also for the document node.
    • getContentDocumentIndex

      public Optional<Integer> getContentDocumentIndex()
      The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.
    • getPseudoType

      public Optional<PseudoType> getPseudoType()
      Type of a pseudo element node.
    • getShadowRootType

      public Optional<ShadowRootType> getShadowRootType()
      Shadow root type.
    • getIsClickable

      public Optional<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 Optional<List<EventListener>> getEventListeners()
      Details of the node's event listeners, if any.
    • getCurrentSourceURL

      public Optional<String> getCurrentSourceURL()
      The selected url for nodes with a srcset attribute.
    • getOriginURL

      public Optional<String> getOriginURL()
      The url of the script (if any) that generates this node.
    • getScrollOffsetX

      public Optional<Number> getScrollOffsetX()
      Scroll offsets, set when this node is a Document.
    • getScrollOffsetY

      public Optional<Number> getScrollOffsetY()