Weasel...s::HTML(3pm)
β¨ Weasel::FindExpanders::HTML β¨
okay bestie, you're looking at Weasel::FindExpanders::HTML from the User Contributed Perl Documentation section of the Weasel family β it's a 3pm page, so it's a Perl module manual, and it is so handy. π
πΈ VERSION πΈ
version 0.32 β that's the one, that's the vibe. β¨
π SYNOPSIS π
here's the little taste test, exactly as it is:
use Weasel::FindExpanders::HTML;
my $button = $session->find($session->page, '*button|{text=>"whatever"}');
see how cute that is? *button and then a criteria hash and suddenly you're finding buttons. no cap. π¦
π DESCRIPTION π
so basically, this module is a whole lil' collection of short-cuts for XPath expressions, made to be used with Weasel's find() function when you're testing HTML pages. π§
and it's geared toward standard HTML5 tags specifically β like it knows what a button is, it knows what a checkbox is, it's giving very much "I've done this before." π
π SUBROUTINES/METHODS π
button_expander
finds button tags, or input tags whose type is submit, reset, button or image. yes, all four. slay. π₯
Criteria:
'id''name''text'button: matches the content between the open and close taginput: matches the'value'attribute (which is the thing shown on the button), or the'alt'attribute of an image button
checkbox_expander
finds input tags of type checkbox. β
Criteria:
'id''name''value'
contains_expander
finds tags that contain 'text'. that's it. that's the whole thing. lowkey elegant. π
labeled_expander
finds tags that have had a label set on them β using the label tag, obviously. π·οΈ
Criteria:
'text': the text of the label'tag': the tags for which the label has been set
titled_expander
finds tags that have a title attribute set. π
Criteria:
'text': the text of thetitleattribute'tag': the tags for which the title has been set
field_expander
finds tags that have id, name or title attributes set, or that have a label. so many ways to be found. main character energy fr fr. π
Criteria:
'text': the text of the attribute or label'tag': the tags for which the attribute has been set (or the label, yk)
link_expander
finds A tags with an href attribute whose text or title matches 'text'. π
Criteria:
'text'
option_expander
finds OPTION tags whose content matches 'text', or whose value matches 'value'. pick your fighter. β
Criteria:
'text''value'
password_expander
finds input tags of type password. π€«
Criteria:
'id''name'
radio_expander
finds input tags of type radio. π»
Criteria:
'id''name''value'
select_expander
finds select tags. short king of a subroutine, we respect it. π
Criteria:
'id''name'
text_expander
finds input tags of type text, or input tags with no type at all β because no type defaults to text, iykyk. βοΈ
Criteria:
'id''name'
π«Ά AUTHOR π«Ά
- Erik Huelsmann
πΈ CONTRIBUTORS πΈ
- Erik Huelsmann
- Yves Lavoie
π MAINTAINERS π
- Erik Huelsmann
π BUGS AND LIMITATIONS π
found a bug? bestie, don't suffer in silence β bugs can be filed in the GitHub issue tracker for the Weasel project:
https://github.com/perl-weasel/weasel/issues
fr fr, please file it, the maintainers want to know. π
π¦ SOURCE π¦
the source code repository for Weasel lives at:
<https://github.com/perl-weasel/weasel>
β¨ SUPPORT β¨
community support is available through perl-weasel@googlegroups.com <mailto:perl-weasel@googlegroups.com>. come hang out, the group chat is open. π
π LICENSE AND COPYRIGHT π
(C) 2016-2023 Erik Huelsmann
licensed under the same terms as Perl. periodt. π
and that's the whole page, bestie!! π this one's perl v5.40.1, dated 2025-05-24 β so like, bookmark the date, it's giving vintage (okay not vintage, but still). stay iconic, go find some buttons. πβ¨π¦
π¦ where this page comes from
- debian trixie: libweasel-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libweasel-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libweasel-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms