How to use webdriverjs - 7 common examples

To help you get started, we’ve selected a few webdriverjs 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 howardjones / network-weathermap / test-suite / browser-tests / client.js View on Github external
// Use webdriverjs to create a Selenium Client
exports.client = require('webdriverjs').remote({
	desiredCapabilities : {
		// // You may choose other browsers
		// //
		// http://code.google.com/p/selenium/wiki/DesiredCapabilities
		browserName : 'phantomjs'
	}
// // webdriverjs has a lot of output which
// is generally useless
// // However, if anything goes wrong,
// remove this to see more details
// logLevel: 'silent'
});
//                                              
// exports.client.init();
github infor-design / enterprise / test / webdriver.js View on Github external
before(function(){
    client = webdriverjs.remote({
      host: 'usmvvwdev67.infor.com',
      port: 4444});

    client.init();

    app.locals.enableLiveReload = false;
    server = app.listen(3001);
  });
github bjnortier / shapesmith / test / functional / client.js View on Github external
var remote = require('webdriverjs').remote,
    chai = require('chai'),
    http = require('http'),
    assert = chai.assert;
chai.Assertion.includeStack = true;

var client = remote({
    logLevel: 'silent',
    desiredCapabilities:{
        browserName:"chrome",
    },
});
client.baseUrl = 'http://localhost:8001';
client.testDesignName = '__test__'

before(function(done) {
    this.timeout(20000);
    client.initDesign(done);

});

beforeEach(function(done) {
    this.timeout(20000);
github vijumathew / playbot / selenium / apk.js View on Github external
var webdriverjs = require('webdriverjs');
var selenium = require('selenium-standalone');

var seleniumServer = selenium({stdio: 'pipe'});

var driverOptions = {
    desiredCapabilities: {
        browserName: 'chrome'
    }
};
var client = webdriverjs.remote(driverOptions);


seleniumServer.stdout.on('data', function(output) {
    var val = output.toString().trim();
    console.log(val);
    if(val.indexOf('jetty.jetty.Server')>-1){
        client = client.init();
        start();
    }
});

seleniumServer.stderr.on('data', function (data) {
  console.log('stderr: ' + data);
});

seleniumServer.on('close', function (code) {
github vijumathew / playbot / lib / script_runner.js View on Github external
startSelenium: function(callback) {

    var webdriverjs = require('webdriverjs');
    var driverOptions = {
      desiredCapabilities: {
        browserName: 'chrome'
      }
    };
    var client = webdriverjs.remote(driverOptions);

    var selenium = require('selenium-standalone');
    var seleniumServer = selenium({stdio: 'pipe'});

    seleniumServer.stdout.on('data', function(output) {
      var val = output.toString().trim();
      //console.log(val);
      if(val.indexOf('jetty.jetty.Server')>-1){
        client = client.init();
        callback(client);
        client.end();
      }
    });

    seleniumServer.stderr.on('data', function (data) {
      //console.log('stderr: ' + data);
github sapo / Ink / src / js / serverUtils / selGridTest2.js View on Github external
throw new Error('Do not have a profile for the browser "' + brName + '"!');
        }
        var cfg = {
            logLevel: 'silent',
            host: HOST,
            port: PORT,
            platform: 'ANY',
            desiredCapabilities: {
                browserName: prof[0]
            }
        };
        if (prof[1]) {
            cfg.desiredCapabilities.version = prof[1];
        }

        var br = webdriverjs.remote(cfg);

        //console.log('TESTING ' + brName + '...');

        br.testMode();
        br.init();

        fn(br, brName, qUnit);
    });
};
github zzo / baseapp / spec / webdriver / loginSpec.js View on Github external
beforeEach(function(done) {
        client = webdriverjs.remote({ desiredCapabilities: { browserName: process.env.BROWSER }});
        client.init()
            .url("http://" + process.env.HOST + ':' + process.env.PORT)
            .pause(500, done);
    });

webdriverjs

A nodejs bindings implementation for selenium 2.0/webdriver

MIT
Latest version published 10 years ago

Package Health Score

67 / 100
Full package analysis

Popular webdriverjs functions