Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1381a2f152
Fetching contributors…

Cannot retrieve contributors at this time

executable file 42 lines (30 sloc) 0.784 kb
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Selenium;
use Image::Magick;
my $sel = WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "",
);
$sel->start;
$sel->open("justin.html");
sleep(15);
my $path = "/var/www/images/";
while(1)
{
my $curTime = time();
my $file = $path.$curTime.".png";
$sel->capture_entire_page_screenshot($file);
my($image, $x);
$image = Image::Magick->new;
$x = $image->Read($file);
warn "$x" if "$x";
$x = $image->Crop(geometry=>'480x340');
warn "$x" if "$x";
$x = $image->Write($file);
warn "$x" if "$x";
sleep(8);
}
$sel->close;
Jump to Line
Something went wrong with that request. Please try again.