Table of Contents

Class DOMAdapter

Namespace
OpenQA.Selenium.DevTools.V147.DOM
Assembly
Selenium.WebDriver.dll

Represents an adapter for the DOM domain to simplify the command interface.

public class DOMAdapter
Inheritance
DOMAdapter
Inherited Members

Constructors

DOMAdapter(IDevToolsSession)

Initializes a new instance of the DOMAdapter class.

public DOMAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

CollectClassNamesFromSubtree(CollectClassNamesFromSubtreeCommandSettings, CancellationToken, int?, bool)

Collects class names for the node with given id and all of it's child nodes.

public Task<CollectClassNamesFromSubtreeCommandResponse> CollectClassNamesFromSubtree(CollectClassNamesFromSubtreeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CollectClassNamesFromSubtreeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CollectClassNamesFromSubtreeCommandResponse>

CopyTo(CopyToCommandSettings, CancellationToken, int?, bool)

Creates a deep copy of the specified node and places it into the target container before the given anchor.

public Task<CopyToCommandResponse> CopyTo(CopyToCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CopyToCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CopyToCommandResponse>

DescribeNode(DescribeNodeCommandSettings, CancellationToken, int?, bool)

Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.

public Task<DescribeNodeCommandResponse> DescribeNode(DescribeNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DescribeNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DescribeNodeCommandResponse>

Disable(DisableCommandSettings?, CancellationToken, int?, bool)

Disables DOM agent for the given page.

public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DisableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisableCommandResponse>

DiscardSearchResults(DiscardSearchResultsCommandSettings, CancellationToken, int?, bool)

Discards search results from the session with the given id. getSearchResults should no longer be called for that search.

public Task<DiscardSearchResultsCommandResponse?> DiscardSearchResults(DiscardSearchResultsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DiscardSearchResultsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DiscardSearchResultsCommandResponse>

Enable(EnableCommandSettings, CancellationToken, int?, bool)

Enables DOM agent for the given page.

public Task<EnableCommandResponse?> Enable(EnableCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

Focus(FocusCommandSettings, CancellationToken, int?, bool)

Focuses the given element.

public Task<FocusCommandResponse?> Focus(FocusCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command FocusCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<FocusCommandResponse>

ForceShowPopover(ForceShowPopoverCommandSettings, CancellationToken, int?, bool)

When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.

public Task<ForceShowPopoverCommandResponse> ForceShowPopover(ForceShowPopoverCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ForceShowPopoverCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ForceShowPopoverCommandResponse>

GetAnchorElement(GetAnchorElementCommandSettings, CancellationToken, int?, bool)

Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.

public Task<GetAnchorElementCommandResponse> GetAnchorElement(GetAnchorElementCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetAnchorElementCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetAnchorElementCommandResponse>

GetAttributes(GetAttributesCommandSettings, CancellationToken, int?, bool)

Returns attributes for the specified node.

public Task<GetAttributesCommandResponse> GetAttributes(GetAttributesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetAttributesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetAttributesCommandResponse>

GetBoxModel(GetBoxModelCommandSettings, CancellationToken, int?, bool)

Returns boxes for the given node.

public Task<GetBoxModelCommandResponse> GetBoxModel(GetBoxModelCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetBoxModelCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetBoxModelCommandResponse>

GetContainerForNode(GetContainerForNodeCommandSettings, CancellationToken, int?, bool)

Returns the query container of the given node based on container query conditions: containerName, physical and logical axes, and whether it queries scroll-state or anchored elements. If no axes are provided and queriesScrollState is false, the style container is returned, which is the direct parent or the closest element with a matching container-name.

public Task<GetContainerForNodeCommandResponse> GetContainerForNode(GetContainerForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetContainerForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetContainerForNodeCommandResponse>

GetContentQuads(GetContentQuadsCommandSettings, CancellationToken, int?, bool)

Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.

public Task<GetContentQuadsCommandResponse> GetContentQuads(GetContentQuadsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetContentQuadsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetContentQuadsCommandResponse>

GetDetachedDomNodes(GetDetachedDomNodesCommandSettings?, CancellationToken, int?, bool)

Returns list of detached nodes

public Task<GetDetachedDomNodesCommandResponse> GetDetachedDomNodes(GetDetachedDomNodesCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetDetachedDomNodesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetDetachedDomNodesCommandResponse>

GetDocument(GetDocumentCommandSettings, CancellationToken, int?, bool)

Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target.

public Task<GetDocumentCommandResponse> GetDocument(GetDocumentCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetDocumentCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetDocumentCommandResponse>

GetElementByRelation(GetElementByRelationCommandSettings, CancellationToken, int?, bool)

Returns the NodeId of the matched element according to certain relations.

public Task<GetElementByRelationCommandResponse> GetElementByRelation(GetElementByRelationCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetElementByRelationCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetElementByRelationCommandResponse>

GetFileInfo(GetFileInfoCommandSettings, CancellationToken, int?, bool)

Returns file information for the given File wrapper.

public Task<GetFileInfoCommandResponse> GetFileInfo(GetFileInfoCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetFileInfoCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetFileInfoCommandResponse>

GetFlattenedDocument(GetFlattenedDocumentCommandSettings, CancellationToken, int?, bool)

Returns the root DOM node (and optionally the subtree) to the caller. Deprecated, as it is not designed to work well with the rest of the DOM agent. Use DOMSnapshot.captureSnapshot instead.

public Task<GetFlattenedDocumentCommandResponse> GetFlattenedDocument(GetFlattenedDocumentCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetFlattenedDocumentCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetFlattenedDocumentCommandResponse>

GetFrameOwner(GetFrameOwnerCommandSettings, CancellationToken, int?, bool)

Returns iframe node that owns iframe with the given domain.

public Task<GetFrameOwnerCommandResponse> GetFrameOwner(GetFrameOwnerCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetFrameOwnerCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetFrameOwnerCommandResponse>

GetNodeForLocation(GetNodeForLocationCommandSettings, CancellationToken, int?, bool)

Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.

public Task<GetNodeForLocationCommandResponse> GetNodeForLocation(GetNodeForLocationCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetNodeForLocationCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetNodeForLocationCommandResponse>

GetNodeStackTraces(GetNodeStackTracesCommandSettings, CancellationToken, int?, bool)

Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.

public Task<GetNodeStackTracesCommandResponse> GetNodeStackTraces(GetNodeStackTracesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetNodeStackTracesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetNodeStackTracesCommandResponse>

GetNodesForSubtreeByStyle(GetNodesForSubtreeByStyleCommandSettings, CancellationToken, int?, bool)

Finds nodes with a given computed style in a subtree.

public Task<GetNodesForSubtreeByStyleCommandResponse> GetNodesForSubtreeByStyle(GetNodesForSubtreeByStyleCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetNodesForSubtreeByStyleCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetNodesForSubtreeByStyleCommandResponse>

GetOuterHTML(GetOuterHTMLCommandSettings, CancellationToken, int?, bool)

Returns node's HTML markup.

public Task<GetOuterHTMLCommandResponse> GetOuterHTML(GetOuterHTMLCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetOuterHTMLCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetOuterHTMLCommandResponse>

GetQueryingDescendantsForContainer(GetQueryingDescendantsForContainerCommandSettings, CancellationToken, int?, bool)

Returns the descendants of a container query container that have container queries against this container.

public Task<GetQueryingDescendantsForContainerCommandResponse> GetQueryingDescendantsForContainer(GetQueryingDescendantsForContainerCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetQueryingDescendantsForContainerCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetQueryingDescendantsForContainerCommandResponse>

GetRelayoutBoundary(GetRelayoutBoundaryCommandSettings, CancellationToken, int?, bool)

Returns the id of the nearest ancestor that is a relayout boundary.

public Task<GetRelayoutBoundaryCommandResponse> GetRelayoutBoundary(GetRelayoutBoundaryCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetRelayoutBoundaryCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetRelayoutBoundaryCommandResponse>

GetSearchResults(GetSearchResultsCommandSettings, CancellationToken, int?, bool)

Returns search results from given fromIndex to given toIndex from the search with the given identifier.

public Task<GetSearchResultsCommandResponse> GetSearchResults(GetSearchResultsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetSearchResultsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetSearchResultsCommandResponse>

GetTopLayerElements(GetTopLayerElementsCommandSettings?, CancellationToken, int?, bool)

Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content.

public Task<GetTopLayerElementsCommandResponse> GetTopLayerElements(GetTopLayerElementsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetTopLayerElementsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetTopLayerElementsCommandResponse>

HideHighlight(HideHighlightCommandSettings?, CancellationToken, int?, bool)

Hides any highlight.

public Task<HideHighlightCommandResponse?> HideHighlight(HideHighlightCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command HideHighlightCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<HideHighlightCommandResponse>

HighlightNode(HighlightNodeCommandSettings?, CancellationToken, int?, bool)

Highlights DOM node.

public Task<HighlightNodeCommandResponse?> HighlightNode(HighlightNodeCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command HighlightNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<HighlightNodeCommandResponse>

HighlightRect(HighlightRectCommandSettings?, CancellationToken, int?, bool)

Highlights given rectangle.

public Task<HighlightRectCommandResponse?> HighlightRect(HighlightRectCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command HighlightRectCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<HighlightRectCommandResponse>

MarkUndoableState(MarkUndoableStateCommandSettings?, CancellationToken, int?, bool)

Marks last undoable state.

public Task<MarkUndoableStateCommandResponse?> MarkUndoableState(MarkUndoableStateCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command MarkUndoableStateCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<MarkUndoableStateCommandResponse>

MoveTo(MoveToCommandSettings, CancellationToken, int?, bool)

Moves node into the new container, places it before the given anchor.

public Task<MoveToCommandResponse> MoveTo(MoveToCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command MoveToCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<MoveToCommandResponse>

PerformSearch(PerformSearchCommandSettings, CancellationToken, int?, bool)

Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.

public Task<PerformSearchCommandResponse> PerformSearch(PerformSearchCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command PerformSearchCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<PerformSearchCommandResponse>

PushNodeByPathToFrontend(PushNodeByPathToFrontendCommandSettings, CancellationToken, int?, bool)

Requests that the node is sent to the caller given its path. // FIXME, use XPath

public Task<PushNodeByPathToFrontendCommandResponse> PushNodeByPathToFrontend(PushNodeByPathToFrontendCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command PushNodeByPathToFrontendCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<PushNodeByPathToFrontendCommandResponse>

PushNodesByBackendIdsToFrontend(PushNodesByBackendIdsToFrontendCommandSettings, CancellationToken, int?, bool)

Requests that a batch of nodes is sent to the caller given their backend node ids.

public Task<PushNodesByBackendIdsToFrontendCommandResponse> PushNodesByBackendIdsToFrontend(PushNodesByBackendIdsToFrontendCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command PushNodesByBackendIdsToFrontendCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<PushNodesByBackendIdsToFrontendCommandResponse>

QuerySelector(QuerySelectorCommandSettings, CancellationToken, int?, bool)

Executes querySelector on a given node.

public Task<QuerySelectorCommandResponse> QuerySelector(QuerySelectorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command QuerySelectorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<QuerySelectorCommandResponse>

QuerySelectorAll(QuerySelectorAllCommandSettings, CancellationToken, int?, bool)

Executes querySelectorAll on a given node.

public Task<QuerySelectorAllCommandResponse> QuerySelectorAll(QuerySelectorAllCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command QuerySelectorAllCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<QuerySelectorAllCommandResponse>

Redo(RedoCommandSettings?, CancellationToken, int?, bool)

Re-does the last undone action.

public Task<RedoCommandResponse?> Redo(RedoCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RedoCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RedoCommandResponse>

RemoveAttribute(RemoveAttributeCommandSettings, CancellationToken, int?, bool)

Removes attribute with given name from an element with given id.

public Task<RemoveAttributeCommandResponse?> RemoveAttribute(RemoveAttributeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RemoveAttributeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RemoveAttributeCommandResponse>

RemoveNode(RemoveNodeCommandSettings, CancellationToken, int?, bool)

Removes node with given id.

public Task<RemoveNodeCommandResponse?> RemoveNode(RemoveNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RemoveNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RemoveNodeCommandResponse>

RequestChildNodes(RequestChildNodesCommandSettings, CancellationToken, int?, bool)

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.

public Task<RequestChildNodesCommandResponse?> RequestChildNodes(RequestChildNodesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RequestChildNodesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RequestChildNodesCommandResponse>

RequestNode(RequestNodeCommandSettings, CancellationToken, int?, bool)

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.

public Task<RequestNodeCommandResponse> RequestNode(RequestNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RequestNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RequestNodeCommandResponse>

ResolveNode(ResolveNodeCommandSettings, CancellationToken, int?, bool)

Resolves the JavaScript node object for a given NodeId or BackendNodeId.

public Task<ResolveNodeCommandResponse> ResolveNode(ResolveNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ResolveNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ResolveNodeCommandResponse>

ScrollIntoViewIfNeeded(ScrollIntoViewIfNeededCommandSettings, CancellationToken, int?, bool)

Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node.

public Task<ScrollIntoViewIfNeededCommandResponse?> ScrollIntoViewIfNeeded(ScrollIntoViewIfNeededCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ScrollIntoViewIfNeededCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ScrollIntoViewIfNeededCommandResponse>

SetAttributeValue(SetAttributeValueCommandSettings, CancellationToken, int?, bool)

Sets attribute for an element with given id.

public Task<SetAttributeValueCommandResponse?> SetAttributeValue(SetAttributeValueCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetAttributeValueCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetAttributeValueCommandResponse>

SetAttributesAsText(SetAttributesAsTextCommandSettings, CancellationToken, int?, bool)

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.

public Task<SetAttributesAsTextCommandResponse?> SetAttributesAsText(SetAttributesAsTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetAttributesAsTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetAttributesAsTextCommandResponse>

SetFileInputFiles(SetFileInputFilesCommandSettings, CancellationToken, int?, bool)

Sets files for the given file input element.

public Task<SetFileInputFilesCommandResponse?> SetFileInputFiles(SetFileInputFilesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetFileInputFilesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetFileInputFilesCommandResponse>

SetInspectedNode(SetInspectedNodeCommandSettings, CancellationToken, int?, bool)

Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

public Task<SetInspectedNodeCommandResponse?> SetInspectedNode(SetInspectedNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetInspectedNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetInspectedNodeCommandResponse>

SetNodeName(SetNodeNameCommandSettings, CancellationToken, int?, bool)

Sets node name for a node with given id.

public Task<SetNodeNameCommandResponse> SetNodeName(SetNodeNameCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetNodeNameCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetNodeNameCommandResponse>

SetNodeStackTracesEnabled(SetNodeStackTracesEnabledCommandSettings, CancellationToken, int?, bool)

Sets if stack traces should be captured for Nodes. See Node.getNodeStackTraces. Default is disabled.

public Task<SetNodeStackTracesEnabledCommandResponse?> SetNodeStackTracesEnabled(SetNodeStackTracesEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetNodeStackTracesEnabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetNodeStackTracesEnabledCommandResponse>

SetNodeValue(SetNodeValueCommandSettings, CancellationToken, int?, bool)

Sets node value for a node with given id.

public Task<SetNodeValueCommandResponse?> SetNodeValue(SetNodeValueCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetNodeValueCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetNodeValueCommandResponse>

SetOuterHTML(SetOuterHTMLCommandSettings, CancellationToken, int?, bool)

Sets node HTML markup, returns new node id.

public Task<SetOuterHTMLCommandResponse?> SetOuterHTML(SetOuterHTMLCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetOuterHTMLCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetOuterHTMLCommandResponse>

Undo(UndoCommandSettings?, CancellationToken, int?, bool)

Undoes the last performed action.

public Task<UndoCommandResponse?> Undo(UndoCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command UndoCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<UndoCommandResponse>

Events

AdRelatedStateUpdated

Fired when a node's ad related state changes.

public event EventHandler<AdRelatedStateUpdatedEventArgs>? AdRelatedStateUpdated

Event Type

EventHandler<AdRelatedStateUpdatedEventArgs>

AdoptedStyleSheetsModified

Fired when Element's adoptedStyleSheets are modified.

public event EventHandler<AdoptedStyleSheetsModifiedEventArgs>? AdoptedStyleSheetsModified

Event Type

EventHandler<AdoptedStyleSheetsModifiedEventArgs>

AffectedByStartingStylesFlagUpdated

Fired when a node's starting styles changes.

public event EventHandler<AffectedByStartingStylesFlagUpdatedEventArgs>? AffectedByStartingStylesFlagUpdated

Event Type

EventHandler<AffectedByStartingStylesFlagUpdatedEventArgs>

AttributeModified

Fired when Element's attribute is modified.

public event EventHandler<AttributeModifiedEventArgs>? AttributeModified

Event Type

EventHandler<AttributeModifiedEventArgs>

AttributeRemoved

Fired when Element's attribute is removed.

public event EventHandler<AttributeRemovedEventArgs>? AttributeRemoved

Event Type

EventHandler<AttributeRemovedEventArgs>

CharacterDataModified

Mirrors DOMCharacterDataModified event.

public event EventHandler<CharacterDataModifiedEventArgs>? CharacterDataModified

Event Type

EventHandler<CharacterDataModifiedEventArgs>

ChildNodeCountUpdated

Fired when Container's child node count has changed.

public event EventHandler<ChildNodeCountUpdatedEventArgs>? ChildNodeCountUpdated

Event Type

EventHandler<ChildNodeCountUpdatedEventArgs>

ChildNodeInserted

Mirrors DOMNodeInserted event.

public event EventHandler<ChildNodeInsertedEventArgs>? ChildNodeInserted

Event Type

EventHandler<ChildNodeInsertedEventArgs>

ChildNodeRemoved

Mirrors DOMNodeRemoved event.

public event EventHandler<ChildNodeRemovedEventArgs>? ChildNodeRemoved

Event Type

EventHandler<ChildNodeRemovedEventArgs>

DistributedNodesUpdated

Called when distribution is changed.

public event EventHandler<DistributedNodesUpdatedEventArgs>? DistributedNodesUpdated

Event Type

EventHandler<DistributedNodesUpdatedEventArgs>

DocumentUpdated

Fired when Document has been totally updated. Node ids are no longer valid.

public event EventHandler<DocumentUpdatedEventArgs>? DocumentUpdated

Event Type

EventHandler<DocumentUpdatedEventArgs>

InlineStyleInvalidated

Fired when Element's inline style is modified via a CSS property modification.

public event EventHandler<InlineStyleInvalidatedEventArgs>? InlineStyleInvalidated

Event Type

EventHandler<InlineStyleInvalidatedEventArgs>

PseudoElementAdded

Called when a pseudo element is added to an element.

public event EventHandler<PseudoElementAddedEventArgs>? PseudoElementAdded

Event Type

EventHandler<PseudoElementAddedEventArgs>

PseudoElementRemoved

Called when a pseudo element is removed from an element.

public event EventHandler<PseudoElementRemovedEventArgs>? PseudoElementRemoved

Event Type

EventHandler<PseudoElementRemovedEventArgs>

ScrollableFlagUpdated

Fired when a node's scrollability state changes.

public event EventHandler<ScrollableFlagUpdatedEventArgs>? ScrollableFlagUpdated

Event Type

EventHandler<ScrollableFlagUpdatedEventArgs>

SetChildNodes

Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

public event EventHandler<SetChildNodesEventArgs>? SetChildNodes

Event Type

EventHandler<SetChildNodesEventArgs>

ShadowRootPopped

Called when shadow root is popped from the element.

public event EventHandler<ShadowRootPoppedEventArgs>? ShadowRootPopped

Event Type

EventHandler<ShadowRootPoppedEventArgs>

ShadowRootPushed

Called when shadow root is pushed into the element.

public event EventHandler<ShadowRootPushedEventArgs>? ShadowRootPushed

Event Type

EventHandler<ShadowRootPushedEventArgs>

TopLayerElementsUpdated

Called when top layer elements are changed.

public event EventHandler<TopLayerElementsUpdatedEventArgs>? TopLayerElementsUpdated

Event Type

EventHandler<TopLayerElementsUpdatedEventArgs>