Scriptable Headless Internet Explorer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
SpecterJS
docs/compatibility/modules Update compatibility tables Jun 10, 2016
.gitattributes
.gitignore
LICENSE Add license May 18, 2016
SpecterJS.sln Refactor modules Aug 15, 2017
readme.md Minor readme.md update Jun 10, 2016

readme.md

SpecterJS

THIS IS A WORK IN PROGRESS

SpecterJS is a scriptable headless browser with Internet Explorer bindings. SpecterJS aims to provide full API compatibility with PhantomJS.

SpecterJS is suitable for:

  • Website testing
  • Page automation
  • Screen capture
  • Web scraping
  • Network monitoring
  • etc.

Usage

Example:

> specterjs example.js
var page = require('webpage').create();
var url = 'http://www.google.com/';

page.viewportSize = {
  width: 800,
  height: 600
};

console.log("Loading web page: " + url);
page.open(url, function (status) {
  console.log("Rendering page to screenshot.png");
  page.render("screenshot.png");
  phantom.exit();
});

For more examples please visit phantomjs.org/examples/. For command-line options refer to the compatibility table below.

Compatibility

Modules

Module Status
child_process Implemented
cookiejar Not Implemented
fs Implemented
system Implemented
webpage ⚠️ Partially implemented
webserver Implemented

Command Line Interface

Usage

  specterjs [options] [script] [argument [argument [...]]]

Note: Executing SpecterJS without any arguments will engage Interactive Mode (REPL).

Options

Option Status
--cookies-file= Not implemented
--config= Implemented
--debug= Not implemented
--disk-cache= Not implemented
--disk-cache-path= Not implemented
--ignore-ssl-errors= Implemented
--load-images= Not implemented
--local-url-access= Not implemented
--local-storage-path= Not implemented
--local-storage-quota= Not implemented
--offline-storage-path= Not implemented
--offline-storage-quota= Not implemented
--local-to-remote-url-access= Not implemented
--max-disk-cache-size= Not implemented
--output-encoding= Implemented
--remote-debugger-port= Not implemented
--remote-debugger-autoru=n Not implemented
--proxy= Not implemented
--proxy-auth= Not implemented
--proxy-type= Not implemented
--script-encoding= Not implemented
--script-language= Not implemented
--web-security= Not implemented
--ssl-protocol= Not implemented
--ssl-ciphers= Not implemented
--ssl-certificates-path= Not implemented
--ssl-client-certificate-file= Not implemented
--ssl-client-key-file= Not implemented
--ssl-client-key-passphrase= Not implemented
--webdriver= Not implemented
--webdriver-logfile= Not implemented
--webdriver-loglevel= Not implemented
--webdriver-selenium-grid-hub= Not implemented
-w, --wd Not implemented
-h, --help Implemented
-v, --version Not implemented

Added options

Option Valid values Description
--emulation-mode= ie7, ie8, ie9, ie10, ie11 or edge Sets the emulation mode for Internet Explorer.

JavaScript globals

Global Status Notes
phantom Implemented
require() Implemented
console ⚠️ Partially implemented .log(), .error() and .info() are implemented so far.
setTimeout() Implemented
setInterval() Implemented
clearTimeout() Implemented
clearInterval() Implemented

Contributing

If you find any bugs, please report them in the issue tracker.

Pull requests are welcome!