class Selenium::DevTools::V85::Runtime
Constants
- EVENTS
Public Class Methods
new(devtools)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 36 def initialize(devtools) @devtools = devtools end
Public Instance Methods
add_binding(name:, execution_context_id: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 176 def add_binding(name:, execution_context_id: nil) @devtools.send_cmd('Runtime.addBinding', name: name, executionContextId: execution_context_id) end
await_promise(promise_object_id:, return_by_value: nil, generate_preview: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 45 def await_promise(promise_object_id:, return_by_value: nil, generate_preview: nil) @devtools.send_cmd('Runtime.awaitPromise', promiseObjectId: promise_object_id, returnByValue: return_by_value, generatePreview: generate_preview) end
call_function_on(function_declaration:, object_id: nil, arguments: nil, silent: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, execution_context_id: nil, object_group: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 52 def call_function_on(function_declaration:, object_id: nil, arguments: nil, silent: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, execution_context_id: nil, object_group: nil) @devtools.send_cmd('Runtime.callFunctionOn', functionDeclaration: function_declaration, objectId: object_id, arguments: arguments, silent: silent, returnByValue: return_by_value, generatePreview: generate_preview, userGesture: user_gesture, awaitPromise: await_promise, executionContextId: execution_context_id, objectGroup: object_group) end
compile_script(expression:, source_url:, persist_script:, execution_context_id: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 66 def compile_script(expression:, source_url:, persist_script:, execution_context_id: nil) @devtools.send_cmd('Runtime.compileScript', expression: expression, sourceURL: source_url, persistScript: persist_script, executionContextId: execution_context_id) end
disable()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 74 def disable @devtools.send_cmd('Runtime.disable') end
discard_console_entries()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 78 def discard_console_entries @devtools.send_cmd('Runtime.discardConsoleEntries') end
enable()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 82 def enable @devtools.send_cmd('Runtime.enable') end
evaluate(expression:, object_group: nil, include_command_line_api: nil, silent: nil, context_id: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, throw_on_side_effect: nil, timeout: nil, disable_breaks: nil, repl_mode: nil, allow_unsafe_eval_blocked_by_csp: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 86 def evaluate(expression:, object_group: nil, include_command_line_api: nil, silent: nil, context_id: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, throw_on_side_effect: nil, timeout: nil, disable_breaks: nil, repl_mode: nil, allow_unsafe_eval_blocked_by_csp: nil) @devtools.send_cmd('Runtime.evaluate', expression: expression, objectGroup: object_group, includeCommandLineAPI: include_command_line_api, silent: silent, contextId: context_id, returnByValue: return_by_value, generatePreview: generate_preview, userGesture: user_gesture, awaitPromise: await_promise, throwOnSideEffect: throw_on_side_effect, timeout: timeout, disableBreaks: disable_breaks, replMode: repl_mode, allowUnsafeEvalBlockedByCSP: allow_unsafe_eval_blocked_by_csp) end
get_heap_usage()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 108 def get_heap_usage @devtools.send_cmd('Runtime.getHeapUsage') end
get_isolate_id()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 104 def get_isolate_id @devtools.send_cmd('Runtime.getIsolateId') end
get_properties(object_id:, own_properties: nil, accessor_properties_only: nil, generate_preview: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 112 def get_properties(object_id:, own_properties: nil, accessor_properties_only: nil, generate_preview: nil) @devtools.send_cmd('Runtime.getProperties', objectId: object_id, ownProperties: own_properties, accessorPropertiesOnly: accessor_properties_only, generatePreview: generate_preview) end
global_lexical_scope_names(execution_context_id: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 120 def global_lexical_scope_names(execution_context_id: nil) @devtools.send_cmd('Runtime.globalLexicalScopeNames', executionContextId: execution_context_id) end
on(event, &block)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 40 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Runtime.#{event}"] << block end
query_objects(prototype_object_id:, object_group: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 125 def query_objects(prototype_object_id:, object_group: nil) @devtools.send_cmd('Runtime.queryObjects', prototypeObjectId: prototype_object_id, objectGroup: object_group) end
release_object(object_id:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 131 def release_object(object_id:) @devtools.send_cmd('Runtime.releaseObject', objectId: object_id) end
release_object_group(object_group:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 136 def release_object_group(object_group:) @devtools.send_cmd('Runtime.releaseObjectGroup', objectGroup: object_group) end
remove_binding(name:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 182 def remove_binding(name:) @devtools.send_cmd('Runtime.removeBinding', name: name) end
run_if_waiting_for_debugger()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 141 def run_if_waiting_for_debugger @devtools.send_cmd('Runtime.runIfWaitingForDebugger') end
run_script(script_id:, execution_context_id: nil, object_group: nil, silent: nil, include_command_line_api: nil, return_by_value: nil, generate_preview: nil, await_promise: nil)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 145 def run_script(script_id:, execution_context_id: nil, object_group: nil, silent: nil, include_command_line_api: nil, return_by_value: nil, generate_preview: nil, await_promise: nil) @devtools.send_cmd('Runtime.runScript', scriptId: script_id, executionContextId: execution_context_id, objectGroup: object_group, silent: silent, includeCommandLineAPI: include_command_line_api, returnByValue: return_by_value, generatePreview: generate_preview, awaitPromise: await_promise) end
set_async_call_stack_depth(max_depth:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 157 def set_async_call_stack_depth(max_depth:) @devtools.send_cmd('Runtime.setAsyncCallStackDepth', maxDepth: max_depth) end
set_custom_object_formatter_enabled(enabled:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 162 def set_custom_object_formatter_enabled(enabled:) @devtools.send_cmd('Runtime.setCustomObjectFormatterEnabled', enabled: enabled) end
set_max_call_stack_size_to_capture(size:)
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 167 def set_max_call_stack_size_to_capture(size:) @devtools.send_cmd('Runtime.setMaxCallStackSizeToCapture', size: size) end
terminate_execution()
click to toggle source
# File lib/selenium/devtools/v85/runtime.rb, line 172 def terminate_execution @devtools.send_cmd('Runtime.terminateExecution') end