App-SimpleScan-Plugin-Snapshot

 view release on metacpan or  search on metacpan

lib/App/SimpleScan/Plugin/Snapshot.pm  view on Meta::CPAN


=head2 snapshot_pragma

Sets the current snapshotting: 'on' (snapshot everything), or
'error' (only snapshot on errors).

=head2 snap_layout_pragma

Sets the current snapshot format: 'vertical' (framed page,
divided vertically), 'horizontal' (framed page, divided 
horizontally), or 'popup' (page containing the debug
info as an IFRAME, with a link to pop up the original page
in a new window - good for XML, since IE and Firefox don't
render XML properly in a subframe).

=head2 snap_prefix_pragma

Set the current snapshot "prefix" - substituted for the 
directory that the snapshots are stored in when the 
snapshot frame file name is printed. This makes it possible
to do things like transform a filename into a URL so that

t/07multi.t  view on Meta::CPAN

my \@accent;
mech->snapshots_to("/tmp");
mech->agent_alias('Windows IE 6');
page_like "http://perl.org/",
          qr/Perl/,
          qq(branding [http://perl.org/] [/Perl/ should match]);
diag "See snapshot " . mech->snapshot( qq(branding<br>http://perl.org/<br>Perl Y) );

EOS

  "-snapshot error -snap_dir /tmp -snap_layout popup" => <<EOS,
use Test::More tests=>1;
use Test::WWW::Simple;
use strict;

my \@accent;
mech->snapshots_to("/tmp");
mech->snap_layout("popup");
mech->agent_alias('Windows IE 6');
page_like "http://perl.org/",
          qr/Perl/,
          qq(branding [http://perl.org/] [/Perl/ should match]);
if (!last_test->{ok}) {
  diag "See snapshot " . mech->snapshot( qq(branding<br>http://perl.org/<br>Perl Y) );
}

EOS
);



( run in 1.247 second using v1.01-cache-2.11-cpan-364913b4093 )