Package Exports
- franklin-bulk-shared
- franklin-bulk-shared/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (franklin-bulk-shared) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Franklin Bulk Operations Shared Library
Install
npm install https://gitpkg.now.sh/catalan-adobe/franklin-bulk-sharedUsage
Sample script that takes a screenshot of the bottom of a page:
// take-screenshot.js
import * as franklin from 'franklin-bulk-shared';
// init headless browser
const [browser, page] = await franklin.Puppeteer.initBrowser();
// load test page
await page.goto('https://www.hlx.live');
// scroll down
await franklin.Puppeteer.scrollDown(page);
// wait 1s.
await franklin.Time.sleep(1000);
// take a screenshot
await page.screenshot({
fullPage: false,
path: 'screenshot.png'
});
// close browser
await browser.close();Domains
- Puppeteer (
initBrowserAgent,scrollDown,scrollUp) - Time (
sleep,randomSleep)