Class Overlay
- java.lang.Object
-
- org.openqa.selenium.devtools.v112.overlay.Overlay
-
@Beta public class Overlay extends java.lang.Object
This domain provides various functionality related to drawing atop the inspected page.
-
-
Constructor Summary
Constructors Constructor Description Overlay()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.openqa.selenium.devtools.Command<java.lang.Void>
disable()
Disables domain notifications.static org.openqa.selenium.devtools.Command<java.lang.Void>
enable()
Enables domain notifications.static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>>
getGridHighlightObjectsForTest(java.util.List<NodeId> nodeIds)
For Persistent Grid testing.static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>>
getHighlightObjectForTest(NodeId nodeId, java.util.Optional<java.lang.Boolean> includeDistance, java.util.Optional<java.lang.Boolean> includeStyle, java.util.Optional<ColorFormat> colorFormat, java.util.Optional<java.lang.Boolean> showAccessibilityInfo)
For testing.static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>>
getSourceOrderHighlightObjectForTest(NodeId nodeId)
For Source Order Viewer testing.static org.openqa.selenium.devtools.Command<java.lang.Void>
hideHighlight()
Hides any highlight.static org.openqa.selenium.devtools.Command<java.lang.Void>
highlightFrame(FrameId frameId, java.util.Optional<RGBA> contentColor, java.util.Optional<RGBA> contentOutlineColor)
Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>
highlightNode(HighlightConfig highlightConfig, java.util.Optional<NodeId> nodeId, java.util.Optional<BackendNodeId> backendNodeId, java.util.Optional<RemoteObjectId> objectId, java.util.Optional<java.lang.String> selector)
Highlights DOM node with given id or with the given JavaScript object wrapper.static org.openqa.selenium.devtools.Command<java.lang.Void>
highlightQuad(Quad quad, java.util.Optional<RGBA> color, java.util.Optional<RGBA> outlineColor)
Highlights given quad.static org.openqa.selenium.devtools.Command<java.lang.Void>
highlightRect(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height, java.util.Optional<RGBA> color, java.util.Optional<RGBA> outlineColor)
Highlights given rectangle.static org.openqa.selenium.devtools.Command<java.lang.Void>
highlightSourceOrder(SourceOrderConfig sourceOrderConfig, java.util.Optional<NodeId> nodeId, java.util.Optional<BackendNodeId> backendNodeId, java.util.Optional<RemoteObjectId> objectId)
Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper.static org.openqa.selenium.devtools.Event<java.lang.Void>
inspectModeCanceled()
static org.openqa.selenium.devtools.Event<BackendNodeId>
inspectNodeRequested()
static org.openqa.selenium.devtools.Event<NodeId>
nodeHighlightRequested()
static org.openqa.selenium.devtools.Event<Viewport>
screenshotRequested()
static org.openqa.selenium.devtools.Command<java.lang.Void>
setInspectMode(InspectMode mode, java.util.Optional<HighlightConfig> highlightConfig)
Enters the 'inspect' mode.static org.openqa.selenium.devtools.Command<java.lang.Void>
setPausedInDebuggerMessage(java.util.Optional<java.lang.String> message)
static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowAdHighlights(java.lang.Boolean show)
Highlights owner element of all frames detected to be ads.static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowContainerQueryOverlays(java.util.List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs)
static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowDebugBorders(java.lang.Boolean show)
Requests that backend shows debug borders on layersstatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowFlexOverlays(java.util.List<FlexNodeHighlightConfig> flexNodeHighlightConfigs)
static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowFPSCounter(java.lang.Boolean show)
Requests that backend shows the FPS counterstatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowGridOverlays(java.util.List<GridNodeHighlightConfig> gridNodeHighlightConfigs)
Highlight multiple elements with the CSS Grid overlay.static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowHinge(java.util.Optional<HingeConfig> hingeConfig)
Add a dual screen device hingestatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowHitTestBorders(java.lang.Boolean show)
Deprecated.static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowIsolatedElements(java.util.List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs)
Show elements in isolation mode with overlays.static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowLayoutShiftRegions(java.lang.Boolean result)
Requests that backend shows layout shift regionsstatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowPaintRects(java.lang.Boolean result)
Requests that backend shows paint rectanglesstatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowScrollBottleneckRects(java.lang.Boolean show)
Requests that backend shows scroll bottleneck rectsstatic org.openqa.selenium.devtools.Command<java.lang.Void>
setShowScrollSnapOverlays(java.util.List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs)
static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowViewportSizeOnResize(java.lang.Boolean show)
Paints viewport size upon main frame resize.static org.openqa.selenium.devtools.Command<java.lang.Void>
setShowWebVitals(java.lang.Boolean show)
Request that backend shows an overlay with web vital metrics.
-
-
-
Method Detail
-
disable
public static org.openqa.selenium.devtools.Command<java.lang.Void> disable()
Disables domain notifications.
-
enable
public static org.openqa.selenium.devtools.Command<java.lang.Void> enable()
Enables domain notifications.
-
getHighlightObjectForTest
public static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>> getHighlightObjectForTest(NodeId nodeId, java.util.Optional<java.lang.Boolean> includeDistance, java.util.Optional<java.lang.Boolean> includeStyle, java.util.Optional<ColorFormat> colorFormat, java.util.Optional<java.lang.Boolean> showAccessibilityInfo)
For testing.
-
getGridHighlightObjectsForTest
public static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>> getGridHighlightObjectsForTest(java.util.List<NodeId> nodeIds)
For Persistent Grid testing.
-
getSourceOrderHighlightObjectForTest
public static org.openqa.selenium.devtools.Command<java.util.Map<java.lang.String,java.lang.Object>> getSourceOrderHighlightObjectForTest(NodeId nodeId)
For Source Order Viewer testing.
-
hideHighlight
public static org.openqa.selenium.devtools.Command<java.lang.Void> hideHighlight()
Hides any highlight.
-
highlightFrame
@Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightFrame(FrameId frameId, java.util.Optional<RGBA> contentColor, java.util.Optional<RGBA> contentOutlineColor)
Deprecated.Highlights owner element of the frame with given id. Deprecated: Doesn't work reliablity and cannot be fixed due to process separatation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.
-
highlightNode
public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightNode(HighlightConfig highlightConfig, java.util.Optional<NodeId> nodeId, java.util.Optional<BackendNodeId> backendNodeId, java.util.Optional<RemoteObjectId> objectId, java.util.Optional<java.lang.String> selector)
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
-
highlightQuad
public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightQuad(Quad quad, java.util.Optional<RGBA> color, java.util.Optional<RGBA> outlineColor)
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
-
highlightRect
public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightRect(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height, java.util.Optional<RGBA> color, java.util.Optional<RGBA> outlineColor)
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
-
highlightSourceOrder
public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightSourceOrder(SourceOrderConfig sourceOrderConfig, java.util.Optional<NodeId> nodeId, java.util.Optional<BackendNodeId> backendNodeId, java.util.Optional<RemoteObjectId> objectId)
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.
-
setInspectMode
public static org.openqa.selenium.devtools.Command<java.lang.Void> setInspectMode(InspectMode mode, java.util.Optional<HighlightConfig> highlightConfig)
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
-
setShowAdHighlights
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowAdHighlights(java.lang.Boolean show)
Highlights owner element of all frames detected to be ads.
-
setPausedInDebuggerMessage
public static org.openqa.selenium.devtools.Command<java.lang.Void> setPausedInDebuggerMessage(java.util.Optional<java.lang.String> message)
-
setShowDebugBorders
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowDebugBorders(java.lang.Boolean show)
Requests that backend shows debug borders on layers
-
setShowFPSCounter
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowFPSCounter(java.lang.Boolean show)
Requests that backend shows the FPS counter
-
setShowGridOverlays
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowGridOverlays(java.util.List<GridNodeHighlightConfig> gridNodeHighlightConfigs)
Highlight multiple elements with the CSS Grid overlay.
-
setShowFlexOverlays
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowFlexOverlays(java.util.List<FlexNodeHighlightConfig> flexNodeHighlightConfigs)
-
setShowScrollSnapOverlays
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowScrollSnapOverlays(java.util.List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs)
-
setShowContainerQueryOverlays
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowContainerQueryOverlays(java.util.List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs)
-
setShowPaintRects
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowPaintRects(java.lang.Boolean result)
Requests that backend shows paint rectangles
-
setShowLayoutShiftRegions
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowLayoutShiftRegions(java.lang.Boolean result)
Requests that backend shows layout shift regions
-
setShowScrollBottleneckRects
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowScrollBottleneckRects(java.lang.Boolean show)
Requests that backend shows scroll bottleneck rects
-
setShowHitTestBorders
@Deprecated public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowHitTestBorders(java.lang.Boolean show)
Deprecated.Deprecated, no longer has any effect.
-
setShowWebVitals
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowWebVitals(java.lang.Boolean show)
Request that backend shows an overlay with web vital metrics.
-
setShowViewportSizeOnResize
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowViewportSizeOnResize(java.lang.Boolean show)
Paints viewport size upon main frame resize.
-
setShowHinge
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowHinge(java.util.Optional<HingeConfig> hingeConfig)
Add a dual screen device hinge
-
setShowIsolatedElements
public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowIsolatedElements(java.util.List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs)
Show elements in isolation mode with overlays.
-
inspectNodeRequested
public static org.openqa.selenium.devtools.Event<BackendNodeId> inspectNodeRequested()
-
nodeHighlightRequested
public static org.openqa.selenium.devtools.Event<NodeId> nodeHighlightRequested()
-
screenshotRequested
public static org.openqa.selenium.devtools.Event<Viewport> screenshotRequested()
-
inspectModeCanceled
public static org.openqa.selenium.devtools.Event<java.lang.Void> inspectModeCanceled()
-
-