Class: Selenium::DevTools::V129::DOMDebugger
- Inherits:
-
Object
- Object
- Selenium::DevTools::V129::DOMDebugger
- Defined in:
- lib/selenium/devtools/v129/dom_debugger.rb
Instance Method Summary collapse
- #get_event_listeners(object_id:, depth: nil, pierce: nil) ⇒ Object
-
#initialize(devtools) ⇒ DOMDebugger
constructor
A new instance of DOMDebugger.
- #on(event, &block) ⇒ Object
- #remove_dom_breakpoint(node_id:, type:) ⇒ Object
- #remove_event_listener_breakpoint(event_name:, target_name: nil) ⇒ Object
- #remove_instrumentation_breakpoint(event_name:) ⇒ Object
- #remove_xhr_breakpoint(url:) ⇒ Object
- #set_break_on_csp_violation(violation_types:) ⇒ Object
- #set_dom_breakpoint(node_id:, type:) ⇒ Object
- #set_event_listener_breakpoint(event_name:, target_name: nil) ⇒ Object
- #set_instrumentation_breakpoint(event_name:) ⇒ Object
- #set_xhr_breakpoint(url:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ DOMDebugger
Returns a new instance of DOMDebugger.
26 27 28 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 26 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#get_event_listeners(object_id:, depth: nil, pierce: nil) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 35 def get_event_listeners(object_id:, depth: nil, pierce: nil) @devtools.send_cmd('DOMDebugger.getEventListeners', objectId: object_id, depth: depth, pierce: pierce) end |
#on(event, &block) ⇒ Object
30 31 32 33 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["DOMDebugger.#{event}"] << block end |
#remove_dom_breakpoint(node_id:, type:) ⇒ Object
42 43 44 45 46 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 42 def remove_dom_breakpoint(node_id:, type:) @devtools.send_cmd('DOMDebugger.removeDOMBreakpoint', nodeId: node_id, type: type) end |
#remove_event_listener_breakpoint(event_name:, target_name: nil) ⇒ Object
48 49 50 51 52 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 48 def remove_event_listener_breakpoint(event_name:, target_name: nil) @devtools.send_cmd('DOMDebugger.removeEventListenerBreakpoint', eventName: event_name, targetName: target_name) end |
#remove_instrumentation_breakpoint(event_name:) ⇒ Object
54 55 56 57 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 54 def remove_instrumentation_breakpoint(event_name:) @devtools.send_cmd('DOMDebugger.removeInstrumentationBreakpoint', eventName: event_name) end |
#remove_xhr_breakpoint(url:) ⇒ Object
59 60 61 62 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 59 def remove_xhr_breakpoint(url:) @devtools.send_cmd('DOMDebugger.removeXHRBreakpoint', url: url) end |
#set_break_on_csp_violation(violation_types:) ⇒ Object
64 65 66 67 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 64 def set_break_on_csp_violation(violation_types:) @devtools.send_cmd('DOMDebugger.setBreakOnCSPViolation', violationTypes: violation_types) end |
#set_dom_breakpoint(node_id:, type:) ⇒ Object
69 70 71 72 73 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 69 def set_dom_breakpoint(node_id:, type:) @devtools.send_cmd('DOMDebugger.setDOMBreakpoint', nodeId: node_id, type: type) end |
#set_event_listener_breakpoint(event_name:, target_name: nil) ⇒ Object
75 76 77 78 79 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 75 def set_event_listener_breakpoint(event_name:, target_name: nil) @devtools.send_cmd('DOMDebugger.setEventListenerBreakpoint', eventName: event_name, targetName: target_name) end |
#set_instrumentation_breakpoint(event_name:) ⇒ Object
81 82 83 84 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 81 def set_instrumentation_breakpoint(event_name:) @devtools.send_cmd('DOMDebugger.setInstrumentationBreakpoint', eventName: event_name) end |
#set_xhr_breakpoint(url:) ⇒ Object
86 87 88 89 |
# File 'lib/selenium/devtools/v129/dom_debugger.rb', line 86 def set_xhr_breakpoint(url:) @devtools.send_cmd('DOMDebugger.setXHRBreakpoint', url: url) end |