PhantomJS
“PhantomJS is aheadless WebKit with
JavaScript API. It has fast and native
support for various web standards:
DOM handling, CSS selector, JSON,
Canvas, and SVG.”
— http://phantomjs.org/
12.
PhantomJS
“PhantomJS is aheadless WebKit with
JavaScript API. It has fast and native
support for various web standards:
DOM handling, CSS selector, JSON,
Canvas, and SVG.”
— http://phantomjs.org/
JavaScript API
var page = require('webpage').create();
var url = 'http://www.phantomjs.org/';
page.open(url, function (status) {
//Page is loaded!
phantom.exit();
});
• PhantomJS の JS API でブラウジング
- new WebPage()
• Web ページとは別のコンテキストで実行
“Wight”
"Wight is aMiddle English word, from
Old English wiht, and used to describe a
creature or living sentient being. It is
akin to Old High German wiht, meaning
a creature or thing."
Test::Wight
my $w= Test::Wight->new;
my $port = $w->spawn_psgi($app);
$w->visit('/');
is $w->evaluate('document.title'), 'title';
my $link = $wight->find('//p/a')
$link->click;
is $w->current_url->path, '/foo';