javascript - 'undefined' is not an object (evaluating 'field.getAttribute') -


i have used code link below login.. works fine facebook .. how login website casperjs?

but give error login page of site. name of username field loginform[username] , name of password field loginform[password].

my code.

casper.start(url, function() {    // search 'casperjs' google form    console.log("page loaded");    this.test.assertexists('form#login-form', 'form found');         this.fill('form#login-form', {          loginform[username]: 'ascd@csc.com',          loginform[password]: '******'     }, true); }); 

output

[info] [remote] attempting fetch form element selector: 'form#login-form' remote message caught: attempting fetch form element selector: 'form#login-form' [error] [remote] typeerror: 'undefined' not object (evaluating 'field.getattribute') remote message caught: typeerror: 'undefined' not object (evaluating 'field.getattribute') page error: typeerror: 'undefined' not object (evaluating 'field.getattribute') fail caspererror: unable fill form #    type: uncaughterror #    error: "caspererror: unable fill form" caspererror: unable fill form 

//// html enter image description here

this.fill('form#login-form', {      'loginform[username]': 'ascd@csc.com',      'loginform[password]': '******' }, true); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -