Class: Maze::MacosUtils
- Inherits:
-
Object
- Object
- Maze::MacosUtils
- Defined in:
- lib/maze/macos_utils.rb
Class Method Summary collapse
Class Method Details
.capture_screen(scenario) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/maze/macos_utils.rb', line 6 def capture_screen(scenario) path = File.join(File.join(Dir.pwd, 'maze_output'), 'failed', Maze::Helper.to_friendly_filename(scenario.name)) FileUtils.makedirs(path) system("/usr/sbin/screencapture #{path}/#{Maze::Helper.to_friendly_filename(scenario.name)}-screenshot.jpg") end |