UNPKG

claude-playwright

Version:

Seamless integration between Claude Code and Playwright MCP for efficient browser automation and testing

114 lines 3.18 kB
export interface BrowserProfile { name: string; description: string; role: string; createdAt: number; lastUsed: number; settings: { userAgent?: string; viewport?: { width: number; height: number; }; locale?: string; timezone?: string; permissions?: string[]; cookies?: any[]; localStorage?: Record<string, string>; sessionStorage?: Record<string, string>; hasTouch?: boolean; isMobile?: boolean; deviceScaleFactor?: number; }; authState?: { storageState?: any; authFile?: string; }; metadata?: { tags?: string[]; environment?: 'dev' | 'staging' | 'prod'; baseUrl?: string; associatedSessions?: string[]; }; } export interface ProfileSummary { name: string; role: string; lastUsed: string; environment?: string; description: string; metadata?: { tags?: string[]; environment?: 'dev' | 'staging' | 'prod'; baseUrl?: string; associatedSessions?: string[]; }; configuration?: { viewport?: { width: number; height: number; }; userAgent?: string; hasTouch?: boolean; isMobile?: boolean; deviceScaleFactor?: number; locale?: string; timezone?: string; }; } /** * Browser Profile Manager for managing multiple browser profiles with different user roles */ export declare class BrowserProfileManager { private profilesDir; private authStatesDir; constructor(workingDir?: string); /** * Create a new browser profile for a specific role */ createProfile(profileData: { name: string; role: string; description?: string; settings?: BrowserProfile['settings']; metadata?: BrowserProfile['metadata']; silent?: boolean; }): Promise<string>; /** * Load a browser profile */ loadProfile(profileName: string): Promise<BrowserProfile>; /** * Update an existing profile */ updateProfile(profileName: string, updates: Partial<BrowserProfile>): Promise<boolean>; /** * List all browser profiles */ listProfiles(): Promise<ProfileSummary[]>; /** * Delete a browser profile */ deleteProfile(profileName: string, silent?: boolean): Promise<boolean>; /** * Create predefined profiles for common roles */ setupDefaultProfiles(): Promise<void>; /** * Get profile configuration for MCP integration */ getProfileForSession(browserProfile?: string): Promise<BrowserProfile | null>; /** * Associate a session with a browser profile */ associateSessionWithProfile(profileName: string, sessionName: string): Promise<boolean>; /** * Get sessions associated with a profile */ getAssociatedSessions(profileName: string): Promise<string[]>; /** * Find the best profile for auto-loading with a session */ findBestProfileForAutoLoad(): Promise<string | null>; } //# sourceMappingURL=browser-profile.d.ts.map