Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.install(function (error) {
if (error) {
log.error('[selenium]', error);
callback(error);
return;
}
if (!self.seleniumStandaloneOptions.seleniumArgs) {
self.seleniumStandaloneOptions.seleniumArgs = [];
}
self.seleniumStandaloneOptions.seleniumArgs.push('-port', port);
if (process.env['chimp.log'] === 'verbose' || process.env['chimp.log'] === 'debug') {
self.options.seleniumDebug = true;
}
if (self.options.seleniumDebug) {
self.seleniumStandaloneOptions.seleniumArgs.push('-debug');
}
log.debug('\n[chimp][selenium] hub can be seen at http://localhost:' + port + '/wd/hub');
selenium.start(self.seleniumStandaloneOptions, function (error, seleniumChild) {
self.child = seleniumChild;
if (error) {
callback(error);
return;
self.install(function (error) {
if (error) {
log.error('[selenium]', error);
callback(error);
return;
}
self.seleniumStandaloneOptions.seleniumArgs = ['-port', port];
if (process.env['chimp.log'] === 'verbose' || process.env['chimp.log'] === 'debug') {
self.options.seleniumDebug = true;
}
if (self.options.seleniumDebug) {
self.seleniumStandaloneOptions.seleniumArgs.push('-debug');
}
log.debug('\n[chimp][selenium] hub can be seen at http://localhost:' + port + '/wd/hub');
selenium.start(self.seleniumStandaloneOptions, function (error, seleniumChild) {
self.child = seleniumChild;
if (error) {
callback(error);
return;