Sha256: 2eb89ee80c40962e5a550e91f084db1d2f5eabff4d0eac5305860a7431e034e1

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

# encoding: utf-8
module Watir
  class Screenshot

    def initialize(driver)
      @driver = driver
    end

    #
    # Saves screenshot to given path.
    #
    # @param [String] path
    #

    def save(path)
      @driver.save_screenshot(path)
    end

    #
    # Represents screenshot as PNG image string.
    #
    # @return [String]
    #

    def png
      @driver.screenshot_as(:png)
    end

    #
    # Represents screenshot as Base64 encoded string.
    #
    # @return [String]
    #

    def base64
      @driver.screenshot_as(:base64)
    end

  end # Screenshot
end # Watir

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watir-webdriver-0.6.1 lib/watir-webdriver/screenshot.rb
watir-webdriver-0.6.0 lib/watir-webdriver/screenshot.rb