How to Login by filling the form in CasperJs

前端 未结 4 830
闹比i
闹比i 2021-01-07 23:36

Following is the hlml of the login form that I have

4条回答
  •  盖世英雄少女心
    2021-01-08 00:03

    casper.waitForSelector('form', function(){
        this.fill('form', {
        'name': 'abc@gmail.com', 
        'pass': 'pwd'}, true);
    });
    
    
    casper.waitWhileSelector('form', function(){
        this.echo('selector is no more!');
    });
    
    casper.then(function(){
        this.echo(this.getTitle());
    });
    

提交回复
热议问题