Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple way to automate tasks in a headless browser.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.jshintrc
Gruntfile.js
LICENSE.txt
README.md
package.json

README.md

eidolon

A simple way to automate tasks in a headless browser.

DEPRECATED

This package was made ages ago and makes baby Jesus cry with how badly it works. Feel free to mess with it but I'm not responsible if you accidentally raise Hells minions.

How it Works

Eidolon works through a series of "steps" defined in a configuration file and, optionally, paired with a data file.

Example

Here is a basic example of performing a search using Google

Configuration: google.json

{
    "name": "Example Job",
    "initURL": "https://www.google.com",
    "steps": [
        {
            "name": "Google 'Google'",
            "confirm": {
                "selector": "title",
                "attribute": "text",
                "value": "Google"
            },
            "link": {
                "selector": "form[action='/search']",
                "submit": true
            }
        },
        {
            "name": "Click First Result",
            "confirm": {
                "selector": "h3.r",
                "exists": true
            },
            "link": {
                "selector": "h3.r:first-child a",
                "follow": true
            }
        }
    ]
}

Data: google-data.json

{
    "name": "Example Job",
    "steps": [
        {
            "name": "Google 'Eidolon'",
            "fields": {
                "input[name='q']": {
                    "value": "Eidolon",
                    "keypress": true,
                    "enter": true
                }
            }
        }
    ]
}

app.js

var eidolon = require('eidolon');

eidolon.createJob({
    autostart: true,
    configPath: require.resolve('./google.json'),
    dataPath: require.resolve('./google-data.json')
});

This will run a job which searches Google for "Eidolon."

More comprehensive documentation coming later.

Something went wrong with that request. Please try again.