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

Function selectorsShot

core/util/runPlaywright.js:483–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

481 };
482
483 const selectorsShot = async () => {
484 for (let i = 0; i < selectors.length; i++) {
485 const selector = selectors[i];
486 filePath = selectorMap[selector].filePath;
487 ensureDirectoryPath(filePath);
488 try {
489 await selectorShot(selector, filePath);
490 } catch (e) {
491 console.log(chalk.red(`Error capturing Element ${selector}`), e);
492 return fs.copy(config.env.backstop + ERROR_SELECTOR_PATH, filePath);
493 }
494 }
495 };
496 await selectorsShot();
497 }
498}

Callers 1

captureScreenshotFunction · 0.70

Calls 2

ensureDirectoryPathFunction · 0.85
selectorShotFunction · 0.70

Tested by

no test coverage detected