with Playwright and Delay?
Delay the execution of your workflow for a specific amount of time (does not count against your compute time).
Generates a pdf of the page and store it on /tmp directory. See the documentation
Store a new screenshot file on /tmp directory. See the documentation
Playwright is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol. Playwright runs in headless mode on Chromium on Pipedream.
Using Playwright you can perform tasks including:
import { playwright } from '@pipedream/browsers';
export default defineComponent({
  async run({steps, $}) {
    const browser = await playwright.launch();
    
    // Interact with the web page programmatically
    // See Playwright's Page documentation for available methods:
    // https://playwright.dev/docs/api/class-page
    const page = await browser.newPage();
    await page.goto('https://pipedream.com/');
    const title = await page.title();
    const content = await page.content();
    // Close context and browser otherwise the step will hang
    await page.context().close()
    await browser.close();
    return { title, content }
  },
})
The Delay API in Pipedream is a built-in function that allows you to pause a workflow for a specified amount of time. This can be incredibly useful when you need to stagger API calls to avoid rate limits, wait for an external process to complete, or simply introduce a delay between actions in a sequence. With precision up to milliseconds, the Delay API provides a simple yet powerful tool for managing timing in automation workflows.
export default defineComponent({
  async run({steps, $}) {
    // Specify the amount of time to delay your workflow in milliseconds
    return $.flow.delay(5000)
  },
})