mirror of
https://github.com/encounter/phantomjs.git
synced 2026-03-30 11:35:11 -07:00
784a06c3a7
The server runs on port 9180 and serves the content from test/www directory. Any tests can use this base URL to load test content and to exercise certain PhantomJS API. https://github.com/ariya/phantomjs/issues/12439
14 lines
417 B
JavaScript
14 lines
417 B
JavaScript
var assert = require('../../assert');
|
|
var webpage = require('webpage');
|
|
|
|
var page = webpage.create();
|
|
assert.typeOf(page, 'object');
|
|
|
|
page.open('http://localhost:9180/hello.html', function (status) {
|
|
assert.equal(status, 'success');
|
|
assert.typeOf(page.title, 'string');
|
|
assert.equal(page.title, 'Hello');
|
|
assert.typeOf(page.plainText, 'string');
|
|
assert.equal(page.plainText, 'Hello, world!');
|
|
});
|