class Selenium::DevTools::V102::Overlay
def disable
def disable @devtools.send_cmd('Overlay.disable') end
def enable
def enable @devtools.send_cmd('Overlay.enable') end
def get_grid_highlight_objects_for_test(node_ids:)
def get_grid_highlight_objects_for_test(node_ids:) @devtools.send_cmd('Overlay.getGridHighlightObjectsForTest', nodeIds: node_ids) end
def get_highlight_object_for_test(node_id:, include_distance: nil, include_style: nil, color_format: nil, show_accessibility_info: nil)
def get_highlight_object_for_test(node_id:, include_distance: nil, include_style: nil, color_format: nil, show_accessibility_info: nil) @devtools.send_cmd('Overlay.getHighlightObjectForTest', nodeId: node_id, includeDistance: include_distance, includeStyle: include_style, colorFormat: color_format, showAccessibilityInfo: show_accessibility_info) end
def get_source_order_highlight_object_for_test(node_id:)
def get_source_order_highlight_object_for_test(node_id:) @devtools.send_cmd('Overlay.getSourceOrderHighlightObjectForTest', nodeId: node_id) end
def hide_highlight
def hide_highlight @devtools.send_cmd('Overlay.hideHighlight') end
def highlight_frame(frame_id:, content_color: nil, content_outline_color: nil)
def highlight_frame(frame_id:, content_color: nil, content_outline_color: nil) @devtools.send_cmd('Overlay.highlightFrame', frameId: frame_id, contentColor: content_color, contentOutlineColor: content_outline_color) end
def highlight_node(highlight_config:, node_id: nil, backend_node_id: nil, object_id: nil, selector: nil)
def highlight_node(highlight_config:, node_id: nil, backend_node_id: nil, object_id: nil, selector: nil) @devtools.send_cmd('Overlay.highlightNode', highlightConfig: highlight_config, nodeId: node_id, backendNodeId: backend_node_id, objectId: object_id, selector: selector) end
def highlight_quad(quad:, color: nil, outline_color: nil)
def highlight_quad(quad:, color: nil, outline_color: nil) @devtools.send_cmd('Overlay.highlightQuad', quad: quad, color: color, outlineColor: outline_color) end
def highlight_rect(x:, y:, width:, height:, color: nil, outline_color: nil)
def highlight_rect(x:, y:, width:, height:, color: nil, outline_color: nil) @devtools.send_cmd('Overlay.highlightRect', x: x, y: y, width: width, height: height, color: color, outlineColor: outline_color) end
def highlight_source_order(source_order_config:, node_id: nil, backend_node_id: nil, object_id: nil)
def highlight_source_order(source_order_config:, node_id: nil, backend_node_id: nil, object_id: nil) @devtools.send_cmd('Overlay.highlightSourceOrder', sourceOrderConfig: source_order_config, nodeId: node_id, backendNodeId: backend_node_id, objectId: object_id) end
def initialize(devtools)
def initialize(devtools) @devtools = devtools end
def on(event, &block)
def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Overlay.#{event}"] << block end
def set_inspect_mode(mode:, highlight_config: nil)
def set_inspect_mode(mode:, highlight_config: nil) @devtools.send_cmd('Overlay.setInspectMode', mode: mode, highlightConfig: highlight_config) end
def set_paused_in_debugger_message(message: nil)
def set_paused_in_debugger_message(message: nil) @devtools.send_cmd('Overlay.setPausedInDebuggerMessage', message: message) end
def set_show_ad_highlights(show:)
def set_show_ad_highlights(show:) @devtools.send_cmd('Overlay.setShowAdHighlights', show: show) end
def set_show_container_query_overlays(container_query_highlight_configs:)
def set_show_container_query_overlays(container_query_highlight_configs:) @devtools.send_cmd('Overlay.setShowContainerQueryOverlays', containerQueryHighlightConfigs: container_query_highlight_configs) end
def set_show_debug_borders(show:)
def set_show_debug_borders(show:) @devtools.send_cmd('Overlay.setShowDebugBorders', show: show) end
def set_show_flex_overlays(flex_node_highlight_configs:)
def set_show_flex_overlays(flex_node_highlight_configs:) @devtools.send_cmd('Overlay.setShowFlexOverlays', flexNodeHighlightConfigs: flex_node_highlight_configs) end
def set_show_fps_counter(show:)
def set_show_fps_counter(show:) @devtools.send_cmd('Overlay.setShowFPSCounter', show: show) end
def set_show_grid_overlays(grid_node_highlight_configs:)
def set_show_grid_overlays(grid_node_highlight_configs:) @devtools.send_cmd('Overlay.setShowGridOverlays', gridNodeHighlightConfigs: grid_node_highlight_configs) end
def set_show_hinge(hinge_config: nil)
def set_show_hinge(hinge_config: nil) @devtools.send_cmd('Overlay.setShowHinge', hingeConfig: hinge_config) end
def set_show_hit_test_borders(show:)
def set_show_hit_test_borders(show:) @devtools.send_cmd('Overlay.setShowHitTestBorders', show: show) end
def set_show_isolated_elements(isolated_element_highlight_configs:)
def set_show_isolated_elements(isolated_element_highlight_configs:) @devtools.send_cmd('Overlay.setShowIsolatedElements', isolatedElementHighlightConfigs: isolated_element_highlight_configs) end
def set_show_layout_shift_regions(result:)
def set_show_layout_shift_regions(result:) @devtools.send_cmd('Overlay.setShowLayoutShiftRegions', result: result) end
def set_show_paint_rects(result:)
def set_show_paint_rects(result:) @devtools.send_cmd('Overlay.setShowPaintRects', result: result) end
def set_show_scroll_bottleneck_rects(show:)
def set_show_scroll_bottleneck_rects(show:) @devtools.send_cmd('Overlay.setShowScrollBottleneckRects', show: show) end
def set_show_scroll_snap_overlays(scroll_snap_highlight_configs:)
def set_show_scroll_snap_overlays(scroll_snap_highlight_configs:) @devtools.send_cmd('Overlay.setShowScrollSnapOverlays', scrollSnapHighlightConfigs: scroll_snap_highlight_configs) end
def set_show_viewport_size_on_resize(show:)
def set_show_viewport_size_on_resize(show:) @devtools.send_cmd('Overlay.setShowViewportSizeOnResize', show: show) end
def set_show_web_vitals(show:)
def set_show_web_vitals(show:) @devtools.send_cmd('Overlay.setShowWebVitals', show: show) end