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, data_directory => '/home/rwk/chrome-session-for-walmart', incognito => 0, ); $mech->get('https://grocery.walmart.com'); my $png = $mech->content_as_png();