I'm trying to take screen shots of the web pages without using Mechanize::Firefox
.
I tried with the
Wight
module, will communicate with PhantomJS.
I'm able to take screen shots of http:
sites but I can't take the screen shots for https:
sites.
I have searched it and found a solution here PhantomJS failing to open HTTPS site which is to add a command-line option
phantomjs --ssl-protocol=any test.js
But I'm running PhantomJS inside the Wight
module and I don't know how to apply the --ssl-protocol
inside the script
This is what I have tried
use strict;
use Wight;
my %arg = ( phantomjs => 'phantomjs', protocal => '--ssl-protocol=any');
my $wight = Wight->new(%arg);
$wight->visit('https:...');
$wight->evaluate('document.title');
$wight->render('anv.png');