Casperjs: how can I submit a form that has action="#"

Viewed 2843

I am trying to get my casper to login into a website, but it has this form:

<form action="#" method="POST" name="logon" id="loginForm" onsubmit="DoLogin(); return false;">

I get this in my casper

[info] [remote] attempting to fetch form element from selector: 'div.mainLoginLe
ftPanel form'
[debug] [remote] Set "username" field value to foo
[debug] [remote] Set "password" field value to ***
[info] [remote] submitting form to #, HTTP POST
[warning] [remote] unable to submit form

How can I trigger the "DoLogin();" or submit the form a different way?

1 Answers
Related