Firefox::Marionette::Element - Represents a Firefox element retrieved using the Marionette protocol
Version 0.03
use Firefox::Marionette(); use v5.10; my $firefox = Firefox::Marionette->new()->go('https://metacpan.org/'); my $element = $firefox->find_element('//input[@id="search-input"]'); $element->send('Test::More');
This module handles the implementation of a Firefox Element using the Marionette protocol
returns a new element.
returns the browser generated UUID connected with this element.
returns the browser connected with the element.
sends a 'click' to the element. The browser will wait for any page load to complete or the session's page timeout duration to elapse before returning.
clears any user supplied input from the element
returns the text that is contained by that element (if any)
returns the relevant tag name. For example 'a' or 'input'.
returns the current position and size of the element
accepts a scalar string as a parameter. It sends the string to this element, such as filling out a text box. This method returns the browser to aid in chaining methods.
switches to this frame within the current window.
accepts a scalar name a parameter. It returns the value of the attribute with the supplied name.
accepts a scalar CSS property name as a parameter. It returns the value of the computed style for that property.
returns a File::Temp object containing a lossless PNG image screenshot of the element.
accepts the following optional parameters as a hash;
hash - return a SHA256 hex encoded digest of the PNG image rather than the image itself
full - take a screenshot of the whole document unless the first element parameter has been supplied.
scroll - scroll to the element supplied
highlights - a reference to a list containing elements to draw a highlight around
None.
Firefox::Marionette::Element requires no configuration files or environment variables.
None reported.
No bugs have been reported.
Please report any bugs or feature requests to bug-firefox-marionette@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-firefox-marionette@rt.cpan.org
David Dick <ddick@cpan.org>
<ddick@cpan.org>
Copyright (c) 2018, David Dick <ddick@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Firefox::Marionette, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Firefox::Marionette
CPAN shell
perl -MCPAN -e shell install Firefox::Marionette
For more information on module installation, please visit the detailed CPAN module installation guide.