Sha256: 6c8a6ba5acf28e8eef8ac4f98cf6542b04785dd4ff19db6f2ee79da1116e31c2
Contents?: true
Size: 520 Bytes
Versions: 16
Compression:
Stored size: 520 Bytes
Contents
module Webdrone class Browser def shot @shot ||= Shot.new self end end class Shot attr_accessor :a0 def initialize(a0) @a0 = a0 end def screen(name) @counter = (@counter || 0) + 1 filename = sprintf "screenshot-%04d-%s.png", @counter, name filename = File.join(@a0.conf.outdir, filename) $a0_webdrone_screenshot = filename @a0.driver.save_screenshot filename rescue => exception Webdrone.report_error(@a0, exception) end end end
Version data entries
16 entries across 16 versions & 1 rubygems