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

Version Path
webdrone-1.7.8 lib/webdrone/shot.rb
webdrone-1.7.4 lib/webdrone/shot.rb
webdrone-1.7.2 lib/webdrone/shot.rb
webdrone-1.7.0 lib/webdrone/shot.rb
webdrone-1.6.2 lib/webdrone/shot.rb
webdrone-1.6.0 lib/webdrone/shot.rb
webdrone-1.5.0 lib/webdrone/shot.rb
webdrone-1.4.8 lib/webdrone/shot.rb
webdrone-1.4.6 lib/webdrone/shot.rb
webdrone-1.4.4 lib/webdrone/shot.rb
webdrone-1.4.2 lib/webdrone/shot.rb
webdrone-1.4.0 lib/webdrone/shot.rb
webdrone-1.3.6 lib/webdrone/shot.rb
webdrone-1.3.4 lib/webdrone/shot.rb
webdrone-1.3.2 lib/webdrone/shot.rb
webdrone-1.3.0 lib/webdrone/shot.rb