#!perl -w use strict; use Test::More; use WWW::Mechanize::Firefox; my $mech = eval { WWW::Mechanize::Firefox->new( autodie => 0, #log => [qw[debug]] )}; if (! $mech) { my $err = $@; plan skip_all => "Couldn't connect to MozRepl: $@"; exit } else { plan tests => 3; }; isa_ok $mech, 'WWW::Mechanize::Firefox'; my $content = <
Hello WWW::Mechanize::Firefox
HTML $mech->update_html($content); my $c = $mech->content; for ($c,$content) { s/\s+/ /msg; # normalize whitespace s/> >document->__xpath('//b'); is scalar @n, 2, 'Querying stuff via XPath works'; @n = $mech->xpath('//b'); is scalar @n, 2, 'Querying stuff via XPath works via the immediate interface';