use strict; use warnings; use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; my $mech = WWW::Mechanize::Chrome->new; $mech->get('https://metacpan.org/'); sleep(1); my @nodes = $mech->xpath('//p'); $mech->highlight_node($mech,@nodes); sleep(3);