|There's more than one way to do things|
[Solved] Checking onclick attribute of an anchor tag with WWW:::Mechanize::Firefoxby Riales (Hermit)
|on Mar 05, 2012 at 08:14 UTC||Need Help??|
Riales has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to check the onclick attribute of anchor tags with WWW::Mechanize::Firefox. Here is what I have explored so far...
At first, I thought I'd check the attrs property of WWW::Mechanize::Link. Something like this:
Unfortunately, that did not work. Further exploration yielded the reason--the make_link subroutine in WWW::Mechanize::Firefox always just initializes attrs with an empty hashref.
No problem, I thought--maybe I could just patch that functionality in. Not much success with that either, though--I'm having a tough time understanding how the MozRepl::RemoteObject module works. I thought something like this sound work:
Or at least:
What am I missing? Is there a simpler way to go about this?