UNPKG

@serenity-js/playwright

Version:

Adapter that integrates @serenity-js/web with Playwright, enabling Serenity/JS reporting and using the Screenplay Pattern to write component and end-to-end test scenarios

31 lines 1.5 kB
import type { PageElement, RootLocator, Selector } from '@serenity-js/web'; import { Locator } from '@serenity-js/web'; import type * as playwright from 'playwright-core'; import type { PlaywrightRootLocator } from './PlaywrightRootLocator'; /** * Playwright-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/). * * @group Models */ export declare class PlaywrightLocator extends Locator<playwright.Locator, string> { constructor(parent: RootLocator<playwright.Locator>, selector: Selector); protected nativeSelector(): string; isPresent(): Promise<boolean>; nativeElement(): Promise<playwright.Locator>; allNativeElements(): Promise<Array<playwright.Locator>>; of(parent: PlaywrightRootLocator): Locator<playwright.Locator, string>; closestTo(child: PlaywrightLocator): Locator<playwright.Locator, string>; locate(child: PlaywrightLocator): Locator<playwright.Locator, string>; element(): PageElement<playwright.Locator>; allElements(): Promise<Array<PageElement<playwright.Locator>>>; } /** * @internal */ export declare class PlaywrightExistingElementLocator extends PlaywrightLocator { private readonly existingNativeElement; constructor(parent: RootLocator<playwright.Locator>, selector: Selector, existingNativeElement: playwright.Locator); nativeElement(): Promise<playwright.Locator>; allNativeElements(): Promise<Array<playwright.Locator>>; } //# sourceMappingURL=PlaywrightLocator.d.ts.map