saltfish
Version:
An interactive video-guided tour system for web applications
27 lines • 1.11 kB
TypeScript
/**
* Element Error Reporter
*
* Reports element finding failures to the backend API for tracking.
* Used when cursor/transition element finding fails after all retries.
*
* Captures a DOM snapshot using rrweb-snapshot for all failures,
* allowing reconstruction of the page state for debugging.
*/
import type { ExpectedElement, ExpectedSize } from './elementSizeValidator';
export type ElementErrorReason = 'no_elements' | 'tag_mismatch' | 'text_mismatch' | 'size_mismatch';
export interface ElementErrorPayload {
playlistId: string;
stepId: string;
failureReason: ElementErrorReason;
selector: string;
domSnapshot?: string;
}
/**
* Reports an element finding error to the backend.
* Fire-and-forget - does not block or throw.
*
* Always captures a DOM snapshot to allow reconstruction of the page state
* for debugging, regardless of failure type.
*/
export declare function reportElementError(playlistId: string, stepId: string, selector: string, expectedElement?: ExpectedElement, expectedSize?: ExpectedSize): void;
//# sourceMappingURL=elementErrorReporter.d.ts.map