Advertisement
Guest User

180upload remote upload

a guest
Oct 31st, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var xpath = require('casper').selectXPath;
  2. var casper = require('casper').create({
  3. viewportSize: {
  4. width: 1024,
  5. height: 768
  6. }
  7. });
  8. casper.start('http://www.180upload.com', function() {
  9. casper.click(xpath('//*[@id="r_url"]'));
  10. casper.evaluate(function() {
  11. document.getElementsByName('url_mass')[0].value = 'ftp://ftp.rdsor.ro/test/100M.dat';
  12. });
  13. this.capture('picture.png', {
  14. top: 0,
  15. left: 0,
  16. width: 1024,
  17. height: 768
  18. });
  19. casper.click(xpath('//*[@id="div_uf2"]/tbody/tr/td/center/input[2]'));
  20. });
  21.  
  22. casper.then(function() {
  23. this.capture('picture2.png', {
  24. top: 0,
  25. left: 0,
  26. width: 1024,
  27. height: 768
  28. });
  29. });
  30.  
  31. casper.then(function() {
  32. this.capture('picture3.png', {
  33. top: 0,
  34. left: 0,
  35. width: 1024,
  36. height: 768
  37. });
  38. });
  39.  
  40. casper.run(function() {
  41. this.echo('Done.').exit();
  42. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement