Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

andyjansson/specterjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Scriptable Headless Internet Explorer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published