UNPKG

chromancer

Version:

A powerful command-line interface for automating Chrome browser using Playwright. Perfect for web scraping, automation, testing, and browser workflows.

32 lines (31 loc) 852 B
import { Page } from 'playwright'; export interface ElementMatch { index: number; selector: string; tagName: string; textContent: string; visible: boolean; id?: string; classes?: string[]; position: { top: number; left: number; width: number; height: number; }; } /** * Check if a selector matches multiple elements and return disambiguation info */ export declare function checkMultipleMatches(page: Page, selector: string): Promise<{ count: number; elements?: ElementMatch[]; }>; /** * Format element matches for display */ export declare function formatElementMatches(elements: ElementMatch[]): string; /** * Get interactive selection from user (requires inquirer) */ export declare function getInteractiveSelection(elements: ElementMatch[]): Promise<string | null>;