NAME
WWW::Mechanize::Firefox::Extended - Adds handy functions to WWW::Mechanize::Firefox
VERSION
Version 0.01
SYNOPSIS
Module provides handy functions to check existence of selectors on a page and to wait for selectors to come into existence.
use WWW::Mechanize::Firefox::Extended;
my $mech = WWW::Mechanize::Firefox::Extended->new();
$mech->get('https://www.example.com/');
$mech->hasAll('#username', '#password', '#Image1');
$mech->hasAny('.close-button', '.exit-button', '.out-button');
$mech->waitAll(5, '#slow-loading-element')
or die "Expected element not found";
$mech->waitAny(5, '#slow-loading-element', '#another-element')
or die "Expected element not found";
SUBROUTINES/METHODS
hasAll( $mech, @selectors )
Returns true if all selectors exists. False otherwise.
hasAny( $mech, @selectors )
Returns true if any selector exists. False if none exists.
waitAll( $mech, $max_wait_seconds, @selectors )
Wait until all selectors are present or the wait times out. Returns true if all selectors found or false if none found within the timeout period.
Uses Time::HiRes
waitAny( $mech, $max_wait_seconds, @selectors )
Wait until any selectors are present or the wait times out. Returns true if any selectors are or false if none found within the timeout period.
Uses Time::HiRes
AUTHOR
Hoe-Kit Chew, <hoekit at gmail dot com>
BUGS
Please report any bugs or feature requests to bug-www-mechanize-firefox-extended at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Mechanize-Firefox-Extended. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::Mechanize::Firefox::Extended
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Mechanize-Firefox-Extended
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Mechanize-Firefox-Extended
Search CPAN
REPOSITORY AND PULL REQUESTS
This module is available on GitHub at https://github.com/hoekit/www-mechanize-firefox-extended/.
Pull requests welcomed.
LICENSE AND COPYRIGHT
Copyright 2015 Hoe-Kit Chew.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.