import puppeteer from 'puppeteer'; export declare abstract class ActionStaticComponent { static action: string; } export declare class HighlightAction extends ActionStaticComponent implements ActionComponent { static action: string; config: HighlightActionConfig; constructor(config: HighlightActionConfig); perform(page: puppeteer.Page, options: ActionPerformOptions): Promise; } export declare class ScreenshotAction extends ActionStaticComponent implements ActionComponent { static action: string; config: ScreenshotActionConfig; constructor(config: ScreenshotActionConfig); perform(page: puppeteer.Page, options: ActionPerformOptions): Promise; } export declare class WaitForFunctionAction extends ActionStaticComponent implements ActionComponent { static action: string; config: WaitForFunctionActionConfig; constructor(config: WaitForFunctionActionConfig); perform(page: puppeteer.Page, options: ActionPerformOptions): Promise; } export declare class WaitForSelectorAction extends ActionStaticComponent implements ActionComponent { static action: string; config: WaitForSelectorActionConfig; constructor(config: WaitForSelectorActionConfig); perform(page: puppeteer.Page, options: ActionPerformOptions): Promise; } /** * Actions available for the screenshotter to use. */ export declare const ACTIONS: (typeof ScreenshotAction | typeof WaitForFunctionAction)[]; export interface ActionComponent { config: ActionConfig; perform(page: puppeteer.Page, options: ActionPerformOptions): Promise; } export interface ActionConfig { action: string; } export interface ActionPerformOptions { screenshotPath: string; } export interface ActionResult { completedScreenshot?: boolean; result?: any; } export interface HighlightActionConfig extends ActionConfig { /** * Selector for highlighting part of the page. */ selector: string; all?: boolean; } export interface ScreenshotActionConfig extends ActionConfig { /** * Selector for screenshotting only part of the page. */ selector?: string; } export interface WaitForFunctionActionConfig extends ActionConfig { /** * Function to run in the page to wait for truthy result. */ pageFunction: string; options?: { timeout?: number; polling?: string | number; }; } export interface WaitForSelectorActionConfig extends ActionConfig { /** * Selector for waiting for page changes. */ selector: string; options?: { visible?: boolean; hidden?: boolean; timeout?: number; }; }