phantomjs example how to create a screenshot of indexdata.com
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 30 Jan 2014 17:37:24 +0000 (17:37 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 30 Jan 2014 17:37:24 +0000 (17:37 +0000)
test/spec-dev/screenshot.js [new file with mode: 0644]

diff --git a/test/spec-dev/screenshot.js b/test/spec-dev/screenshot.js
new file mode 100644 (file)
index 0000000..18b03c3
--- /dev/null
@@ -0,0 +1,12 @@
+// run: phantomjs /path/to/this/file
+
+var url = 'http://www.indexdata.com/';
+var file_png = "indexdata.png";
+
+var page = require('webpage').create();
+
+page.open(url, function () {
+    page.render(file_png);
+    phantom.exit();
+});
+