javascript - CasperJS not triggering onchange events -


i'm writing casperjs script automatically fill web form , scrape results.

one field like: <input name="code" class="inputfield" onchange="doa()" onkeypress="return dob(this,event)">

my script: casper.then(function visit_details() { casper.sendkeys('input[name="code"]', 'foobar'); //...some other actions })

i expected script trigger calls doa (once, after statement) , dob (6 times, 6 keys in 'foobar'). however, neither function called once. of course, when type 'foobar' field in web browser, functions called expected.

i'm taking screenshots of every step (before , after contents of step), , logging errors stdout, per the provided instructions. ran remote debugger, debugger; instruction right before sendkeys call, , breakpoints set on event handlers. breakpoints never hit.

the use case i'm trying automate filling of form. form runs validation code on these event handlers, , can submitted once event handlers have run.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -