I am trying to get the hang of some automation with WWW::Mechanize::Firefox and can get as far as entering data in a form in what I think is a very simple case.
I tried various ways to activate/click/submit the "DECODE" button found on the page but to no avail. Here is my latest effort.Any hints would be appreciated.use strict; use WWW::Mechanize::Firefox; my $url = "http://www.decodethis.com"; my $agent = WWW::Mechanize::Firefox->new( activate => 1, autoclose => 0, ); my $sn = "1D7HU18D14J230995"; $agent->get($url); if ( $agent->success() ) { sleep(2); print "Retrieved $url\n"; $agent->form_name('Form'); $agent->field( 'dnn$ctr373$VINBox$tbVIN' => $sn ); sleep(2); $agent->submit_form( form => $agent->current_form()); }
Best regards!
Update: Corion's suggestion (click instead of submit_form) does the trick.Also good references suggested by Anonymous to learn on CSS selectors for those, like me, not that familiar with these ways.
Thanks to all.In reply to Elusive button WWW::Mechanize::Firefox by jjap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |