WWW::Mechanize::Firefox 0.45 released

I've just pushed out a new release of WWW::Mechanize::Firefox , my favourite interactive web scraping module. The changes in this version are:
  • ->eval_in_page() raises errors from perspective of the caller instead of raising errors in Firefox.pm.

    This was an especially annoying error, as it always pointed to somewhere deep within Firefox.pm when I tried to access an non-existing Javascript variable or had Javascript disabled in Firefox.

  • Added ->by_id() method and { id => $id } option for conveniently finding elements with names that ->selector interprets as CSS selectors.

    As the main application I am automating at $work uses fancy names and ids in forms and values, like _id1:foo , I found myself constantly selecting elements through ->click( { xpath => q{//*[@id="_id1:foo"]}, which is not only unsightly but also does not respect the value ->current_form(). This change introduces `id`, which is a shortcut for Just That. I also added more tests testing those names.

One . Improved tests checking fields with fancy:names or fancy:ids

Leave a comment

About Max Maischein

user-pic I'm the Treasurer for the Frankfurt Perlmongers e.V. . I have organized Perl events including 9 German Perl Workshops and one YAPC::Europe.