Class: Selenium::DevTools::V129::EventBreakpoints

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/devtools/v129/event_breakpoints.rb

Instance Method Summary collapse

Constructor Details

#initialize(devtools) ⇒ EventBreakpoints

Returns a new instance of EventBreakpoints.



26
27
28
# File 'lib/selenium/devtools/v129/event_breakpoints.rb', line 26

def initialize(devtools)
  @devtools = devtools
end

Instance Method Details

#disableObject



45
46
47
# File 'lib/selenium/devtools/v129/event_breakpoints.rb', line 45

def disable
  @devtools.send_cmd('EventBreakpoints.disable')
end

#on(event, &block) ⇒ Object



30
31
32
33
# File 'lib/selenium/devtools/v129/event_breakpoints.rb', line 30

def on(event, &block)
  event = EVENTS[event] if event.is_a?(Symbol)
  @devtools.callbacks["EventBreakpoints.#{event}"] << block
end

#remove_instrumentation_breakpoint(event_name:) ⇒ Object



40
41
42
43
# File 'lib/selenium/devtools/v129/event_breakpoints.rb', line 40

def remove_instrumentation_breakpoint(event_name:)
  @devtools.send_cmd('EventBreakpoints.removeInstrumentationBreakpoint',
                     eventName: event_name)
end

#set_instrumentation_breakpoint(event_name:) ⇒ Object



35
36
37
38
# File 'lib/selenium/devtools/v129/event_breakpoints.rb', line 35

def set_instrumentation_breakpoint(event_name:)
  @devtools.send_cmd('EventBreakpoints.setInstrumentationBreakpoint',
                     eventName: event_name)
end