Class Overlay
java.lang.Object
org.openqa.selenium.devtools.v121.overlay.Overlay
This domain provides various functionality related to drawing atop the inspected page.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.devtools.Command<Void>
disable()
Disables domain notifications.static org.openqa.selenium.devtools.Command<Void>
enable()
Enables domain notifications.getGridHighlightObjectsForTest
(List<NodeId> nodeIds) For Persistent Grid testing.getHighlightObjectForTest
(NodeId nodeId, Optional<Boolean> includeDistance, Optional<Boolean> includeStyle, Optional<ColorFormat> colorFormat, Optional<Boolean> showAccessibilityInfo) For testing.For Source Order Viewer testing.static org.openqa.selenium.devtools.Command<Void>
Hides any highlight.static org.openqa.selenium.devtools.Command<Void>
Deprecated.static org.openqa.selenium.devtools.Command<Void>
highlightNode
(HighlightConfig highlightConfig, Optional<NodeId> nodeId, Optional<BackendNodeId> backendNodeId, Optional<RemoteObjectId> objectId, Optional<String> selector) Highlights DOM node with given id or with the given JavaScript object wrapper.static org.openqa.selenium.devtools.Command<Void>
Highlights given quad.static org.openqa.selenium.devtools.Command<Void>
highlightRect
(Integer x, Integer y, Integer width, Integer height, Optional<RGBA> color, Optional<RGBA> outlineColor) Highlights given rectangle.static org.openqa.selenium.devtools.Command<Void>
highlightSourceOrder
(SourceOrderConfig sourceOrderConfig, Optional<NodeId> nodeId, Optional<BackendNodeId> backendNodeId, 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<Void>
static org.openqa.selenium.devtools.Event<BackendNodeId>
static org.openqa.selenium.devtools.Event<NodeId>
static org.openqa.selenium.devtools.Event<Viewport>
static org.openqa.selenium.devtools.Command<Void>
setInspectMode
(InspectMode mode, Optional<HighlightConfig> highlightConfig) Enters the 'inspect' mode.static org.openqa.selenium.devtools.Command<Void>
setPausedInDebuggerMessage
(Optional<String> message) static org.openqa.selenium.devtools.Command<Void>
setShowAdHighlights
(Boolean show) Highlights owner element of all frames detected to be ads.static org.openqa.selenium.devtools.Command<Void>
setShowContainerQueryOverlays
(List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs) static org.openqa.selenium.devtools.Command<Void>
setShowDebugBorders
(Boolean show) Requests that backend shows debug borders on layersstatic org.openqa.selenium.devtools.Command<Void>
setShowFlexOverlays
(List<FlexNodeHighlightConfig> flexNodeHighlightConfigs) static org.openqa.selenium.devtools.Command<Void>
setShowFPSCounter
(Boolean show) Requests that backend shows the FPS counterstatic org.openqa.selenium.devtools.Command<Void>
setShowGridOverlays
(List<GridNodeHighlightConfig> gridNodeHighlightConfigs) Highlight multiple elements with the CSS Grid overlay.static org.openqa.selenium.devtools.Command<Void>
setShowHinge
(Optional<HingeConfig> hingeConfig) Add a dual screen device hingestatic org.openqa.selenium.devtools.Command<Void>
setShowHitTestBorders
(Boolean show) Deprecated.static org.openqa.selenium.devtools.Command<Void>
setShowIsolatedElements
(List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) Show elements in isolation mode with overlays.static org.openqa.selenium.devtools.Command<Void>
setShowLayoutShiftRegions
(Boolean result) Requests that backend shows layout shift regionsstatic org.openqa.selenium.devtools.Command<Void>
setShowPaintRects
(Boolean result) Requests that backend shows paint rectanglesstatic org.openqa.selenium.devtools.Command<Void>
Requests that backend shows scroll bottleneck rectsstatic org.openqa.selenium.devtools.Command<Void>
setShowScrollSnapOverlays
(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) static org.openqa.selenium.devtools.Command<Void>
Paints viewport size upon main frame resize.static org.openqa.selenium.devtools.Command<Void>
setShowWebVitals
(Boolean show) Request that backend shows an overlay with web vital metrics.static org.openqa.selenium.devtools.Command<Void>
setShowWindowControlsOverlay
(Optional<WindowControlsOverlayConfig> windowControlsOverlayConfig) Show Window Controls Overlay for PWA
-
Constructor Details
-
Overlay
public Overlay()
-
-
Method Details
-
disable
Disables domain notifications. -
enable
Enables domain notifications. -
getHighlightObjectForTest
public static org.openqa.selenium.devtools.Command<Map<String,Object>> getHighlightObjectForTest(NodeId nodeId, Optional<Boolean> includeDistance, Optional<Boolean> includeStyle, Optional<ColorFormat> colorFormat, Optional<Boolean> showAccessibilityInfo) For testing. -
getGridHighlightObjectsForTest
public static org.openqa.selenium.devtools.Command<Map<String,Object>> getGridHighlightObjectsForTest(List<NodeId> nodeIds) For Persistent Grid testing. -
getSourceOrderHighlightObjectForTest
public static org.openqa.selenium.devtools.Command<Map<String,Object>> getSourceOrderHighlightObjectForTest(NodeId nodeId) For Source Order Viewer testing. -
hideHighlight
Hides any highlight. -
highlightFrame
@Deprecated public static org.openqa.selenium.devtools.Command<Void> highlightFrame(FrameId frameId, Optional<RGBA> contentColor, 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<Void> highlightNode(HighlightConfig highlightConfig, Optional<NodeId> nodeId, Optional<BackendNodeId> backendNodeId, Optional<RemoteObjectId> objectId, Optional<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<Void> highlightQuad(Quad quad, Optional<RGBA> color, Optional<RGBA> outlineColor) Highlights given quad. Coordinates are absolute with respect to the main frame viewport. -
highlightRect
public static org.openqa.selenium.devtools.Command<Void> highlightRect(Integer x, Integer y, Integer width, Integer height, Optional<RGBA> color, Optional<RGBA> outlineColor) Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. -
highlightSourceOrder
public static org.openqa.selenium.devtools.Command<Void> highlightSourceOrder(SourceOrderConfig sourceOrderConfig, Optional<NodeId> nodeId, Optional<BackendNodeId> backendNodeId, 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<Void> setInspectMode(InspectMode mode, 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
Highlights owner element of all frames detected to be ads. -
setPausedInDebuggerMessage
-
setShowDebugBorders
Requests that backend shows debug borders on layers -
setShowFPSCounter
Requests that backend shows the FPS counter -
setShowGridOverlays
public static org.openqa.selenium.devtools.Command<Void> setShowGridOverlays(List<GridNodeHighlightConfig> gridNodeHighlightConfigs) Highlight multiple elements with the CSS Grid overlay. -
setShowFlexOverlays
public static org.openqa.selenium.devtools.Command<Void> setShowFlexOverlays(List<FlexNodeHighlightConfig> flexNodeHighlightConfigs) -
setShowScrollSnapOverlays
public static org.openqa.selenium.devtools.Command<Void> setShowScrollSnapOverlays(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) -
setShowContainerQueryOverlays
public static org.openqa.selenium.devtools.Command<Void> setShowContainerQueryOverlays(List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs) -
setShowPaintRects
Requests that backend shows paint rectangles -
setShowLayoutShiftRegions
Requests that backend shows layout shift regions -
setShowScrollBottleneckRects
Requests that backend shows scroll bottleneck rects -
setShowHitTestBorders
@Deprecated public static org.openqa.selenium.devtools.Command<Void> setShowHitTestBorders(Boolean show) Deprecated.Deprecated, no longer has any effect. -
setShowWebVitals
Request that backend shows an overlay with web vital metrics. -
setShowViewportSizeOnResize
Paints viewport size upon main frame resize. -
setShowHinge
public static org.openqa.selenium.devtools.Command<Void> setShowHinge(Optional<HingeConfig> hingeConfig) Add a dual screen device hinge -
setShowIsolatedElements
public static org.openqa.selenium.devtools.Command<Void> setShowIsolatedElements(List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) Show elements in isolation mode with overlays. -
setShowWindowControlsOverlay
public static org.openqa.selenium.devtools.Command<Void> setShowWindowControlsOverlay(Optional<WindowControlsOverlayConfig> windowControlsOverlayConfig) Show Window Controls Overlay for PWA -
inspectNodeRequested
-
nodeHighlightRequested
-
screenshotRequested
-
inspectModeCanceled
-