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.
Leave a comment