@leash/integration-puppeteer
v0.1.0
Published
Typed Puppeteer integration for Leash
Readme
@leash/integration-puppeteer
Typed Puppeteer integration for Leash — auto-generated by
leash-codegen.
Installation
npm install @leash/integration-puppeteerRequires @leash/sdk >= 0.2.0 as a peer dependency.
Usage
import { LeashIntegrations } from '@leash/sdk/integrations'
import { createPuppeteerClient } from '@leash/integration-puppeteer'
const leash = new LeashIntegrations({ apiKey: process.env.LEASH_API_KEY! })
const puppeteer = createPuppeteerClient(leash)
// Example: call puppeteerNavigate
const result = await puppeteer.puppeteerNavigate({ url: '...', launchOptions: {}, allowDangerous: true })Available Methods
puppeteerNavigate(params)— Navigate to a URLpuppeteerScreenshot(params)— Take a screenshot of the current page or a specific elementpuppeteerClick(params)— Click an element on the pagepuppeteerFill(params)— Fill out an input fieldpuppeteerSelect(params)— Select an element on the page with Select tagpuppeteerHover(params)— Hover an element on the pagepuppeteerEvaluate(params)— Execute JavaScript in the browser console
License
Apache-2.0
