Class OverlayAdapter
Represents an adapter for the Overlay domain to simplify the command interface.
public class OverlayAdapter
- Inheritance
-
OverlayAdapter
- Inherited Members
Constructors
OverlayAdapter(IDevToolsSession)
Initializes a new instance of the OverlayAdapter class.
public OverlayAdapter(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
Disable(DisableCommandSettings?, CancellationToken, int?, bool)
Disables domain notifications.
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 domain notifications.
public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetGridHighlightObjectsForTest(GetGridHighlightObjectsForTestCommandSettings, CancellationToken, int?, bool)
For Persistent Grid testing.
public Task<GetGridHighlightObjectsForTestCommandResponse> GetGridHighlightObjectsForTest(GetGridHighlightObjectsForTestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetGridHighlightObjectsForTestCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetHighlightObjectForTest(GetHighlightObjectForTestCommandSettings, CancellationToken, int?, bool)
For testing.
public Task<GetHighlightObjectForTestCommandResponse> GetHighlightObjectForTest(GetHighlightObjectForTestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetHighlightObjectForTestCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetSourceOrderHighlightObjectForTest(GetSourceOrderHighlightObjectForTestCommandSettings, CancellationToken, int?, bool)
For Source Order Viewer testing.
public Task<GetSourceOrderHighlightObjectForTestCommandResponse> GetSourceOrderHighlightObjectForTest(GetSourceOrderHighlightObjectForTestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetSourceOrderHighlightObjectForTestCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
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
commandHideHighlightCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
HighlightFrame(HighlightFrameCommandSettings, CancellationToken, int?, bool)
Highlights owner element of the frame with given id. Deprecated: Doesn't work reliably and cannot be fixed due to process separation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.
public Task<HighlightFrameCommandResponse?> HighlightFrame(HighlightFrameCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandHighlightFrameCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
HighlightNode(HighlightNodeCommandSettings, CancellationToken, int?, bool)
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
public Task<HighlightNodeCommandResponse?> HighlightNode(HighlightNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandHighlightNodeCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
HighlightQuad(HighlightQuadCommandSettings, CancellationToken, int?, bool)
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
public Task<HighlightQuadCommandResponse?> HighlightQuad(HighlightQuadCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandHighlightQuadCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
HighlightRect(HighlightRectCommandSettings, CancellationToken, int?, bool)
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. Issue: the method does not handle device pixel ratio (DPR) correctly. The coordinates currently have to be adjusted by the client if DPR is not 1 (see crbug.com/437807128).
public Task<HighlightRectCommandResponse?> HighlightRect(HighlightRectCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandHighlightRectCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
HighlightSourceOrder(HighlightSourceOrderCommandSettings, CancellationToken, int?, bool)
Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
public Task<HighlightSourceOrderCommandResponse?> HighlightSourceOrder(HighlightSourceOrderCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandHighlightSourceOrderCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetInspectMode(SetInspectModeCommandSettings, CancellationToken, int?, bool)
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
public Task<SetInspectModeCommandResponse?> SetInspectMode(SetInspectModeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetInspectModeCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetPausedInDebuggerMessage(SetPausedInDebuggerMessageCommandSettings, CancellationToken, int?, bool)
setPausedInDebuggerMessage
public Task<SetPausedInDebuggerMessageCommandResponse?> SetPausedInDebuggerMessage(SetPausedInDebuggerMessageCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetPausedInDebuggerMessageCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowAdHighlights(SetShowAdHighlightsCommandSettings, CancellationToken, int?, bool)
Highlights owner element of all frames detected to be ads.
public Task<SetShowAdHighlightsCommandResponse?> SetShowAdHighlights(SetShowAdHighlightsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowAdHighlightsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowContainerQueryOverlays(SetShowContainerQueryOverlaysCommandSettings, CancellationToken, int?, bool)
setShowContainerQueryOverlays
public Task<SetShowContainerQueryOverlaysCommandResponse?> SetShowContainerQueryOverlays(SetShowContainerQueryOverlaysCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowContainerQueryOverlaysCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowDebugBorders(SetShowDebugBordersCommandSettings, CancellationToken, int?, bool)
Requests that backend shows debug borders on layers
public Task<SetShowDebugBordersCommandResponse?> SetShowDebugBorders(SetShowDebugBordersCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowDebugBordersCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowFPSCounter(SetShowFPSCounterCommandSettings, CancellationToken, int?, bool)
Requests that backend shows the FPS counter
public Task<SetShowFPSCounterCommandResponse?> SetShowFPSCounter(SetShowFPSCounterCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowFPSCounterCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowFlexOverlays(SetShowFlexOverlaysCommandSettings, CancellationToken, int?, bool)
setShowFlexOverlays
public Task<SetShowFlexOverlaysCommandResponse?> SetShowFlexOverlays(SetShowFlexOverlaysCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowFlexOverlaysCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowGridOverlays(SetShowGridOverlaysCommandSettings, CancellationToken, int?, bool)
Highlight multiple elements with the CSS Grid overlay.
public Task<SetShowGridOverlaysCommandResponse?> SetShowGridOverlays(SetShowGridOverlaysCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowGridOverlaysCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowHinge(SetShowHingeCommandSettings, CancellationToken, int?, bool)
Add a dual screen device hinge
public Task<SetShowHingeCommandResponse?> SetShowHinge(SetShowHingeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowHingeCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowHitTestBorders(SetShowHitTestBordersCommandSettings, CancellationToken, int?, bool)
Deprecated, no longer has any effect.
public Task<SetShowHitTestBordersCommandResponse?> SetShowHitTestBorders(SetShowHitTestBordersCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowHitTestBordersCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowInspectedElementAnchor(SetShowInspectedElementAnchorCommandSettings, CancellationToken, int?, bool)
setShowInspectedElementAnchor
public Task<SetShowInspectedElementAnchorCommandResponse?> SetShowInspectedElementAnchor(SetShowInspectedElementAnchorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowInspectedElementAnchorCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowIsolatedElements(SetShowIsolatedElementsCommandSettings, CancellationToken, int?, bool)
Show elements in isolation mode with overlays.
public Task<SetShowIsolatedElementsCommandResponse?> SetShowIsolatedElements(SetShowIsolatedElementsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowIsolatedElementsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowLayoutShiftRegions(SetShowLayoutShiftRegionsCommandSettings, CancellationToken, int?, bool)
Requests that backend shows layout shift regions
public Task<SetShowLayoutShiftRegionsCommandResponse?> SetShowLayoutShiftRegions(SetShowLayoutShiftRegionsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowLayoutShiftRegionsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowPaintRects(SetShowPaintRectsCommandSettings, CancellationToken, int?, bool)
Requests that backend shows paint rectangles
public Task<SetShowPaintRectsCommandResponse?> SetShowPaintRects(SetShowPaintRectsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowPaintRectsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowScrollBottleneckRects(SetShowScrollBottleneckRectsCommandSettings, CancellationToken, int?, bool)
Requests that backend shows scroll bottleneck rects
public Task<SetShowScrollBottleneckRectsCommandResponse?> SetShowScrollBottleneckRects(SetShowScrollBottleneckRectsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowScrollBottleneckRectsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowScrollSnapOverlays(SetShowScrollSnapOverlaysCommandSettings, CancellationToken, int?, bool)
setShowScrollSnapOverlays
public Task<SetShowScrollSnapOverlaysCommandResponse?> SetShowScrollSnapOverlays(SetShowScrollSnapOverlaysCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowScrollSnapOverlaysCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowViewportSizeOnResize(SetShowViewportSizeOnResizeCommandSettings, CancellationToken, int?, bool)
Paints viewport size upon main frame resize.
public Task<SetShowViewportSizeOnResizeCommandResponse?> SetShowViewportSizeOnResize(SetShowViewportSizeOnResizeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowViewportSizeOnResizeCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowWebVitals(SetShowWebVitalsCommandSettings, CancellationToken, int?, bool)
Deprecated, no longer has any effect.
public Task<SetShowWebVitalsCommandResponse?> SetShowWebVitals(SetShowWebVitalsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowWebVitalsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetShowWindowControlsOverlay(SetShowWindowControlsOverlayCommandSettings, CancellationToken, int?, bool)
Show Window Controls Overlay for PWA
public Task<SetShowWindowControlsOverlayCommandResponse?> SetShowWindowControlsOverlay(SetShowWindowControlsOverlayCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetShowWindowControlsOverlayCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
InspectModeCanceled
Fired when user cancels the inspect mode.
public event EventHandler<InspectModeCanceledEventArgs>? InspectModeCanceled
Event Type
InspectNodeRequested
Fired when the node should be inspected. This happens after call to setInspectMode or when
user manually inspects an element.
public event EventHandler<InspectNodeRequestedEventArgs>? InspectNodeRequested
Event Type
InspectPanelShowRequested
Fired when user asks to show the Inspect panel.
public event EventHandler<InspectPanelShowRequestedEventArgs>? InspectPanelShowRequested
Event Type
InspectedElementWindowRestored
Fired when user asks to restore the Inspected Element floating window.
public event EventHandler<InspectedElementWindowRestoredEventArgs>? InspectedElementWindowRestored
Event Type
NodeHighlightRequested
Fired when the node should be highlighted. This happens after call to setInspectMode.
public event EventHandler<NodeHighlightRequestedEventArgs>? NodeHighlightRequested
Event Type
ScreenshotRequested
Fired when user asks to capture screenshot of some area on the page.
public event EventHandler<ScreenshotRequestedEventArgs>? ScreenshotRequested