-
Notifications
You must be signed in to change notification settings - Fork 4
/
Ashish.js
74 lines (66 loc) · 1.96 KB
/
Ashish.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*const casper = require('casper').create();*/
/*
casper.start('http://www.ashishkrgoyal.me/', function() {
this.capture('./output/google.png', {
top: 100,
left: 100,
width: 500,
height: 400
});
});
*/
/*casper.start('http://www.google.fr/', function() {
var url = 'http://www.google.fr/intl/fr/about/corporate/company/';
this.download(url, 'google_company.html');
});
casper.run(function() {
this.echo('Done.').exit();
});*/
/*casper.test.begin('a twitter bootstrap dropdown can be opened', 2, function(test) {
casper.start('http://getbootstrap.com/2.3.2/javascript.html#dropdowns', function() {
test.assertExists('#navbar-example');
this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle');
this.waitUntilVisible('#dropdowns .nav-pills .open', function() {
test.pass('Dropdown is open');
});
}).run(function() {
test.done();
});
});*/
/*var page = require('webpage').create(),
system = require('system'),
t, address;
if (system.args.length === 1) {
console.log('Usage: loadspeed.js <some URL>');
phantom.exit(1);
} else {
t = Date.now();
address = system.args[1];
page.open(address, function (status) {
if (status !== 'success') {
console.log('FAIL to load the address');
} else {
t = Date.now() - t;
console.log('Page title is ' + page.evaluate(function () {
return document.title;
}));
console.log('Loading time ' + t + ' msec');
}
phantom.exit();
});
}*/
/*
casper.run();*/
var page = require('webpage').create();
page.viewportSize = { width: 1024, height: 768 };
page.open('http://jiit.ac.in', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('./example.png');
console.log("A!!");
}
phantom.exit();
});
/*
console.log("Ashish");
phantom.exit();*/