# jellyfish **Repository Path**: mirrors_mikeal/jellyfish ## Basic Information - **Project Name**: jellyfish - **Description**: Run your Javascript anywhere. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2025-09-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Jellyfish -- Browser launcher and Javascript execution engine. ## Install
npm install jellyfish
Or from source:
git clone git://github.com/admc/jellyfish.git 
cd jellyfish
npm link .
## Platforms MacOSX 10.6
Ubuntu 10.x ## Browsers Firefox 3.x, 4b
Google Chrome
Zombie (headless node.js browser) ## Usage npm require
var jellyfish = require('jellyfish'),
  , assert = require('assert');
init a browser (createFirefox, createChrome, createZombie)
var browser = jellyfish.createFirefox();
goto a web site
browser.go("http://www.jelly.io")
verify the title
.js("document.title", function(o) {
  assert.equal(o.result, "Jelly.io: Jellyfish Home")
})
run some local javascript
.jsfile("./test.js", function(o) {
  assert.equal(o.result, "alerted: Jellyfish local file loaded successfully!")
})
run some remote javascript, stop the browser, then exit
.jsurl("http://jelly.io/test.js", function(o) { 
  assert.equal(o.result, "alerted: Jellyfish remote file loaded successfully!")
  browser.stop(function() {
    process.exit();
  })
})
## User Simulation
var browser = jellyfish.(createFirefox, createChrome, createZombie)();
browser.go("http://www.google.com")
  .js("document.title", function(o) {
    assert.equal(o.result,"Google")
  })
  .user("type", { query:'input[name="q"]', text:'test string'}, function(o) {
    assert.equal(o.result, true);
  })
  .js("$jfQ('input[name=\"q\"]')[0].value", function(o) {
    assert.equal(o.result, 'test string');
  })
  .user("click", { query:'input[name="btnG"]' }, function(o) {
    assert.equal(o.result, true);
    
    browser.stop(function() {
      process.exit();
    });
  })