1package Firefox::Marionette::Timeouts;
2
3use strict;
4use warnings;
5
6our $VERSION = '1.10';
7
8sub new {
9    my ( $class, %parameters ) = @_;
10    my $element = bless {%parameters}, $class;
11    return $element;
12}
13
14sub page_load {
15    my ($self) = @_;
16    return $self->{page_load};
17}
18
19sub script {
20    my ($self) = @_;
21    return $self->{script};
22}
23
24sub implicit {
25    my ($self) = @_;
26    return $self->{implicit};
27}
28
291;    # Magic true value required at end of module
30__END__
31
32=head1 NAME
33
34Firefox::Marionette::Timeouts - Represents the timeouts for page loading, searching, and scripts.
35
36=head1 VERSION
37
38Version 1.10
39
40=head1 SYNOPSIS
41
42    use Firefox::Marionette();
43    use v5.10;
44
45    my $firefox = Firefox::Marionette->new()->go('https://metacpan.org/');
46    my $timeouts = $firefox->timeouts();
47    say "Page Load Timeouts is " . $timeouts->page_load() . " ms";
48
49=head1 DESCRIPTION
50
51This module handles the implementation of the Firefox Marionette Timeouts
52
53=head1 SUBROUTINES/METHODS
54
55=head2 new
56
57accepts a hash as a parameter.  Allowed keys are below;
58
59=over 4
60
61=item * page_load - the timeout used for L<go|Firefox::Marionette#go>, L<back|Firefox::Marionette#back>, L<forward|Firefox::Marionette#forward>, L<refresh|Firefox::Marionette#refresh> and L<click|Firefox::Marionette#click> methods in milliseconds
62
63=item * script - the timeout used for L<script|Firefox::Marionette#script> and L<async_script|Firefox::Marionette#async_script> methods in milliseconds
64
65=item * implicit - the timeout used for L<find|Firefox::Marionette#find> and L<list|Firefox::Marionette#list> methods in milliseconds
66
67=back
68
69This method returns a new L<timeout|Firefox::Marionette::Timeout> object.
70
71=head2 page_load
72
73returns the the timeout used for L<go|Firefox::Marionette#go>, L<back|Firefox::Marionette#back>, L<forward|Firefox::Marionette#forward>, L<refresh|Firefox::Marionette#refresh> and L<click|Firefox::Marionette#click> methods in milliseconds.
74
75=head2 script
76
77returns the the timeout used for L<script|Firefox::Marionette#script> and L<async_script|Firefox::Marionette#async_script> methods in milliseconds.
78
79=head2 implicit
80
81returns the timeout used for L<find|Firefox::Marionette#find> and L<list|Firefox::Marionette#list> methods in milliseconds
82
83=head1 DIAGNOSTICS
84
85None.
86
87=head1 CONFIGURATION AND ENVIRONMENT
88
89Firefox::Marionette::Timeouts requires no configuration files or environment variables.
90
91=head1 DEPENDENCIES
92
93None.
94
95=head1 INCOMPATIBILITIES
96
97None reported.
98
99=head1 BUGS AND LIMITATIONS
100
101No bugs have been reported.
102
103Please report any bugs or feature requests to
104C<bug-firefox-marionette@rt.cpan.org>, or through the web interface at
105L<http://rt.cpan.org>.
106
107=head1 AUTHOR
108
109David Dick  C<< <ddick@cpan.org> >>
110
111=head1 LICENSE AND COPYRIGHT
112
113Copyright (c) 2020, David Dick C<< <ddick@cpan.org> >>. All rights reserved.
114
115This module is free software; you can redistribute it and/or
116modify it under the same terms as Perl itself. See L<perlartistic/perlartistic>.
117
118=head1 DISCLAIMER OF WARRANTY
119
120BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
121FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
122OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
123PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
124EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
125WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
126ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
127YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
128NECESSARY SERVICING, REPAIR, OR CORRECTION.
129
130IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
131WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
132REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
133LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
134OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
135THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
136RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
137FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
138SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
139SUCH DAMAGES.
140