Selenium-Screenshot
view release on metacpan or search on metacpan
lib/Selenium/Screenshot.pm view on Meta::CPAN
Selenium::Screenshot->new(
png => $driver->screenshot
)->filename; # screenshots/203523252.png
# providing any metadata uses that as the filename, and the basis
# for the diff filename
Selenium::Screenshot->new(
png => $driver->screenshot,
metadata => {
key => 'value'
}
)->filename; # screenshots/value.png
Selenium::Screenshot->new(
png => $driver->screenshot,
metadata => {
key => 'value'
}
)->difference($opponent); # screenshots/value-diff.png
# overriding the filename
Selenium::Screenshot->new(
png => $driver->screenshot,
metadata => {
key => 'value'
}
)->filename(
key => 'shadow'
); # screenshots/shadow.png
=head2 reference
Returns a STRING using the L</metadata> and L</folder>, but with
-reference appended to the very end. This is the file that L</compare>
will look for automatically, if it is not passed any arguments.
=head2 save
Delegates to L<Imager/write>, which it uses to write to the filename
as calculated by L</filename>. Like L</filename>, you can pass in a
HASH of overrides to the filename if you'd like to customize it.
=head2 save_reference
Saves a file according to the L</metadata> and L</folder> options with
-reference suffixed to the end of it. By default, L</compare> will
look for this file if it receives no arguments.
=head1 SEE ALSO
Please see those modules/websites for more information related to this module.
=over 4
=item *
L<Image::Compare|Image::Compare>
=item *
L<Image::Magick|Image::Magick>
=item *
L<Selenium::Remote::Driver|Selenium::Remote::Driver>
=item *
L<https://github.com/bslatkin/dpxdt|https://github.com/bslatkin/dpxdt>
=item *
L<https://github.com/facebook/huxley|https://github.com/facebook/huxley>
=item *
L<https://github.com/BBC-News/wraith|https://github.com/BBC-News/wraith>
=back
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
https://github.com/gempesaw/Selenium-Screenshot/issues
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 AUTHOR
Daniel Gempesaw <gempesaw@gmail.com>
=head1 CONTRIBUTOR
=for stopwords Nicolas Georges
Nicolas Georges <xlat@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Daniel Gempesaw.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 1.052 second using v1.01-cache-2.11-cpan-39bf76dae61 )