MCPcopy Create free account
hub / github.com/garris/BackstopJS / selectorsShot

Function selectorsShot

core/util/runPuppet.js:446–460  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444 };
445
446 const selectorsShot = async () => {
447 for (let i = 0; i < selectors.length; i++) {
448 const selector = selectors[i];
449 filePath = selectorMap[selector].filePath;
450 logFilePath = selectorMap[selector].logFilePath;
451 ensureDirectoryPath(filePath);
452 try {
453 await selectorShot(selector, filePath, logFilePath);
454 } catch (e) {
455 logger.log('red', `Error capturing Element ${selector}`, e);
456 await writeScenarioLogs(config, logFilePath, logger);
457 return fs.copy(config.env.backstop + ERROR_SELECTOR_PATH, filePath);
458 }
459 }
460 };
461 await selectorsShot();
462 }
463}

Callers 1

captureScreenshotFunction · 0.70

Calls 3

ensureDirectoryPathFunction · 0.85
writeScenarioLogsFunction · 0.85
selectorShotFunction · 0.70

Tested by

no test coverage detected