java.lang.Object
org.openqa.selenium.devtools.v85.overlay.Overlay

@Beta public class Overlay extends Object
This domain provides various functionality related to drawing atop the inspected page.
  • Constructor Details

    • Overlay

      public Overlay()
  • Method Details

    • disable

      public static org.openqa.selenium.devtools.Command<Void> disable()
      Disables domain notifications.
    • enable

      public static org.openqa.selenium.devtools.Command<Void> 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.
    • hideHighlight

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

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

      public static org.openqa.selenium.devtools.Command<Void> setShowAdHighlights(Boolean show)
      Highlights owner element of all frames detected to be ads.
    • setPausedInDebuggerMessage

      public static org.openqa.selenium.devtools.Command<Void> setPausedInDebuggerMessage(Optional<String> message)
    • setShowDebugBorders

      public static org.openqa.selenium.devtools.Command<Void> setShowDebugBorders(Boolean show)
      Requests that backend shows debug borders on layers
    • setShowFPSCounter

      public static org.openqa.selenium.devtools.Command<Void> setShowFPSCounter(Boolean show)
      Requests that backend shows the FPS counter
    • setShowPaintRects

      public static org.openqa.selenium.devtools.Command<Void> setShowPaintRects(Boolean result)
      Requests that backend shows paint rectangles
    • setShowLayoutShiftRegions

      public static org.openqa.selenium.devtools.Command<Void> setShowLayoutShiftRegions(Boolean result)
      Requests that backend shows layout shift regions
    • setShowScrollBottleneckRects

      public static org.openqa.selenium.devtools.Command<Void> setShowScrollBottleneckRects(Boolean show)
      Requests that backend shows scroll bottleneck rects
    • setShowHitTestBorders

      public static org.openqa.selenium.devtools.Command<Void> setShowHitTestBorders(Boolean show)
      Requests that backend shows hit-test borders on layers
    • setShowViewportSizeOnResize

      public static org.openqa.selenium.devtools.Command<Void> setShowViewportSizeOnResize(Boolean show)
      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
    • 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<Void> inspectModeCanceled()