Class DOMSnapshotAdapter
- Namespace
- OpenQA.Selenium.DevTools.V148.DOMSnapshot
- Assembly
- Selenium.WebDriver.dll
Represents an adapter for the DOMSnapshot domain to simplify the command interface.
public class DOMSnapshotAdapter
- Inheritance
-
DOMSnapshotAdapter
- Inherited Members
Constructors
DOMSnapshotAdapter(IDevToolsSession)
Initializes a new instance of the DOMSnapshotAdapter class.
public DOMSnapshotAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
CaptureSnapshot(CaptureSnapshotCommandSettings, CancellationToken, int?, bool)
Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
public Task<CaptureSnapshotCommandResponse> CaptureSnapshot(CaptureSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandCaptureSnapshotCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Disable(DisableCommandSettings?, CancellationToken, int?, bool)
Disables DOM snapshot agent for the given page.
public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDisableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Enable(EnableCommandSettings?, CancellationToken, int?, bool)
Enables DOM snapshot agent for the given page.
public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetSnapshot(GetSnapshotCommandSettings, CancellationToken, int?, bool)
Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
public Task<GetSnapshotCommandResponse> GetSnapshot(GetSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetSnapshotCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool