Weasel...s::HTML(3pm)

πŸ“¦
version 0.32 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ 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 tag
    • input: 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 the title attribute
  • '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)

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. πŸ’–


(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