Class: Selenium::DevTools::V85::HeadlessExperimental
- Inherits:
-
Object
- Object
- Selenium::DevTools::V85::HeadlessExperimental
- Defined in:
- lib/selenium/devtools/v85/headless_experimental.rb
Constant Summary collapse
- EVENTS =
{ needs_begin_frames_changed: 'needsBeginFramesChanged', }.freeze
Instance Method Summary collapse
- #begin_frame(frame_time_ticks: nil, interval: nil, no_display_updates: nil, screenshot: nil) ⇒ Object
- #disable ⇒ Object
- #enable ⇒ Object
-
#initialize(devtools) ⇒ HeadlessExperimental
constructor
A new instance of HeadlessExperimental.
- #on(event, &block) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ HeadlessExperimental
Returns a new instance of HeadlessExperimental.
29 30 31 |
# File 'lib/selenium/devtools/v85/headless_experimental.rb', line 29 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#begin_frame(frame_time_ticks: nil, interval: nil, no_display_updates: nil, screenshot: nil) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/selenium/devtools/v85/headless_experimental.rb', line 38 def begin_frame(frame_time_ticks: nil, interval: nil, no_display_updates: nil, screenshot: nil) @devtools.send_cmd('HeadlessExperimental.beginFrame', frameTimeTicks: frame_time_ticks, interval: interval, noDisplayUpdates: no_display_updates, screenshot: screenshot) end |
#disable ⇒ Object
46 47 48 |
# File 'lib/selenium/devtools/v85/headless_experimental.rb', line 46 def disable @devtools.send_cmd('HeadlessExperimental.disable') end |
#enable ⇒ Object
50 51 52 |
# File 'lib/selenium/devtools/v85/headless_experimental.rb', line 50 def enable @devtools.send_cmd('HeadlessExperimental.enable') end |
#on(event, &block) ⇒ Object
33 34 35 36 |
# File 'lib/selenium/devtools/v85/headless_experimental.rb', line 33 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["HeadlessExperimental.#{event}"] << block end |