How to use the zombie.Browser function in zombie

To help you get started, we’ve selected a few zombie examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bergie / VIE / test / nodejs / zombie-qunit.js View on Github external
server.listen(3000, function() {
        var location = "http://localhost:3000/test/index.html";
        var browser = new zombie.Browser({debug: false});
        browser.visit(location, function(err, browser, status) {
            // Start QUnit
            browser.fire('load', browser.window);

            browser.wait(function(err, browser) {
                qunitResults = browser.css('#qunit-tests > li');
                console.log(qunitResults.length);
                server.close();
                callback();
            });
        });
    });
};
github bergie / zombie-qunit / test / zombie-qunit.js View on Github external
server.listen(3000, function() {
        var location = "http://localhost:3000/qunit/index.html";
        var browser = new zombie.Browser({
            debug: false,
            userAgent: 'Zombie'
        });
        browser.visit(location, function(err, browser, status) {
            // Start QUnit
            browser.fire('load', browser.window);

            // If you have long tests, tweak the wait time here
            browser.wait(2000, function(err, browser) {
                qunitResults = browser.queryAll('#qunit-tests > li');
                server.close();
                callback();
            });
        });
    });
};
github bergie / create / test / nodejs / zombie-qunit.js View on Github external
server.listen(3000, function() {
        var location = "http://localhost:3000/test/index.html";
        var browser = new zombie.Browser({
            debug: false,
            userAgent: 'Zombie'
        });
        browser.visit(location, function(err, browser, status) {
            // Start QUnit
            browser.fire('load', browser.window);
            browser.wait(20000, function(err, browser) {
                qunitResults = browser.queryAll('#qunit-tests > li');
                server.close();
                callback();
            });
        });
    });
};
github minkphp / Mink / src / Behat / Mink / Driver / Zombie / server.js View on Github external
stream.on('end', function () {
    if (browser == null) {
      browser = new zombie.Browser();

      // Clean up old pointers
      pointers = [];
    }

    eval(buffer);
    buffer = "";
  });
}).listen(8124, '127.0.0.1');
github clux / modul8 / test / lib / brain.js View on Github external
function Brain (t) {
  this.t = t;
  this.browser = new zombie.Browser();
}
singles.forEach(function (s) {
github mileskin / zombie-jasmine-spike / spec / js / acceptance / foo-twitter-client-spec.js View on Github external
describe('twitter client', function() {
  var jasmine = require('jasmine-node')
  var zombie = require('zombie')
  var browser = new zombie.Browser()

  describe('initial', function() {
    it('has correct title', function() {
      whenPageHasLoaded(function() {
        expect(browser.text('title')).toEqual('Foo Twitter Client')
        jasmine.asyncSpecDone()
      })
    })

    it('has trends link', function() {
      whenPageHasLoaded(function() {
        expect(browser.text('.actions .showTrends')).toEqual('Trends')
        jasmine.asyncSpecDone()
      })
    })
  })
github admc / jellyfish / lib / env / zombieEnv.js View on Github external
zombieEnv.prototype.init = function(b) {
  var _this = this;  
  _this.target = new zombie.Browser();

  _this.target.on("error", function(err) {});
  _this.target.on("loaded", function() {});
  
  _this.target.visit(_this.startURL, function(err, browser, status) {
    _this.live = true;
    _this.tide = setInterval(function() {
      if (_this.live && _this.tid && (_this.queue.length != 0)) {
        var wave = _this.queue.shift();
        wave.fn(wave.cb);
      }
    }, 1000);

    _this.state = setInterval(function() {
      if (_this.live && _this.tid) {
        var ret = _this.target.evaluate("window.jfComplete");
github mikeal / spider / main.js View on Github external
function ZombieSpider (options) {
  var zombie = require('zombie');
  this.browser = new zombie.Browser({ debug: options });
  if (typeof options.runScripts !== 'undefined') {
    options.runScripts = false;
  }
  this.browser.runScripts = options.runScripts;
  
  this.get = function () {};
}
util.inherits(ZombieSpider, Spider);
github jbpros / cucumber-js-example / features / support / google_land.js View on Github external
var GoogleLand = function(world) {
  this.browser = new zombie.Browser({runScripts:true, debug:false, htmlParser: HTML5});
};
github ryanpetrello / python-zombie / zombie / proxy / server.js View on Github external
function ctx_switch(id){
    if(!CLIENTS[id])
        CLIENTS[id] = [new zombie.Browser(), []];
    return CLIENTS[id];
}

zombie

Insanely fast, full-stack, headless browser testing using Node.js

MIT
Latest version published 5 years ago

Package Health Score

56 / 100
Full package analysis