Class: Selenium::DevTools::V128::Log
- Inherits:
-
Object
- Object
- Selenium::DevTools::V128::Log
- Defined in:
- lib/selenium/devtools/v128/log.rb
Constant Summary collapse
- EVENTS =
{ entry_added: 'entryAdded', }.freeze
Instance Method Summary collapse
- #clear ⇒ Object
- #disable ⇒ Object
- #enable ⇒ Object
-
#initialize(devtools) ⇒ Log
constructor
A new instance of Log.
- #on(event, &block) ⇒ Object
- #start_violations_report(config:) ⇒ Object
- #stop_violations_report ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Log
Returns a new instance of Log.
29 30 31 |
# File 'lib/selenium/devtools/v128/log.rb', line 29 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#clear ⇒ Object
38 39 40 |
# File 'lib/selenium/devtools/v128/log.rb', line 38 def clear @devtools.send_cmd('Log.clear') end |
#disable ⇒ Object
42 43 44 |
# File 'lib/selenium/devtools/v128/log.rb', line 42 def disable @devtools.send_cmd('Log.disable') end |
#enable ⇒ Object
46 47 48 |
# File 'lib/selenium/devtools/v128/log.rb', line 46 def enable @devtools.send_cmd('Log.enable') end |
#on(event, &block) ⇒ Object
33 34 35 36 |
# File 'lib/selenium/devtools/v128/log.rb', line 33 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Log.#{event}"] << block end |
#start_violations_report(config:) ⇒ Object
50 51 52 53 |
# File 'lib/selenium/devtools/v128/log.rb', line 50 def start_violations_report(config:) @devtools.send_cmd('Log.startViolationsReport', config: config) end |
#stop_violations_report ⇒ Object
55 56 57 |
# File 'lib/selenium/devtools/v128/log.rb', line 55 def stop_violations_report @devtools.send_cmd('Log.stopViolationsReport') end |