【发布时间】:2015-06-19 16:25:10
【问题描述】:
当我按照本教程 (http://phantomjs.org/screen-capture.html) 进行屏幕截图时,我遇到了一些关于动态数据可视化的问题。
在该教程中,它使用了如下代码:
var page = require('webpage').create();
page.open('http://localhost:8080/index.html', function() {
page.render('screenshot.png');
phantom.exit();
});
但这似乎只适用于静态页面。我想知道我是否进行了一些用户交互并更改了该页面(例如鼠标单击更改颜色等),如何我可以捕获显示当前屏幕?
如果 phantomjs 不能以这种方式工作,谁能提出其他解决方案?
【问题讨论】:
标签: javascript phantomjs screenshot