webdriver-manager
Advanced tools
Comparing version 5.0.0 to 5.1.0
@@ -17,3 +17,6 @@ var WebdriverManager = require('./lib/index'); | ||
// Start selenium (close on input received in stdin) | ||
wm.start({closeOnStdinInput: true}); | ||
wm.start({closeOnStdinInput: true}, function (err) { | ||
console.log('Selenium started. Exiting now.'); | ||
wm.stop(); | ||
}); | ||
}); | ||
@@ -20,0 +23,0 @@ |
@@ -236,6 +236,7 @@ var fs = require('fs'); | ||
* stdin is received. | ||
* @param {Function} [cb] Callback called once selenium has started. | ||
* | ||
* @method | ||
*/ | ||
WebdriverManager.prototype.start = function (options) { | ||
WebdriverManager.prototype.start = function (options, cb) { | ||
options = options || {}; | ||
@@ -245,2 +246,3 @@ options.seleniumPort = options.seleniumPort || 4444; | ||
cb = cb || function () { }; | ||
var self = this; | ||
@@ -287,4 +289,16 @@ | ||
}); | ||
// TODO Obtain URL from options | ||
request('http://localhost:' + options.seleniumPort + '/wd/hub/status', function (err, response, body) { | ||
if (err) { | ||
return cb(err); | ||
} | ||
if (response.statusCode === 200) { | ||
return cb(null); | ||
} | ||
return cb(response); | ||
}); | ||
}); | ||
return selenium; | ||
@@ -291,0 +305,0 @@ }; |
{ | ||
"name": "webdriver-manager", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Protactor's webdriver-manager as a standalone Node.js module.", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -9,2 +9,5 @@ # Webdriver Manager | ||
### [5.1.0] - 2015-05-18 | ||
- Added optional callback to `start(options, cb)` method. `cb` will be executed once selenium server has started. | ||
### [5.0.0] - 2015-04-18 | ||
@@ -11,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16312
371
27