Class DOMImpl

  • All Implemented Interfaces:
    DOM

    public class DOMImpl
    extends java.lang.Object
    implements DOM
    • Method Summary

      Modifier and Type Method Description
      java.util.List<java.lang.String> collectClassNamesFromSubtree​(java.lang.Integer nodeId)
      Collects class names for the node with given id and all of it's child nodes.
      java.lang.Integer copyTo​(java.lang.Integer nodeId, java.lang.Integer targetNodeId)
      Creates a deep copy of the specified node and places it into the target container before the given anchor.
      java.lang.Integer copyTo​(java.lang.Integer nodeId, java.lang.Integer targetNodeId, java.lang.Integer insertBeforeNodeId)
      Creates a deep copy of the specified node and places it into the target container before the given anchor.
      Node describeNode()
      Describes node given its id, does not require domain to be enabled.
      Node describeNode​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId, java.lang.Integer depth, java.lang.Boolean pierce)
      Describes node given its id, does not require domain to be enabled.
      void disable()
      Disables DOM agent for the given page.
      void discardSearchResults​(java.lang.String searchId)
      Discards search results from the session with the given id.
      void enable()
      Enables DOM agent for the given page.
      void focus()
      Focuses the given element.
      void focus​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
      Focuses the given element.
      java.util.List<java.lang.String> getAttributes​(java.lang.Integer nodeId)
      Returns attributes for the specified node.
      BoxModel getBoxModel()
      Returns boxes for the given node.
      BoxModel getBoxModel​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
      Returns boxes for the given node.
      java.util.List<java.lang.Double> getContentQuads()
      Returns quads that describe node position on the page.
      java.util.List<java.util.List<java.lang.Double>> getContentQuads​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
      Returns quads that describe node position on the page.
      Node getDocument()
      Returns the root DOM node (and optionally the subtree) to the caller.
      Node getDocument​(java.lang.Integer depth, java.lang.Boolean pierce)
      Returns the root DOM node (and optionally the subtree) to the caller.
      java.lang.String getFileInfo​(java.lang.String objectId)
      Returns file information for the given File wrapper.
      java.util.List<Node> getFlattenedDocument()
      Returns the root DOM node (and optionally the subtree) to the caller.
      java.util.List<Node> getFlattenedDocument​(java.lang.Integer depth, java.lang.Boolean pierce)
      Returns the root DOM node (and optionally the subtree) to the caller.
      GetFrameOwnerResult getFrameOwner​(java.lang.String frameId)
      Returns iframe node that owns iframe with the given domain.
      GetNodeForLocationResult getNodeForLocation​(java.lang.Integer x, java.lang.Integer y)
      Returns node id at given location.
      GetNodeForLocationResult getNodeForLocation​(java.lang.Integer x, java.lang.Integer y, java.lang.Boolean includeUserAgentShadowDOM)
      Returns node id at given location.
      java.lang.String getOuterHTML()
      Returns node's HTML markup.
      java.lang.String getOuterHTML​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
      Returns node's HTML markup.
      java.lang.Integer getRelayoutBoundary​(java.lang.Integer nodeId)
      Returns the id of the nearest ancestor that is a relayout boundary.
      java.util.List<java.lang.Integer> getSearchResults​(java.lang.String searchId, java.lang.Integer fromIndex, java.lang.Integer toIndex)
      Returns search results from given fromIndex to given toIndex from the search with the given identifier.
      void hideHighlight()
      Hides any highlight.
      void highlightNode()
      Highlights DOM node.
      void highlightRect()
      Highlights given rectangle.
      void markUndoableState()
      Marks last undoable state.
      java.lang.Integer moveTo​(java.lang.Integer nodeId, java.lang.Integer targetNodeId)
      Moves node into the new container, places it before the given anchor.
      java.lang.Integer moveTo​(java.lang.Integer nodeId, java.lang.Integer targetNodeId, java.lang.Integer insertBeforeNodeId)
      Moves node into the new container, places it before the given anchor.
      PerformSearchResult performSearch​(java.lang.String query)
      Searches for a given string in the DOM tree.
      PerformSearchResult performSearch​(java.lang.String query, java.lang.Boolean includeUserAgentShadowDOM)
      Searches for a given string in the DOM tree.
      java.lang.Integer pushNodeByPathToFrontend​(java.lang.String path)
      Requests that the node is sent to the caller given its path.
      java.util.List<java.lang.Integer> pushNodesByBackendIdsToFrontend​(java.util.List<java.lang.Integer> backendNodeIds)
      Requests that a batch of nodes is sent to the caller given their backend node ids.
      java.lang.Integer querySelector​(java.lang.Integer nodeId, java.lang.String selector)
      Executes querySelector on a given node.
      java.util.List<java.lang.Integer> querySelectorAll​(java.lang.Integer nodeId, java.lang.String selector)
      Executes querySelectorAll on a given node.
      void redo()
      Re-does the last undone action.
      void removeAttribute​(java.lang.Integer nodeId, java.lang.String name)
      Removes attribute with given name from an element with given id.
      void removeNode​(java.lang.Integer nodeId)
      Removes node with given id.
      void requestChildNodes​(java.lang.Integer nodeId)
      Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.
      void requestChildNodes​(java.lang.Integer nodeId, java.lang.Integer depth, java.lang.Boolean pierce)
      Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.
      java.lang.Integer requestNode​(java.lang.String objectId)
      Requests that the node is sent to the caller given the JavaScript node object reference.
      RemoteObject resolveNode()
      Resolves the JavaScript node object for a given NodeId or BackendNodeId.
      RemoteObject resolveNode​(java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectGroup, java.lang.Integer executionContextId)
      Resolves the JavaScript node object for a given NodeId or BackendNodeId.
      void setAttributesAsText​(java.lang.Integer nodeId, java.lang.String text)
      Sets attributes on element with given id.
      void setAttributesAsText​(java.lang.Integer nodeId, java.lang.String text, java.lang.String name)
      Sets attributes on element with given id.
      void setAttributeValue​(java.lang.Integer nodeId, java.lang.String name, java.lang.String value)
      Sets attribute for an element with given id.
      void setFileInputFiles​(java.util.List<java.lang.String> files)
      Sets files for the given file input element.
      void setFileInputFiles​(java.util.List<java.lang.String> files, java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId)
      Sets files for the given file input element.
      void setInspectedNode​(java.lang.Integer nodeId)
      Enables console to refer to the node with given id via (see Command Line API for more details functions).
      java.lang.Integer setNodeName​(java.lang.Integer nodeId, java.lang.String name)
      Sets node name for a node with given id.
      void setNodeValue​(java.lang.Integer nodeId, java.lang.String value)
      Sets node value for a node with given id.
      void setOuterHTML​(java.lang.Integer nodeId, java.lang.String outerHTML)
      Sets node HTML markup, returns new node id.
      void undo()
      Undoes the last performed action.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • collectClassNamesFromSubtree

        public java.util.List<java.lang.String> collectClassNamesFromSubtree​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Collects class names for the node with given id and all of it's child nodes.
        Specified by:
        collectClassNamesFromSubtree in interface DOM
        Parameters:
        nodeId - Id of the node to collect class names.
        Returns:
        Class name list.
      • copyTo

        public java.lang.Integer copyTo​(java.lang.Integer nodeId,
                                        java.lang.Integer targetNodeId)
        Description copied from interface: DOM
        Creates a deep copy of the specified node and places it into the target container before the given anchor.
        Specified by:
        copyTo in interface DOM
        Parameters:
        nodeId - Id of the node to copy.
        targetNodeId - Id of the element to drop the copy into.
        Returns:
        Id of the node clone.
      • copyTo

        public java.lang.Integer copyTo​(java.lang.Integer nodeId,
                                        java.lang.Integer targetNodeId,
                                        java.lang.Integer insertBeforeNodeId)
        Description copied from interface: DOM
        Creates a deep copy of the specified node and places it into the target container before the given anchor.
        Specified by:
        copyTo in interface DOM
        Parameters:
        nodeId - Id of the node to copy.
        targetNodeId - Id of the element to drop the copy into.
        insertBeforeNodeId - Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId).
        Returns:
        Id of the node clone.
      • describeNode

        public Node describeNode()
        Description copied from interface: DOM
        Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
        Specified by:
        describeNode in interface DOM
        Returns:
        Node description.
      • describeNode

        public Node describeNode​(java.lang.Integer nodeId,
                                 java.lang.Integer backendNodeId,
                                 java.lang.String objectId,
                                 java.lang.Integer depth,
                                 java.lang.Boolean pierce)
        Description copied from interface: DOM
        Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
        Specified by:
        describeNode in interface DOM
        Parameters:
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
        depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
        pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
        Returns:
        Node description.
      • disable

        public void disable()
        Description copied from interface: DOM
        Disables DOM agent for the given page.
        Specified by:
        disable in interface DOM
      • discardSearchResults

        public void discardSearchResults​(java.lang.String searchId)
        Description copied from interface: DOM
        Discards search results from the session with the given id. getSearchResults should no longer be called for that search.
        Specified by:
        discardSearchResults in interface DOM
        Parameters:
        searchId - Unique search session identifier.
      • enable

        public void enable()
        Description copied from interface: DOM
        Enables DOM agent for the given page.
        Specified by:
        enable in interface DOM
      • focus

        public void focus()
        Description copied from interface: DOM
        Focuses the given element.
        Specified by:
        focus in interface DOM
      • focus

        public void focus​(java.lang.Integer nodeId,
                          java.lang.Integer backendNodeId,
                          java.lang.String objectId)
        Description copied from interface: DOM
        Focuses the given element.
        Specified by:
        focus in interface DOM
        Parameters:
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
      • getAttributes

        public java.util.List<java.lang.String> getAttributes​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Returns attributes for the specified node.
        Specified by:
        getAttributes in interface DOM
        Parameters:
        nodeId - Id of the node to retrieve attibutes for.
        Returns:
        An interleaved array of node attribute names and values.
      • getBoxModel

        public BoxModel getBoxModel()
        Description copied from interface: DOM
        Returns boxes for the given node.
        Specified by:
        getBoxModel in interface DOM
        Returns:
        Box model for the node.
      • getBoxModel

        public BoxModel getBoxModel​(java.lang.Integer nodeId,
                                    java.lang.Integer backendNodeId,
                                    java.lang.String objectId)
        Description copied from interface: DOM
        Returns boxes for the given node.
        Specified by:
        getBoxModel in interface DOM
        Parameters:
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
        Returns:
        Box model for the node.
      • getContentQuads

        public java.util.List<java.lang.Double> getContentQuads()
        Description copied from interface: DOM
        Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.
        Specified by:
        getContentQuads in interface DOM
        Returns:
        Quads that describe node layout relative to viewport.
      • getContentQuads

        public java.util.List<java.util.List<java.lang.Double>> getContentQuads​(java.lang.Integer nodeId,
                                                                                java.lang.Integer backendNodeId,
                                                                                java.lang.String objectId)
        Description copied from interface: DOM
        Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.
        Specified by:
        getContentQuads in interface DOM
        Parameters:
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
        Returns:
        Quads that describe node layout relative to viewport.
      • getDocument

        public Node getDocument()
        Description copied from interface: DOM
        Returns the root DOM node (and optionally the subtree) to the caller.
        Specified by:
        getDocument in interface DOM
        Returns:
        Resulting node.
      • getDocument

        public Node getDocument​(java.lang.Integer depth,
                                java.lang.Boolean pierce)
        Description copied from interface: DOM
        Returns the root DOM node (and optionally the subtree) to the caller.
        Specified by:
        getDocument in interface DOM
        Parameters:
        depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
        pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
        Returns:
        Resulting node.
      • getFileInfo

        public java.lang.String getFileInfo​(java.lang.String objectId)
        Description copied from interface: DOM
        Returns file information for the given File wrapper.
        Specified by:
        getFileInfo in interface DOM
        Parameters:
        objectId - JavaScript object id of the node wrapper.
      • getFlattenedDocument

        public java.util.List<Node> getFlattenedDocument()
        Description copied from interface: DOM
        Returns the root DOM node (and optionally the subtree) to the caller.
        Specified by:
        getFlattenedDocument in interface DOM
        Returns:
        Resulting node.
      • getFlattenedDocument

        public java.util.List<Node> getFlattenedDocument​(java.lang.Integer depth,
                                                         java.lang.Boolean pierce)
        Description copied from interface: DOM
        Returns the root DOM node (and optionally the subtree) to the caller.
        Specified by:
        getFlattenedDocument in interface DOM
        Parameters:
        depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
        pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
        Returns:
        Resulting node.
      • getFrameOwner

        public GetFrameOwnerResult getFrameOwner​(java.lang.String frameId)
        Description copied from interface: DOM
        Returns iframe node that owns iframe with the given domain.
        Specified by:
        getFrameOwner in interface DOM
        Returns:
        GetFrameOwnerResult
      • getNodeForLocation

        public GetNodeForLocationResult getNodeForLocation​(java.lang.Integer x,
                                                           java.lang.Integer y)
        Description copied from interface: DOM
        Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.
        Specified by:
        getNodeForLocation in interface DOM
        Parameters:
        x - X coordinate.
        y - Y coordinate.
        Returns:
        GetNodeForLocationResult
      • getNodeForLocation

        public GetNodeForLocationResult getNodeForLocation​(java.lang.Integer x,
                                                           java.lang.Integer y,
                                                           java.lang.Boolean includeUserAgentShadowDOM)
        Description copied from interface: DOM
        Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.
        Specified by:
        getNodeForLocation in interface DOM
        Parameters:
        x - X coordinate.
        y - Y coordinate.
        includeUserAgentShadowDOM - False to skip to the nearest non-UA shadow root ancestor (default: false).
        Returns:
        GetNodeForLocationResult
      • getOuterHTML

        public java.lang.String getOuterHTML()
        Description copied from interface: DOM
        Returns node's HTML markup.
        Specified by:
        getOuterHTML in interface DOM
        Returns:
        Outer HTML markup.
      • getOuterHTML

        public java.lang.String getOuterHTML​(java.lang.Integer nodeId,
                                             java.lang.Integer backendNodeId,
                                             java.lang.String objectId)
        Description copied from interface: DOM
        Returns node's HTML markup.
        Specified by:
        getOuterHTML in interface DOM
        Parameters:
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
        Returns:
        Outer HTML markup.
      • getRelayoutBoundary

        public java.lang.Integer getRelayoutBoundary​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Returns the id of the nearest ancestor that is a relayout boundary.
        Specified by:
        getRelayoutBoundary in interface DOM
        Parameters:
        nodeId - Id of the node.
        Returns:
        Relayout boundary node id for the given node.
      • getSearchResults

        public java.util.List<java.lang.Integer> getSearchResults​(java.lang.String searchId,
                                                                  java.lang.Integer fromIndex,
                                                                  java.lang.Integer toIndex)
        Description copied from interface: DOM
        Returns search results from given fromIndex to given toIndex from the search with the given identifier.
        Specified by:
        getSearchResults in interface DOM
        Parameters:
        searchId - Unique search session identifier.
        fromIndex - Start index of the search result to be returned.
        toIndex - End index of the search result to be returned.
        Returns:
        Ids of the search result nodes.
      • hideHighlight

        public void hideHighlight()
        Description copied from interface: DOM
        Hides any highlight.
        Specified by:
        hideHighlight in interface DOM
      • highlightNode

        public void highlightNode()
        Description copied from interface: DOM
        Highlights DOM node.
        Specified by:
        highlightNode in interface DOM
      • highlightRect

        public void highlightRect()
        Description copied from interface: DOM
        Highlights given rectangle.
        Specified by:
        highlightRect in interface DOM
      • markUndoableState

        public void markUndoableState()
        Description copied from interface: DOM
        Marks last undoable state.
        Specified by:
        markUndoableState in interface DOM
      • moveTo

        public java.lang.Integer moveTo​(java.lang.Integer nodeId,
                                        java.lang.Integer targetNodeId)
        Description copied from interface: DOM
        Moves node into the new container, places it before the given anchor.
        Specified by:
        moveTo in interface DOM
        Parameters:
        nodeId - Id of the node to move.
        targetNodeId - Id of the element to drop the moved node into.
        Returns:
        New id of the moved node.
      • moveTo

        public java.lang.Integer moveTo​(java.lang.Integer nodeId,
                                        java.lang.Integer targetNodeId,
                                        java.lang.Integer insertBeforeNodeId)
        Description copied from interface: DOM
        Moves node into the new container, places it before the given anchor.
        Specified by:
        moveTo in interface DOM
        Parameters:
        nodeId - Id of the node to move.
        targetNodeId - Id of the element to drop the moved node into.
        insertBeforeNodeId - Drop node before this one (if absent, the moved node becomes the last child of targetNodeId).
        Returns:
        New id of the moved node.
      • performSearch

        public PerformSearchResult performSearch​(java.lang.String query)
        Description copied from interface: DOM
        Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.
        Specified by:
        performSearch in interface DOM
        Parameters:
        query - Plain text or query selector or XPath search query.
        Returns:
        PerformSearchResult
      • performSearch

        public PerformSearchResult performSearch​(java.lang.String query,
                                                 java.lang.Boolean includeUserAgentShadowDOM)
        Description copied from interface: DOM
        Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.
        Specified by:
        performSearch in interface DOM
        Parameters:
        query - Plain text or query selector or XPath search query.
        includeUserAgentShadowDOM - True to search in user agent shadow DOM.
        Returns:
        PerformSearchResult
      • pushNodeByPathToFrontend

        public java.lang.Integer pushNodeByPathToFrontend​(java.lang.String path)
        Description copied from interface: DOM
        Requests that the node is sent to the caller given its path. // FIXME, use XPath
        Specified by:
        pushNodeByPathToFrontend in interface DOM
        Parameters:
        path - Path to node in the proprietary format.
        Returns:
        Id of the node for given path.
      • pushNodesByBackendIdsToFrontend

        public java.util.List<java.lang.Integer> pushNodesByBackendIdsToFrontend​(java.util.List<java.lang.Integer> backendNodeIds)
        Description copied from interface: DOM
        Requests that a batch of nodes is sent to the caller given their backend node ids.
        Specified by:
        pushNodesByBackendIdsToFrontend in interface DOM
        Parameters:
        backendNodeIds - The array of backend node ids.
        Returns:
        The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
      • querySelector

        public java.lang.Integer querySelector​(java.lang.Integer nodeId,
                                               java.lang.String selector)
        Description copied from interface: DOM
        Executes querySelector on a given node.
        Specified by:
        querySelector in interface DOM
        Parameters:
        nodeId - Id of the node to query upon.
        selector - Selector string.
        Returns:
        Query selector result.
      • querySelectorAll

        public java.util.List<java.lang.Integer> querySelectorAll​(java.lang.Integer nodeId,
                                                                  java.lang.String selector)
        Description copied from interface: DOM
        Executes querySelectorAll on a given node.
        Specified by:
        querySelectorAll in interface DOM
        Parameters:
        nodeId - Id of the node to query upon.
        selector - Selector string.
        Returns:
        Query selector result.
      • redo

        public void redo()
        Description copied from interface: DOM
        Re-does the last undone action.
        Specified by:
        redo in interface DOM
      • removeAttribute

        public void removeAttribute​(java.lang.Integer nodeId,
                                    java.lang.String name)
        Description copied from interface: DOM
        Removes attribute with given name from an element with given id.
        Specified by:
        removeAttribute in interface DOM
        Parameters:
        nodeId - Id of the element to remove attribute from.
        name - Name of the attribute to remove.
      • removeNode

        public void removeNode​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Removes node with given id.
        Specified by:
        removeNode in interface DOM
        Parameters:
        nodeId - Id of the node to remove.
      • requestChildNodes

        public void requestChildNodes​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.
        Specified by:
        requestChildNodes in interface DOM
        Parameters:
        nodeId - Id of the node to get children for.
      • requestChildNodes

        public void requestChildNodes​(java.lang.Integer nodeId,
                                      java.lang.Integer depth,
                                      java.lang.Boolean pierce)
        Description copied from interface: DOM
        Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.
        Specified by:
        requestChildNodes in interface DOM
        Parameters:
        nodeId - Id of the node to get children for.
        depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
        pierce - Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
      • requestNode

        public java.lang.Integer requestNode​(java.lang.String objectId)
        Description copied from interface: DOM
        Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of setChildNodes notifications.
        Specified by:
        requestNode in interface DOM
        Parameters:
        objectId - JavaScript object id to convert into node.
        Returns:
        Node id for given object.
      • resolveNode

        public RemoteObject resolveNode()
        Description copied from interface: DOM
        Resolves the JavaScript node object for a given NodeId or BackendNodeId.
        Specified by:
        resolveNode in interface DOM
        Returns:
        JavaScript object wrapper for given node.
      • resolveNode

        public RemoteObject resolveNode​(java.lang.Integer nodeId,
                                        java.lang.Integer backendNodeId,
                                        java.lang.String objectGroup,
                                        java.lang.Integer executionContextId)
        Description copied from interface: DOM
        Resolves the JavaScript node object for a given NodeId or BackendNodeId.
        Specified by:
        resolveNode in interface DOM
        Parameters:
        nodeId - Id of the node to resolve.
        backendNodeId - Backend identifier of the node to resolve.
        objectGroup - Symbolic group name that can be used to release multiple objects.
        executionContextId - Execution context in which to resolve the node.
        Returns:
        JavaScript object wrapper for given node.
      • setAttributesAsText

        public void setAttributesAsText​(java.lang.Integer nodeId,
                                        java.lang.String text)
        Description copied from interface: DOM
        Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.
        Specified by:
        setAttributesAsText in interface DOM
        Parameters:
        nodeId - Id of the element to set attributes for.
        text - Text with a number of attributes. Will parse this text using HTML parser.
      • setAttributesAsText

        public void setAttributesAsText​(java.lang.Integer nodeId,
                                        java.lang.String text,
                                        java.lang.String name)
        Description copied from interface: DOM
        Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.
        Specified by:
        setAttributesAsText in interface DOM
        Parameters:
        nodeId - Id of the element to set attributes for.
        text - Text with a number of attributes. Will parse this text using HTML parser.
        name - Attribute name to replace with new attributes derived from text in case text parsed successfully.
      • setAttributeValue

        public void setAttributeValue​(java.lang.Integer nodeId,
                                      java.lang.String name,
                                      java.lang.String value)
        Description copied from interface: DOM
        Sets attribute for an element with given id.
        Specified by:
        setAttributeValue in interface DOM
        Parameters:
        nodeId - Id of the element to set attribute for.
        name - Attribute name.
        value - Attribute value.
      • setFileInputFiles

        public void setFileInputFiles​(java.util.List<java.lang.String> files)
        Description copied from interface: DOM
        Sets files for the given file input element.
        Specified by:
        setFileInputFiles in interface DOM
        Parameters:
        files - Array of file paths to set.
      • setFileInputFiles

        public void setFileInputFiles​(java.util.List<java.lang.String> files,
                                      java.lang.Integer nodeId,
                                      java.lang.Integer backendNodeId,
                                      java.lang.String objectId)
        Description copied from interface: DOM
        Sets files for the given file input element.
        Specified by:
        setFileInputFiles in interface DOM
        Parameters:
        files - Array of file paths to set.
        nodeId - Identifier of the node.
        backendNodeId - Identifier of the backend node.
        objectId - JavaScript object id of the node wrapper.
      • setInspectedNode

        public void setInspectedNode​(java.lang.Integer nodeId)
        Description copied from interface: DOM
        Enables console to refer to the node with given id via (see Command Line API for more details functions).
        Specified by:
        setInspectedNode in interface DOM
        Parameters:
        nodeId - DOM node id to be accessible by means of x command line API.
      • setNodeName

        public java.lang.Integer setNodeName​(java.lang.Integer nodeId,
                                             java.lang.String name)
        Description copied from interface: DOM
        Sets node name for a node with given id.
        Specified by:
        setNodeName in interface DOM
        Parameters:
        nodeId - Id of the node to set name for.
        name - New node's name.
        Returns:
        New node's id.
      • setNodeValue

        public void setNodeValue​(java.lang.Integer nodeId,
                                 java.lang.String value)
        Description copied from interface: DOM
        Sets node value for a node with given id.
        Specified by:
        setNodeValue in interface DOM
        Parameters:
        nodeId - Id of the node to set value for.
        value - New node's value.
      • setOuterHTML

        public void setOuterHTML​(java.lang.Integer nodeId,
                                 java.lang.String outerHTML)
        Description copied from interface: DOM
        Sets node HTML markup, returns new node id.
        Specified by:
        setOuterHTML in interface DOM
        Parameters:
        nodeId - Id of the node to set markup for.
        outerHTML - Outer HTML markup to set.
      • undo

        public void undo()
        Description copied from interface: DOM
        Undoes the last performed action.
        Specified by:
        undo in interface DOM