Skip to content

Instantly share code, notes, and snippets.

@corinna000
Created October 18, 2013 16:22
Show Gist options
  • Save corinna000/7044003 to your computer and use it in GitHub Desktop.
Save corinna000/7044003 to your computer and use it in GitHub Desktop.
'use strict';
var World, chai, browser, path, webdriver, After;
chai = require('chai');
path = require('path');
webdriver = require('selenium-webdriver');
browser = new webdriver.Builder().usingServer(process.env.SELENIUM_HUB).withCapabilities(webdriver.Capabilities.firefox()).build();
browser.manage().timeouts().setScriptTimeout(10000);
World = (function() {
function World(callback) {
this.browser = browser
this.expect = chai.expect;
this.webdriver = webdriver;
callback();
}
return World;
})();
exports.World = World;
process.on('exit', function() {
// console.log(browser);
return browser.quit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment