@pipedream/browsers
package into your Node.js code step and launch a browser. Pipedream will start Chromium and launch a Puppeteer or Playwright Browser instance for you.
@pipedream/browsers
package exports two modules: puppeteer
& playwright
. Both modules share the same interface:
browser(opts?)
- method to instantiate a new browser (returns a browser instance)launch(opts?)
- an alias to browser()newPage()
- creates a new page instance and returns both the page & browserpuppeteer
module from @pipedream/browsers
and use browser()
or launch()
method to instantiate a browser.
Then using this browser you can open new Pages, which have individual controls to open URLs:
/tmp
directory:/tmp
:Page.type
accepts a CSS selector and a string to type into the field.playwright
module from @pipedream/browsers
and use browser()
or launch()
method to instantiate a browser.
Then using this browser you can open new Pages, which have individual controls to open URLs, click elements, generate screenshots and type and more:
/tmp
directory:/tmp
:Page.type
accepts a CSS selector and a string to type into the selected element.@pipedream/browsers
package can be used in actions as well as sources.
The steps are the same as usage in Node.js code. Open a browser, create a page, and close the browser at the end of the code step.
@pipedream/browsers
package includes a specific version of Chromium that is compatible with Pipedream Node.js execution environments that run your code.
For details on the specific versions of Chromium, puppeeter and playwright bundled in this package, visit the package’s README.
puppeteer.launch()
?puppeteer.launch()
to customize the browser instance, you can pass them directly to puppeteer.browser()
.
For example, you can alter the protocolTimeout
length just by passing it as an argument:
@pipedream/browsers
source code for the default arguments that Pipedream provides.
puppeteer.connect()
?puppeteer.connect()
to connect to a remote browser instance, you can use the puppeteer-core
package:
puppeteer-core
does not download Chrome when installed, which decreases the size of your deployment and can improve cold start times.
To connect to a remote browser instance using Playwright, you can use the playwright-core
package, which is the no-browser Playwright package: