Weasel::Driver::Mock
0.02
use Weasel;
use Weasel::Session;
use Weasel::Driver::Mock;
my %opts = (
states => [
{ cmd => 'get', args => [ 'http://localhost/index' ] },
{ cmd => 'find', args => [ '//div[@id="your-id"]' ] },
],
);
my $weasel = Weasel->new(
default_session => 'default',
sessions => {
default => Weasel::Session->new(
driver => Weasel::Driver::Mock->new(%opts),
),
});
$weasel->session->get('http://localhost/index');
This module implements the Weasel::DriverRole
API for Weasel
to simulate webpage interactions for testing purposes.
# Install Weasel::Driver::Mock
$ cpanm Weasel::Driver::Mock
Bugs can be filed in the GitHub issue tracker for the Weasel::Driver::Mock project: https://github.com/perl-weasel/weasel-driver-mock/issues
Community support is available through [email protected].
Copyright (c) 2019 Erik Huelsmann
Same as Perl