Sha256: 3fd8accdd8560c9335616d480c15400acbbebc3470eddcadf5994f133a2f7d9c
Contents?: true
Size: 642 Bytes
Versions: 11
Compression:
Stored size: 642 Bytes
Contents
module Selenium module WebDriver # # @private # module DriverExtensions module TakesScreenshot def save_screenshot(png_path) File.open(png_path, 'w') { |f| f << screenshot_as(:png) } end def screenshot_as(format) case format when :base64 bridge.getScreenshot when :png bridge.getScreenshot.unpack("m")[0] else raise Error::UnsupportedOperationError, "unsupported format: #{format.inspect}" end end end # TakesScreenshot end # DriverExtensions end # WebDriver end # Selenium
Version data entries
11 entries across 11 versions & 1 rubygems