Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var casper = require('casper').create({
- verbose: true,
- logLevel: 'debug'
- });
- casper.start('http://www.quora.com', function()
- {
- this.click('input.submit_button');
- this.echo("page loaded");
- this.test.assertExists('form.inline_login_form', 'form is found');
- this.fill('form.inline_login_form',{email:'xxxxxx@gmail.com',password:'xxxx'},false);
- }
- );
- casper.then(function(){
- this.click('input.submit_button');
- });
- casper.then(function(){
- this.capture('google.png', {
- top: 0,
- left: 0,
- width:0,
- height:0
- });
- this.echo("Page Title " + this.getTitle());
- });
- casper.run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement