Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
selenium.start(function (err, child) {
if (err) return done(err);
selenium.child = child;
});
});
.then(child => {
selenium.child = child;
})
.catch(e => {
selenium.start(function (err, child) {
if (err) return done(err);
selenium.child = child;
done();
});
});
.then(child => {
selenium.child = child;
})
.catch(e => {
selenium.start(function (err, child) {
if (err) return done(err);
selenium.child = child;
done();
});
});
.then(child => {
selenium.child = child;
})
.catch(e => {
selenium.start((err, child) => {
if (err) return done(err);
selenium.child = child;
done();
});
});
selenium.start(function(err, child) {
gutil.log('Selenium server started');
selenium.child = child;
done(err);
});
};
})).once('end', () => {
selenium.child.kill()
httpServer.close()
})
)
.once('end', function () {
selenium.child.kill();
});