# frozen_string_literal: true # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # This file is automatically generated. Any changes will be lost! module Selenium module DevTools module V105 class Debugger EVENTS = { breakpoint_resolved: 'breakpointResolved', paused: 'paused', resumed: 'resumed', script_failed_to_parse: 'scriptFailedToParse', script_parsed: 'scriptParsed', }.freeze def initialize(devtools) @devtools = devtools end def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Debugger.#{event}"] << block end def continue_to_location(location:, target_call_frames: nil) @devtools.send_cmd('Debugger.continueToLocation', location: location, targetCallFrames: target_call_frames) end def disable @devtools.send_cmd('Debugger.disable') end def enable(max_scripts_cache_size: nil) @devtools.send_cmd('Debugger.enable', maxScriptsCacheSize: max_scripts_cache_size) end def evaluate_on_call_frame(call_frame_id:, expression:, object_group: nil, include_command_line_api: nil, silent: nil, return_by_value: nil, generate_preview: nil, throw_on_side_effect: nil, timeout: nil) @devtools.send_cmd('Debugger.evaluateOnCallFrame', callFrameId: call_frame_id, expression: expression, objectGroup: object_group, includeCommandLineAPI: include_command_line_api, silent: silent, returnByValue: return_by_value, generatePreview: generate_preview, throwOnSideEffect: throw_on_side_effect, timeout: timeout) end def get_possible_breakpoints(start:, _end: nil, restrict_to_function: nil) @devtools.send_cmd('Debugger.getPossibleBreakpoints', start: start, end: _end, restrictToFunction: restrict_to_function) end def get_script_source(script_id:) @devtools.send_cmd('Debugger.getScriptSource', scriptId: script_id) end def disassemble_wasm_module(script_id:) @devtools.send_cmd('Debugger.disassembleWasmModule', scriptId: script_id) end def next_wasm_disassembly_chunk(stream_id:) @devtools.send_cmd('Debugger.nextWasmDisassemblyChunk', streamId: stream_id) end def get_wasm_bytecode(script_id:) @devtools.send_cmd('Debugger.getWasmBytecode', scriptId: script_id) end def get_stack_trace(stack_trace_id:) @devtools.send_cmd('Debugger.getStackTrace', stackTraceId: stack_trace_id) end def pause @devtools.send_cmd('Debugger.pause') end def pause_on_async_call(parent_stack_trace_id:) @devtools.send_cmd('Debugger.pauseOnAsyncCall', parentStackTraceId: parent_stack_trace_id) end def remove_breakpoint(breakpoint_id:) @devtools.send_cmd('Debugger.removeBreakpoint', breakpointId: breakpoint_id) end def restart_frame(call_frame_id:, mode: nil) @devtools.send_cmd('Debugger.restartFrame', callFrameId: call_frame_id, mode: mode) end def resume(terminate_on_resume: nil) @devtools.send_cmd('Debugger.resume', terminateOnResume: terminate_on_resume) end def search_in_content(script_id:, query:, case_sensitive: nil, is_regex: nil) @devtools.send_cmd('Debugger.searchInContent', scriptId: script_id, query: query, caseSensitive: case_sensitive, isRegex: is_regex) end def set_async_call_stack_depth(max_depth:) @devtools.send_cmd('Debugger.setAsyncCallStackDepth', maxDepth: max_depth) end def set_blackbox_patterns(patterns:) @devtools.send_cmd('Debugger.setBlackboxPatterns', patterns: patterns) end def set_blackboxed_ranges(script_id:, positions:) @devtools.send_cmd('Debugger.setBlackboxedRanges', scriptId: script_id, positions: positions) end def set_breakpoint(location:, condition: nil) @devtools.send_cmd('Debugger.setBreakpoint', location: location, condition: condition) end def set_instrumentation_breakpoint(instrumentation:) @devtools.send_cmd('Debugger.setInstrumentationBreakpoint', instrumentation: instrumentation) end def set_breakpoint_by_url(line_number:, url: nil, url_regex: nil, script_hash: nil, column_number: nil, condition: nil) @devtools.send_cmd('Debugger.setBreakpointByUrl', lineNumber: line_number, url: url, urlRegex: url_regex, scriptHash: script_hash, columnNumber: column_number, condition: condition) end def set_breakpoint_on_function_call(object_id:, condition: nil) @devtools.send_cmd('Debugger.setBreakpointOnFunctionCall', objectId: object_id, condition: condition) end def set_breakpoints_active(active:) @devtools.send_cmd('Debugger.setBreakpointsActive', active: active) end def set_pause_on_exceptions(state:) @devtools.send_cmd('Debugger.setPauseOnExceptions', state: state) end def set_return_value(new_value:) @devtools.send_cmd('Debugger.setReturnValue', newValue: new_value) end def set_script_source(script_id:, script_source:, dry_run: nil, allow_top_frame_editing: nil) @devtools.send_cmd('Debugger.setScriptSource', scriptId: script_id, scriptSource: script_source, dryRun: dry_run, allowTopFrameEditing: allow_top_frame_editing) end def set_skip_all_pauses(skip:) @devtools.send_cmd('Debugger.setSkipAllPauses', skip: skip) end def set_variable_value(scope_number:, variable_name:, new_value:, call_frame_id:) @devtools.send_cmd('Debugger.setVariableValue', scopeNumber: scope_number, variableName: variable_name, newValue: new_value, callFrameId: call_frame_id) end def step_into(break_on_async_call: nil, skip_list: nil) @devtools.send_cmd('Debugger.stepInto', breakOnAsyncCall: break_on_async_call, skipList: skip_list) end def step_out @devtools.send_cmd('Debugger.stepOut') end def step_over(skip_list: nil) @devtools.send_cmd('Debugger.stepOver', skipList: skip_list) end end # Debugger end # V105 end # DevTools end # Selenium