Is it possible to write a script in Perl that opens different URLs and saves a screenshot of each of them?
Use the WWW::Selenium
module, for which you'll need to have a Selenium Remote Control session up and running.
The capture_entire_page_screenshot()
method should get you up and running.
From WWW::Selenium on CPAN:
$sel->capture_entire_page_screenshot($filename, $kwargs)
Saves the entire contents of the current window canvas to a PNG file...
A typical script:
use strict;
use warnings;
use WWW::Selenium;
my $sel = WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*iexplore",
browser_url => "http://www.google.com",
);
$sel->start;
$sel->open("http://www.google.com");
$sel->capture_entire_page_screenshot("screenshot.png");
$sel->close;