Files
browse/dist/browser.d.ts
T
Adam Ladachowski 5a7466b67d 💬 Commit message: Update 2026-02-11 04:13:54, 13 files, 595 lines
📁 Files changed: 13
📝 Lines changed: 595

  • PLAN.md
  • TODO.md
  • browser.d.ts
  • browser.d.ts.map
  • browser.js
  • browser.js.map
  • mcp.js
  • mcp.js.map
  • types.d.ts
  • types.d.ts.map
  • browser.ts
  • mcp.ts
  • types.ts
2026-02-11 04:13:54 +01:00

52 lines
1.6 KiB
TypeScript

import { type BrowserContext, type Page } from 'playwright';
import type { BrowserCommand, BrowserOptions, CommandResponse, ConsoleMessage, ElementInfo } from './types.js';
export declare class ClaudeBrowser {
private browser;
private context;
private page;
private options;
private consoleMessages;
constructor(options?: BrowserOptions);
launch(): Promise<void>;
private setupConsoleListener;
close(): Promise<void>;
private ensurePage;
/** Get the current page instance (for advanced usage) */
getPage(): Page | null;
/** Get the browser context (for advanced usage like cookies) */
getContext(): BrowserContext | null;
goto(url: string): Promise<{
url: string;
title: string;
}>;
click(selector: string): Promise<{
url: string;
}>;
type(selector: string, text: string): Promise<void>;
query(selector: string): Promise<ElementInfo[]>;
screenshot(path?: string, fullPage?: boolean): Promise<{
path: string;
buffer?: Buffer;
}>;
getUrl(): Promise<{
url: string;
title: string;
}>;
getHtml(full?: boolean): Promise<string>;
back(): Promise<{
url: string;
}>;
forward(): Promise<{
url: string;
}>;
reload(): Promise<{
url: string;
}>;
wait(ms?: number): Promise<void>;
newPage(): Promise<void>;
eval(script: string): Promise<unknown>;
getConsole(level?: string, clear?: boolean): ConsoleMessage[];
clearConsole(): void;
executeCommand(cmd: BrowserCommand): Promise<CommandResponse>;
}
//# sourceMappingURL=browser.d.ts.map