use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); my $mech = WWW::Mechanize::Chrome->new( headless => 0, ); $mech->get('https://grocery.walmart.com'); my $png = $mech->content_as_png();