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

πŸ’– Weasel::FindExpanders::Dojo β€” the vibe ✨

okay bestie, pull up a chair because this is the Weasel...s::Dojo page from the User Contributed Perl Documentation and it's genuinely iconic. it's giving XPath mnemonic hooks for Dojo 1.x widgets and honestly? obsessed. πŸŽ€


🌸 NAME 🌸

Weasel::FindExpanders::Dojo β€” XPath mnemonic hooks for Dojo 1.x widgets πŸ¦‹


✨ VERSION ✨

0.02 β€” yeah she's a lil baby version but she's thriving πŸ’…


🫢 SYNOPSIS 🫢

like, here's how you actually use her:

use Weasel::FindExpanders::Dojo;

my $button = $session->find($session->page, "@button|{text=>\"whatever\"}");

no cap, that's the whole thing. @button with a criteria hash and you're off to the races 🏁


πŸ‘‘ DESCRIPTION πŸ‘‘

🌈 button_expander

Finds button tags or input tags of types submit, reset, button and image. like it's not picky, if it's clickable and button-shaped, she'll find it πŸ’–

Criteria:

  • 'id'
  • 'name'
  • 'text' β€” this one matches content between the open and close tag πŸŽ€

πŸ¦‹ option_expander

Finds options for dijit.form.Select β€” BUT only after the drop down has been invoked at least once, because the options literally do not exist in the DOM tree before that point. they're just vibing in the void, not born yet 😭

Because of that, it's genuinely best to search the options through the select tag instead β€” that one offers a find_option method which specifically compensates for this whole situation. she gets it, she handles it, she's the main character 🫢

Additionally (and this is the annoying part bestie), it's impossible to search options by the value being submitted β€” those don't exist in the DOM tree at all, unlike with the option tags of selects. so don't even try it, it's giving nothing πŸ’€

Criteria:

  • 'id'
  • 'text' β€” matches the visible description of the item πŸ‘€

⭐ quick recap: button_expander = buttons of every flavor, option_expander = dijit options but only post-dropdown and never by submitted value. iykyk.

okay that's the whole page, mwah πŸ’œ this one's Perl v5.32.0, dated 2020-12-21, straight from the Weasel...s::Dojo(3pm) page in the User Contributed Perl Documentation β€” slay, bye bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from