effect-playwright
    Preparing search index...
    • Provides a scoped PlaywrightBrowser service, allowing you to access the browser from the context (e.g. by yielding PlaywrightBrowser).

      You will need to provide the PlaywrightEnvironment layer first.

      This will start a browser and close it when the scope is closed.

      Type Parameters

      • A
      • E
      • R

      Parameters

      Returns Effect<
          A,
          PlaywrightError
          | E,

              | PlaywrightEnvironment.PlaywrightEnvironment
              | Exclude<Exclude<R, PlaywrightBrowser>, Scope>,
      >

      import { PlaywrightEnvironment } from "effect-playwright/experimental";
      import { chromium } from "playwright-core";

      const env = PlaywrightEnvironment.layer(chromium);

      const program = Effect.gen(function* () {
      const browser = yield* PlaywrightBrowser;
      const page = yield* browser.newPage();
      yield* page.goto("https://example.com");
      }).pipe(PlaywrightEnvironment.withBrowser, Effect.provide(env));

      0.1.0