Class 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 
      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>> 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.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)
      Highlights owner element of the frame with given id.
      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.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> setShowDebugBorders​(java.lang.Boolean show)
      Requests that backend shows debug borders on layers
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowFPSCounter​(java.lang.Boolean show)
      Requests that backend shows the FPS counter
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowHinge​(java.util.Optional<HingeConfig> hingeConfig)
      Add a dual screen device hinge
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowHitTestBorders​(java.lang.Boolean show)
      Requests that backend shows hit-test borders on layers
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowLayoutShiftRegions​(java.lang.Boolean result)
      Requests that backend shows layout shift regions
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowPaintRects​(java.lang.Boolean result)
      Requests that backend shows paint rectangles
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowScrollBottleneckRects​(java.lang.Boolean show)
      Requests that backend shows scroll bottleneck rects
      static org.openqa.selenium.devtools.Command<java.lang.Void> setShowViewportSizeOnResize​(java.lang.Boolean show)
      Paints viewport size upon main frame resize.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Overlay

        public Overlay()
    • 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.
      • hideHighlight

        public static org.openqa.selenium.devtools.Command<java.lang.Void> hideHighlight()
        Hides any highlight.
      • highlightFrame

        public static org.openqa.selenium.devtools.Command<java.lang.Void> highlightFrame​(FrameId frameId,
                                                                                          java.util.Optional<RGBA> contentColor,
                                                                                          java.util.Optional<RGBA> contentOutlineColor)
        Highlights owner element of the frame with given id.
      • 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.
      • 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
      • 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

        public static org.openqa.selenium.devtools.Command<java.lang.Void> setShowHitTestBorders​(java.lang.Boolean show)
        Requests that backend shows hit-test borders on layers
      • 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
      • 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()