{"repo":"Jobflow-io/effect-playwright","free":true,"listed":false,"github":"https://github.com/Jobflow-io/effect-playwright","clone":"git clone https://github.com/Jobflow-io/effect-playwright.git","description":"A Playwright library wrapper for effect-ts.","language":"TypeScript","stars":36,"topics":["effect","effect-ts","playwright","typescript"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"effect-playwright A Playwright wrapper for the Effect ecosystem. This library provides a set of services and layers to interact with Playwright in a type-safe way using Effect. Playwright Test Integration is also supported. Installation Browser installation is not required if connecting to an existing browser via CDP or using a local browser. Quick Start Managing Lifecycle Using launchScoped is the recommended way to manage the browser lifecycle. It ensures that the browser is closed automatically when the effect's scope ends, preventing resource leaks. Connecting via CDP You can connect to an existing browser instance using the Chrome DevTools Protocol (CDP). If you need to manage the connection lifecycle manually, use connectCDP : PlaywrightEnvironment (Experimental) The PlaywrightEnvironment simplifies setup by allowing you to configure the browser type and launch options once and reuse them across your application. Usage PlaywrightEnvironment.withBrowser The withBrowser utility provides the PlaywrightBrowser service to your effect. It internally manages a Scope , which means the browser will be launched when the effect starts and closed automatically when the effect finishes (including on failure or interruption). Event Handling You can listen to Playwright events using the eventStream method. This returns an Effect Stream that emits events as they occur. [!NOTE] eventStream emits \"Effectified\" wrappers (e.g., PlaywrightRequest , PlaywrightResponse , PlaywrightPage ) for ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Jobflow-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Jobflow-io/effect-playwright/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}