Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

Not able to login on a website using casperjs

I am trying to login to this website but am unable to do so. Its quite urgent as other processes are stuck due to same.

It would be great if one can come up with a solution script for the same for the mentioned bounty.

User Gravatar


Posted Oct 1 2013 22:42 UTC


  • Assigned To user486
  • Solved
  • casperjs

2 Replies

what exactly is unsuccessful? Do you get an error of some kind? can you show your code?

User Gravatar


Posted Oct 2 2013 5:32 UTC

It is necessary to use Phantomjs 1.9.2 with casperjs 1.0.3

//create casper object
var casper = require('casper').create({
    verbose: true,
    logLevel: 'debug'

//set browser user agent
casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X)');

//Open URL

casper.then(function() {
    // Click SIGN IN'div#login_user_data a:first-child');

casper.then(function() {

    //fill form
    this.fill('form[name=login_form]', {
        'user_login' : '',
        'password' : 'xxxxxxxx'
    }, false);              

    //submit form
    this.thenClick('input.ml_function_button', function(){

        // Here I'm in my myAccount Page        

        // Do something ...

}); {
    //finish execution script 
User Gravatar


Posted Oct 3 2013 15:15 UTC


This didn't solve your task? Get your own custom solution.

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions