effect-playwright
    Preparing search index...

    Function makeLocator

    • Creates a Locator from a native Playwright locator.

      When to use

      Use this constructor after an escape-hatch operation returns a native locator that should re-enter the Effect wrapper API.

      Parameters

      • locator: Locator

        The native Playwright locator to wrap.

      Returns Playwright.Locator

      import { Effect } from "effect";
      import { Playwright } from "effect-playwright";

      const program = Effect.gen(function* () {
      const locator = yield* Playwright.Locator;
      const nativeLocator = yield* locator.use(async (nativeLocator) =>
      nativeLocator.locator("button"),
      );
      return Playwright.makeLocator(nativeLocator);
      });

      0.1.0