Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xpath = require('casper').selectXPath;
- var casper = require('casper').create({
- viewportSize: {
- width: 1024,
- height: 768
- }
- });
- casper.start('http://www.180upload.com', function() {
- casper.click(xpath('//*[@id="r_url"]'));
- casper.evaluate(function() {
- document.getElementsByName('url_mass')[0].value = 'ftp://ftp.rdsor.ro/test/100M.dat';
- });
- this.capture('picture.png', {
- top: 0,
- left: 0,
- width: 1024,
- height: 768
- });
- casper.click(xpath('//*[@id="div_uf2"]/tbody/tr/td/center/input[2]'));
- });
- casper.then(function() {
- this.capture('picture2.png', {
- top: 0,
- left: 0,
- width: 1024,
- height: 768
- });
- });
- casper.then(function() {
- this.capture('picture3.png', {
- top: 0,
- left: 0,
- width: 1024,
- height: 768
- });
- });
- casper.run(function() {
- this.echo('Done.').exit();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement