in reply to button not clickable with WWW::Mechanize

WWW::Mechanize does not support javascript (the onclick stuff).

If I recall correctly, BUTTON tags actually don't do anything unless they're embedded in a link or have javascript actions.

If you're on windows, you might give Win32::IE::Mechanize a try - it's a Mechanize replacement that uses internet explorer as a backend, and does support javascript.

  • Comment on Re: button not clickable with WWW::Mechanize

Replies are listed 'Best First'.
Re^2: button not clickable with WWW::Mechanize
by ZlR (Chaplain) on Mar 17, 2006 at 15:31 UTC
    hmm ... I tried :
    $ie->form_name('form_machine') ; $ie->field( 'machine', $machine ) ; $ie -> click('IWantThisOne') ;

    This has the effect of oppening an IE window with the page i want ! And that's with visible => 0 at the creation of the IE object ?! With visible => 1 it doesn't open the correct page ...

    I'll bypass the problem by attacking the URL directly but it's a little bit disappointing ...