UNPKG

@serenity-js/web

Version:

Serenity/JS Screenplay Pattern library offering a flexible, web driver-agnostic approach for interacting with web-based user interfaces and components, suitable for various testing contexts

24 lines 1.18 kB
import type { Answerable, AnswersQuestions } from '@serenity-js/core'; import { Interaction } from '@serenity-js/core'; import type { FileSystemLocation } from '@serenity-js/core/lib/io'; import type { PageElement } from '../models'; /** * A base class for interactions with [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) objects. * * **Note:** The recommended way to implement custom interactions * in your code is to use the [`Interaction.where`](https://serenity-js.org/api/core/class/Interaction/#where) factory method. * * @group Activities */ export declare abstract class PageElementInteraction extends Interaction { protected constructor(description: Answerable<string>, location?: FileSystemLocation); /** * Returns the resolved [`PageElement`](https://serenity-js.org/api/web/class/PageElement/), or throws a [`LogicError`](https://serenity-js.org/api/core/class/LogicError/) * if the element is `undefined`. * * @param actor * @param element */ protected resolve(actor: AnswersQuestions, element: Answerable<PageElement>): Promise<PageElement>; } //# sourceMappingURL=PageElementInteraction.d.ts.map