use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); # Set priority of root logger to ERROR my $mech = WWW::Mechanize::Chrome->new( headless => 0, incognito => 0, ); my $png = $mech->content_as_png(); exit;