vijayvithal has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to manipulate the form at this link
The code uses JS to populate the options for the next element based on the current element. While I have been able to select the element for district I am not able to trigger the script to load the next element. Any pointers on what I am doing wrong.
use strict; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(); $mech->get('http://117.247.176.82/VIEWDOCS.aspx'); $mech->autoclose_tab( 0 ); $mech->allow( javascript => 1 ); my @el = $mech->by_id('MainContent_ddldist'); $el[0]->__event('mousedown'); $mech->select( 'ctl00$MainContent$ddldist'=>'BN'); $el[0]->__event('mouseup'); #Well the mouse event did not work, lets trigger on change directly. $el[0]->__event('onChange'); my @el=$mech->by_id('ctl01'); $el[0]->__event('click'); #even this did not work and I have spent over a day on this... time to + seek the wisdom of the monks?. sleep 10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize::Firefox trigger onchange event
by anonymized user 468275 (Curate) on Aug 25, 2015 at 11:51 UTC | |
|
Re: WWW::Mechanize::Firefox trigger onchange event ( ->click )
by Anonymous Monk on Aug 25, 2015 at 11:23 UTC | |
|
Re: WWW::Mechanize::Firefox trigger onchange event
by belg4mit (Prior) on Sep 19, 2016 at 13:07 UTC |