Advertisement
Guest User

Untitled

a guest
Jul 21st, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1.  
  2. var casper = require('casper').create({
  3. verbose: true,
  4. logLevel: 'debug'
  5. });
  6.  
  7.  
  8.  
  9. casper.start('http://www.quora.com', function()
  10. {
  11. this.click('input.submit_button');
  12. this.echo("page loaded");
  13. this.test.assertExists('form.inline_login_form', 'form is found');
  14. this.fill('form.inline_login_form',{email:'xxxxxx@gmail.com',password:'xxxx'},false);
  15.  
  16. }
  17. );
  18.  
  19. casper.then(function(){
  20. this.click('input.submit_button');
  21.  
  22. });
  23.  
  24. casper.then(function(){
  25.  
  26. this.capture('google.png', {
  27. top: 0,
  28. left: 0,
  29. width:0,
  30. height:0
  31. });
  32. this.echo("Page Title " + this.getTitle());
  33. });
  34.  
  35. casper.run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement