effect-playwright
    Preparing search index...
    withBrowser: <A, E, R>(
        self: Effect<A, E, R>,
    ) => Effect<
        A,
        PlaywrightError
        | E,
        PlaywrightEnvironment.PlaywrightEnvironment | Exclude<R, PlaywrightBrowser>,
    > = ...

    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.

    Type Declaration

    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