Firefo...::Rect(3pm)

πŸ“¦
version 1.63 Β· 3 versions
, in debian trixie

πŸŽ€ Firefo...::Rect(3pm) πŸŽ€

okay bestie, real talk: every single thing on a webpage is just a lil rectangle floating in space, and this module is the one that writes down the coordinates of that rectangle. It's Firefox::Marionette::Element::Rect, and it is the entire personality of a box. πŸ’…βœ¨


✨ NAME ✨

Firefox::Marionette::Element::Rect β€” represents the box around an Element. That's the job. That's the whole job. Iconic, honestly. πŸ‘‘


🌈 VERSION 🌈

Version 1.63 πŸ“


πŸ¦‹ SYNOPSIS πŸ¦‹

use Firefox::Marionette();
use v5.10;

my $firefox = Firefox::Marionette->new()->go('https://metacpan.org/');
my $rect = $firefox->find_class('page-content');
say "Current height of the Lucky button " . $rect->height();
say "Height of page-content div is " . $rect->height();

so like. you spin up a firefox, you send it to metacpan, you grab the page-content class, and then you ask it how tall it is. twice. because height is the moment. 🫢


πŸ’– DESCRIPTION πŸ’–

This module is the one holding down the representation of the box around an Element. That's it β€” it takes the rectangle and it handles it. no drama, no chaos, just a box being perceived correctly. ✨


πŸ”₯ SUBROUTINES/METHODS πŸ”₯

πŸ’« new

accepts a hash as a parameter. Allowed keys are below;

  • pos_x β€” the X position of the element (left-right vibes)
  • pos_y β€” the Y position of the element (up-down vibes)
  • height β€” the height of the element
  • width β€” the width of the element

This method returns a new rect object. a whole fresh box, just for you 🎁

πŸ’« pos_x

returns the X position of the element. where it's at horizontally, fr fr. ⭐

πŸ’« pos_y

returns the Y position of the element. where it's at vertically, no cap. ⭐

πŸ’« height

returns the height of the element. how tall. how much vertical. πŸ“

πŸ’« width

returns the width of the element. how wide. how much horizontal. πŸ“


🩺 DIAGNOSTICS 🩺

None. literally nothing. silence. πŸ¦— the quietest module in the friend group


βš™οΈ CONFIGURATION AND ENVIRONMENT βš™οΈ

Firefox::Marionette::Element::Rect requires no configuration files or environment variables. zero. nada. nothing to set up before the sleepover. 🧸


πŸ“¦ DEPENDENCIES πŸ“¦

None. it's self-sufficient. independent queen behaviour πŸ‘‘


🚫 INCOMPATIBILITIES 🚫

None reported. it gets along with everybody. 🌸


πŸ› BUGS AND LIMITATIONS πŸ›

To report a bug, or view the current list of bugs, please visit <https://github.com/david-dick/firefox-marionette/issues> β€” go tell them, bestie, they wanna know πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

David Dick "<ddick@cpan.org>" πŸ’œ


Copyright (c) 2024, 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. slay, and also, legally, slay ✨


⚠️ DISCLAIMER OF WARRANTY ⚠️

okay this next part is the legal voice and it is ALL CAPS and it is very serious, do not be scared, it's standard, here it is exactly as it must be:

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.


and that's the whole page, bestie 🫢 this was Firefo...::Rect(3pm), served fresh from perl v5.40.1 on 2025-03-16. go measure some boxes and text me the coordinates. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from