ReadonlyclickClicks the element.
ReadonlycountCounts the number of matched elements.
ReadonlyevaluateEvaluates a function on the matched element.
import { PlaywrightBrowser } from "effect-playwright";
import { PlaywrightEnvironment } from "effect-playwright/experimental";
import { chromium } from "@playwright/test";
import { Effect } from "effect";
const program = Effect.gen(function* () {
const browser = yield* PlaywrightBrowser;
const page = yield* browser.newPage();
const locator = yield* page.locator("button");
const buttonContent = yield* locator.evaluate((button) => button.textContent());
}).pipe(PlaywrightEnvironment.provideBrowser, Effect.provide(PlaywrightEnvironment.layer(chromium)));
ReadonlyfillFills the input field.
ReadonlyfirstReturns a locator that points to the first matched element.
ReadonlygetGets an attribute value.
ReadonlyinnerGets the inner HTML.
ReadonlyinnerGets the inner text.
ReadonlyinputGets the input value.
ReadonlylastReturns a locator that points to the last matched element.
ReadonlynthReturns a locator that points to the nth matched element.
ReadonlytextGets the text content.
ReadonlyuseA generic utility to execute any promise-based method on the underlying Playwright Locator.
Can be used to access any Locator functionality not directly exposed by this service.
A function that takes the Playwright Locator and returns a Promise.
An effect that wraps the promise and returns its result.
Interface for a Playwright locator.