Sha256: d4d33910860912f678a28c2bdab7ae96e41fe9861cfeca289d935da099ffce5f
Contents?: true
Size: 827 Bytes
Versions: 27
Compression:
Stored size: 827 Bytes
Contents
module Veewee module Provider module Virtualbox module BoxCommand def screenshot(filename,options={}) raise Veewee::Error, "The VM needs to exist before we can take a screenshot" unless self.exists? raise Veewee::Error, "The VM needs to be running before we can test a screenshot" unless self.running? # If the vm is not powered off, take a screenshot if (self.exists? && self.running?) ui.info "Saving screenshot of vm #{name} in #{filename}" command="#{@vboxcmd} controlvm \"#{name}\" screenshotpng \"#{filename}\"" shell_exec("#{command}") unless File.exists?(filename) raise Veewee::Error,"Saving Screenshot #{filename} failed" end end end end end end end
Version data entries
27 entries across 27 versions & 2 rubygems