Class: Janus::Command::Record
- Inherits:
-
Object
- Object
- Janus::Command::Record
- Defined in:
- lib/janus/command/record.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(configuration) ⇒ Record
constructor
A new instance of Record.
- #record_screenshot(test) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Record
Returns a new instance of Record.
6 7 8 |
# File 'lib/janus/command/record.rb', line 6 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 |
# File 'lib/janus/command/record.rb', line 10 def execute @configuration.tests.each do |test| record_screenshot(test) end end |
#record_screenshot(test) ⇒ Object
16 17 18 19 |
# File 'lib/janus/command/record.rb', line 16 def record_screenshot(test) screenshot = Janus::Screenshot.capture(test, username: @configuration.username, access_key: @configuration.access_key) screenshot.save('output') end |