Class: Dhalang::Screenshot
- Inherits:
-
Object
- Object
- Dhalang::Screenshot
- Defined in:
- lib/Screenshot.rb
Overview
Allows consumers of this library to take screenshots with Puppeteer.
Class Method Summary collapse
-
.get_from_url_as_jpeg(url) ⇒ String
Captures a full JPEG screenshot of the webpage under the given url.
-
.get_from_url_as_png(url) ⇒ String
Captures a full PNG screenshot of the webpage under the given url.
Class Method Details
.get_from_url_as_jpeg(url) ⇒ String
Captures a full JPEG screenshot of the webpage under the given url.
12 13 14 |
# File 'lib/Screenshot.rb', line 12 def self.get_from_url_as_jpeg(url) get(url, "jpeg") end |
.get_from_url_as_png(url) ⇒ String
Captures a full PNG screenshot of the webpage under the given url.
21 22 23 |
# File 'lib/Screenshot.rb', line 21 def self.get_from_url_as_png(url) get(url, "png") end |