Class: Selenium::DevTools::V129::IO
- Inherits:
-
Object
- Object
- Selenium::DevTools::V129::IO
- Defined in:
- lib/selenium/devtools/v129/io.rb
Instance Method Summary collapse
- #close(handle:) ⇒ Object
-
#initialize(devtools) ⇒ IO
constructor
A new instance of IO.
- #on(event, &block) ⇒ Object
- #read(handle:, offset: nil, size: nil) ⇒ Object
- #resolve_blob(object_id:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ IO
Returns a new instance of IO.
26 27 28 |
# File 'lib/selenium/devtools/v129/io.rb', line 26 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#close(handle:) ⇒ Object
35 36 37 38 |
# File 'lib/selenium/devtools/v129/io.rb', line 35 def close(handle:) @devtools.send_cmd('IO.close', handle: handle) end |
#on(event, &block) ⇒ Object
30 31 32 33 |
# File 'lib/selenium/devtools/v129/io.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["IO.#{event}"] << block end |
#read(handle:, offset: nil, size: nil) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/selenium/devtools/v129/io.rb', line 40 def read(handle:, offset: nil, size: nil) @devtools.send_cmd('IO.read', handle: handle, offset: offset, size: size) end |
#resolve_blob(object_id:) ⇒ Object
47 48 49 50 |
# File 'lib/selenium/devtools/v129/io.rb', line 47 def resolve_blob(object_id:) @devtools.send_cmd('IO.resolveBlob', objectId: object_id) end |