@extra/humanize
Version:
A plugin for playwright & puppeteer to humanize inputs (mouse movements)
30 lines (29 loc) • 994 B
TypeScript
import { AutomationExtraPlugin } from 'automation-extra-plugin';
import type { Page } from 'automation-extra-plugin';
export interface MouseOpts {
/** Enable human mouse movements when clicking */
enabled: boolean;
/** Show a visible cursor (for testing, not for production) */
showCursor: boolean;
}
export interface HumanizePluginOpts {
mouse: Partial<MouseOpts>;
}
export declare class HumanizePlugin extends AutomationExtraPlugin<HumanizePluginOpts> {
constructor(opts?: Partial<HumanizePluginOpts>);
static get id(): string;
get defaults(): {
mouse: {
enabled: boolean;
showCursor: boolean;
};
};
/** Enable the humanize plugin */
enable(): void;
/** Disable the humanize plugin */
disable(): void;
onPageCreated(page: Page): Promise<void>;
}
/** Default export */
declare const defaultExport: (opts?: Partial<HumanizePluginOpts> | undefined) => HumanizePlugin;
export default defaultExport;