chromancer
Version:
A powerful command-line interface for automating Chrome browser using Playwright. Perfect for web scraping, automation, testing, and browser workflows.
31 lines (30 loc) • 910 B
TypeScript
import { Page, ElementHandle } from 'playwright';
export interface WaitOptions {
timeout?: number;
state?: 'attached' | 'detached' | 'visible' | 'hidden';
}
export interface ElementInfo {
text: string;
value: string;
tagName: string;
id: string;
className: string;
isVisible: boolean;
isDisabled: boolean;
href?: string | null;
type?: string;
placeholder?: string;
[key: string]: any;
}
/**
* Wait for an element to appear on the page
*/
export declare function waitForElement(page: Page, selector: string, options?: WaitOptions): Promise<ElementHandle>;
/**
* Check if an element is visible on the page
*/
export declare function isElementVisible(page: Page, selector: string): Promise<boolean>;
/**
* Get comprehensive information about an element
*/
export declare function getElementInfo(page: Page, selector: string): Promise<ElementInfo | null>;