Class: Selenium::DevTools::V85::Audits
- Inherits:
-
Object
- Object
- Selenium::DevTools::V85::Audits
- Defined in:
- lib/selenium/devtools/v85/audits.rb
Constant Summary collapse
- EVENTS =
{ issue_added: 'issueAdded', }.freeze
Instance Method Summary collapse
- #disable ⇒ Object
- #enable ⇒ Object
- #get_encoded_response(request_id:, encoding:, quality: nil, size_only: nil) ⇒ Object
-
#initialize(devtools) ⇒ Audits
constructor
A new instance of Audits.
- #on(event, &block) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Audits
Returns a new instance of Audits.
29 30 31 |
# File 'lib/selenium/devtools/v85/audits.rb', line 29 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#disable ⇒ Object
46 47 48 |
# File 'lib/selenium/devtools/v85/audits.rb', line 46 def disable @devtools.send_cmd('Audits.disable') end |
#enable ⇒ Object
50 51 52 |
# File 'lib/selenium/devtools/v85/audits.rb', line 50 def enable @devtools.send_cmd('Audits.enable') end |
#get_encoded_response(request_id:, encoding:, quality: nil, size_only: nil) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/selenium/devtools/v85/audits.rb', line 38 def get_encoded_response(request_id:, encoding:, quality: nil, size_only: nil) @devtools.send_cmd('Audits.getEncodedResponse', requestId: request_id, encoding: encoding, quality: quality, sizeOnly: size_only) end |
#on(event, &block) ⇒ Object
33 34 35 36 |
# File 'lib/selenium/devtools/v85/audits.rb', line 33 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Audits.#{event}"] << block end |