💬 Commit message: Update 2026-02-11 12:18:05, 14 files, 1838 lines

📁 Files changed: 14
📝 Lines changed: 1838

  • CLAUDE.md
  • README.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
This commit is contained in:
Adam Ladachowski
2026-02-11 12:18:06 +01:00
parent f7df5d8f54
commit f5df8c67f3
14 changed files with 1790 additions and 48 deletions
+51 -1
View File
@@ -1,5 +1,5 @@
import { type BrowserContext, type Page } from 'playwright';
import type { BrowserCommand, BrowserOptions, CommandResponse, ConsoleMessage, ElementInfo, NetworkEntry } from './types.js';
import type { A11yNode, BrowserCommand, BrowserOptions, CommandResponse, ConsoleMessage, DialogEntry, ElementInfo, MetricsData, NetworkEntry, PageError } from './types.js';
export declare class ClaudeBrowser {
private browser;
private context;
@@ -7,9 +7,14 @@ export declare class ClaudeBrowser {
private options;
private consoleMessages;
private networkEntries;
private pageErrors;
private dialogHistory;
private dialogConfig;
private interceptPatterns;
constructor(options?: BrowserOptions);
launch(): Promise<void>;
private setupErrorListener;
private setupDialogListener;
private setupConsoleListener;
private setupNetworkListener;
close(): Promise<void>;
@@ -52,13 +57,58 @@ export declare class ClaudeBrowser {
clearConsole(): void;
getNetwork(filter?: string, clear?: boolean): NetworkEntry[];
clearNetwork(): void;
getErrors(clear?: boolean): PageError[];
clearErrors(): void;
getMetrics(includeResources?: boolean): Promise<MetricsData>;
getA11y(selector?: string): Promise<A11yNode | null>;
getDialogs(): DialogEntry[];
clearDialogs(): void;
setDialogConfig(config: {
autoAccept?: boolean;
autoDismiss?: boolean;
text?: string;
}): void;
getDialogConfig(): {
autoAccept: boolean;
autoDismiss: boolean;
};
addIntercept(pattern: string, action: 'block' | 'mock', response?: {
status?: number;
body?: string;
contentType?: string;
}): Promise<void>;
private handleIntercept;
clearIntercepts(): Promise<void>;
getInterceptPatterns(): string[];
getCookies(name?: string): Promise<Array<{
name: string;
value: string;
domain: string;
path: string;
}>>;
setCookie(name: string, value: string, url?: string): Promise<void>;
deleteCookie(name: string): Promise<void>;
clearCookies(): Promise<void>;
getStorage(type: 'local' | 'session', key?: string): Promise<Record<string, string>>;
setStorage(type: 'local' | 'session', key: string, value: string): Promise<void>;
deleteStorage(type: 'local' | 'session', key: string): Promise<void>;
clearStorage(type: 'local' | 'session'): Promise<void>;
hover(selector: string): Promise<void>;
select(selector: string, value: string | string[]): Promise<string[]>;
keys(keys: string): Promise<void>;
upload(selector: string, files: string[]): Promise<void>;
scroll(selector?: string, x?: number, y?: number): Promise<void>;
setViewport(width: number, height: number): Promise<{
width: number;
height: number;
}>;
emulate(device: string): Promise<{
width: number;
height: number;
}>;
private handleDialogCommand;
private handleCookiesCommand;
private handleStorageCommand;
executeCommand(cmd: BrowserCommand): Promise<CommandResponse>;
}
//# sourceMappingURL=browser.d.ts.map