The native Playwright locator to wrap.
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);
});
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.