UNPKG

playwright-self-healer

Version:

A powerful self-healing automation tool for Playwright that automatically finds alternative selectors when original ones fail, including CSS and XPath support, similar to Healenium but built for modern web applications. Now with comprehensive XPath healin

39 lines 2.56 kB
import { Page, ElementHandle } from 'playwright'; export declare class HealingPage { private page; private selectorMap; private healingStrategies; private healingAttempts; constructor(page: Page); private initializeHealingStrategies; goto(url: string): Promise<void>; click(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; fill(selector: string, value: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; check(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; uncheck(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; hover(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; type(selector: string, text: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; selectOption(selector: string, value: string | string[], options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; getText(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; getAttribute(selector: string, name: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; isVisible(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; waitForSelector(selector: string, options?: any): Promise<string | boolean | void | string[] | ElementHandle<SVGElement | HTMLElement> | null>; private performAction; private executeAction; private isSelectorError; private healSelector; private healById; private healByText; private healByAttributes; private healByPosition; private healBySimilarity; private healByXPath; getHealedSelectors(): Promise<Record<string, string>>; clearHealedSelectors(): Promise<void>; clearHealingAttempts(): Promise<void>; exportHealedSelectors(filePath?: string): Promise<void>; importHealedSelectors(filePath: string): Promise<void>; private loadHealedSelectors; private saveHealedSelectors; } //# sourceMappingURL=healingPage.d.ts.map