Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
browser.addCommand('capture', function (name) {
name = name.replace(/[ \\~#%&*{}/:<>?|"-]/g, '_');
var location = browser.screenshotsCount++ + '_' + name + '.png';
fs.mkdirsSync(process.env['chimp.screenshotsPath']);
var ssPath = path.join(process.env['chimp.screenshotsPath'], location);
log.debug('[chimp][helper] saving screenshot to', ssPath);
this.saveScreenshot(ssPath, false);
log.debug('[chimp][helper] saved screenshot to', ssPath);
});
browser.addCommand('capture', function (name) {
name = name.replace(/[ \\~#%&*{}/:<>?|"-]/g, '_');
var location = (browser.screenshotsCount++) + '_' + name + '.png';
fs.mkdirsSync(process.env['chimp.screenshotsPath']);
var ssPath = path.join(process.env['chimp.screenshotsPath'], location);
log.debug('[chimp][helper] saving screenshot to', ssPath);
this.saveScreenshot(ssPath, false);
log.debug('[chimp][helper] saved screenshot to', ssPath);
});
browser.addCommand('capture', function (name) {
name = name.replace(/[ \\~#%&*{}/:<>?|"-]/g, '_');
var location = (browser.screenshotsCount++) + '_' + name + '.png';
fs.mkdirsSync(process.env['chimp.screenshotsPath']);
var ssPath = path.join(process.env['chimp.screenshotsPath'], location);
log.debug('[chimp][helper] saving screenshot to', ssPath);
this.saveScreenshot(ssPath, false);
log.debug('[chimp][helper] saved screenshot to', ssPath);
});
browser.addCommand('capture', function (name) {
name = name.replace(/[ \\~#%&*{}/:<>?|"-]/g, '_');
var location = browser.screenshotsCount++ + '_' + name + '.png';
fs.mkdirsSync(process.env['chimp.screenshotsPath']);
var ssPath = path.join(process.env['chimp.screenshotsPath'], location);
log.debug('[chimp][helper] saving screenshot to', ssPath);
this.saveScreenshot(ssPath, false);
log.debug('[chimp][helper] saved screenshot to', ssPath);
});