How to use the zombie.create 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 repat / Grafari / zombie.js View on Github external
var Browser = require('zombie');
var graph = require('fbgraph');

var city = 'Hamburg, Germany';


Browser.localhost('https://www.facebook.com');

var browser = Browser.create();

browser.visit('/login.php')
  .then( function (error) {

    // FB login
    browser.fill('email', 'haw-mi@wegwerfemail.de');
    browser.fill('pass', 'geheim123');
    return browser.pressButton('login');
  })
  .done( function(error) {

    // Form submitted, new page loaded.
    //browser.assert.success();

    // Suchfeld befüllen
    //console.log(browser.text('._586j'));
github tidepool-org / blip / integration / support / world.js View on Github external
function World() {
  this.browser = zombie.create(); // this.browser will be available in step definitions
  this.browser.silent = true;
  this.host = 'http://localhost:'+ PORT;

  this.setHost = function(host) {
    this.host = host;
  };

  this.visit = function (path, callback) {
    this.browser.visit(this.host + path, callback);
  };
}
github repat / Grafari / backend / graph-search.js View on Github external
// Dependencies
var async = require('async');
var Browser = require('zombie');
var fs = require('fs');
var restify = require('restify');
var graph = require('./lib/graph.js');

const FB_EMAIL = "your@email.com";
const FB_PASSWORD = "YourSuperSecretPassword";


// bootstrap
Browser.localhost('https://www.facebook.com');
var browser = Browser.create();

var server = restify.createServer({
    name: 'Grafari'
});
server.get('/searchPeopleByCity/:city', searchPeopleByCity);
server.head('/searchPeopleByCity/:city', searchPeopleByCity);
server.get('/searchPersonByName/:name', searchPersonByName);
server.head('/searchPersonByName/:name', searchPersonByName);


// program execution
async.series({
    facebookLogin: function(callback) {

        console.log('---\nloginFacebook');
github repat / Grafari / backend / testzombie.js View on Github external
var Zombie = require("zombie")
var fs = require("fs")

Zombie.localhost('https://www.facebook.com')
var browser = Zombie.create();

exports.browser = browser

if (fs.existsSync("./cookies.tmp")) {
    console.log("Loading cookies from file...") //And omitting login
    fs.readFile("./cookies.tmp", function(err, cookies) {
        browser.loadCookies(cookies.toString())
        browser.visit("/search/males", function(e) { //Browser must visit a page
            if (e)
                console.log("Error while loading file: " + JSON.stringify(e))
            else
                console.log("Page loaded")
        })
    })
} else { //Default login procedure
    console.log("Missing cookie file")
github repat / Grafari / backend / lib / browser.js View on Github external
function startBrowser(callback) {
    var browser = Zombie.create();

    if (fs.existsSync("./cookies.tmp")) {
        console.log("Loading cookies from file...") //And omitting login
        fs.readFile("./cookies.tmp", function(err, cookies) {

            browser.loadCookies(cookies.toString())
            browser.visit("/", function(e) { //Browser must visit a page
                return callback(e, browser)
            })
        })
    } else { //Default login procedure
        async.series([

                function(cb) {
                    browser.visit('/login.php', cb);
                },
github Adezandee / cucumber-mink / lib / driver / zombie.js View on Github external
this.World = function World(callback) {
    this.browser = Zombie.create({runScripts: true, debug: false});
    callback();
  };

zombie

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

MIT
Latest version published 6 years ago

Package Health Score

56 / 100
Full package analysis