Class: Selenium::DevTools::V149::EventBreakpoints
- Inherits:
-
Object
- Object
- Selenium::DevTools::V149::EventBreakpoints
- Defined in:
- lib/selenium/devtools/v149/event_breakpoints.rb
Instance Method Summary collapse
- #disable ⇒ Object
-
#initialize(devtools) ⇒ EventBreakpoints
constructor
A new instance of EventBreakpoints.
- #on(event, &block) ⇒ Object
- #remove_instrumentation_breakpoint(event_name:) ⇒ Object
- #set_instrumentation_breakpoint(event_name:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ EventBreakpoints
Returns a new instance of EventBreakpoints.
27 28 29 |
# File 'lib/selenium/devtools/v149/event_breakpoints.rb', line 27 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#disable ⇒ Object
46 47 48 |
# File 'lib/selenium/devtools/v149/event_breakpoints.rb', line 46 def disable @devtools.send_cmd('EventBreakpoints.disable') end |
#on(event, &block) ⇒ Object
31 32 33 34 |
# File 'lib/selenium/devtools/v149/event_breakpoints.rb', line 31 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["EventBreakpoints.#{event}"] << block end |
#remove_instrumentation_breakpoint(event_name:) ⇒ Object
41 42 43 44 |
# File 'lib/selenium/devtools/v149/event_breakpoints.rb', line 41 def remove_instrumentation_breakpoint(event_name:) @devtools.send_cmd('EventBreakpoints.removeInstrumentationBreakpoint', eventName: event_name) end |
#set_instrumentation_breakpoint(event_name:) ⇒ Object
36 37 38 39 |
# File 'lib/selenium/devtools/v149/event_breakpoints.rb', line 36 def set_instrumentation_breakpoint(event_name:) @devtools.send_cmd('EventBreakpoints.setInstrumentationBreakpoint', eventName: event_name) end |