Advertisement
sadtaco

Untitled

Aug 2nd, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Browser = require('zombie');
  2. Browser.localhost('www.patreon.com');
  3.  
  4. var browser = new Browser();
  5. console.log('browser created');
  6.  
  7. browser.visit('/login', function(done){
  8.     console.log('zombie visited /login');
  9.    
  10.     browser.assert.success();
  11.     browser.wait().then(function(){
  12.         console.log( browser.document.body.innerHTML );
  13.         browser
  14.             .fill('input[name=email]', credentials.email)
  15.             .fill('input[name=password]', credentials.password);
  16.  
  17.         browser.pressButton('Submit', function(done){
  18.             browser.assert.success();
  19.             browser.assert.text('title', 'Welcome To Brains Depot');
  20.             console.log('should be logged in');
  21.         });
  22.     });
  23. });
  24.  
  25. zombie visited /login
  26. Unhandled rejection https://www.patreon.com/login:script:2
  27.      Modernizr.addTest('patreon-flexbox-ie10-adjustment', Modernizr.testAllPro
  28.                                                                     ^
  29. TypeError: undefined is not a function
  30.     at https://www.patreon.com/login:script:2:72
  31.     at Object.exports.runInContext (vm.js:64:17)
  32.     at window._evaluate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement