/** * QA360 Consent Handler * * Automatically detects and dismisses GDPR/CCPA cookie consent banners. * Supports all major Consent Management Platforms (CMPs). * * Philosophy: "80% of EU sites block interaction with consent banners" * * NEW: Continuous monitoring mode for async-loaded banners */ import type { Page } from '@playwright/test'; /** * Consent handling options */ export interface ConsentOptions { /** Action to take: 'accept', 'reject', or 'ignore' */ action?: 'accept' | 'reject' | 'ignore'; /** Timeout for banner detection (ms) */ timeout?: number; /** Custom selector override */ customSelector?: string; /** Enable continuous monitoring (watches for banners appearing during session) */ continuous?: boolean; } /** * Consent Handler - Auto-detects and handles GDPR/CCPA banners */ export declare class ConsentHandler { /** * Handle consent banners on the page * * @param page - Playwright Page instance * @param options - Consent handling options * @returns true if a banner was found and handled, false otherwise */ static handleConsent(page: Page, options?: ConsentOptions): Promise; /** * Start continuous monitoring for consent banners * Uses MutationObserver to detect banners that appear after page load */ private static startContinuousMonitoring; /** * Stop continuous monitoring for a page */ static stopContinuousMonitoring(page: Page): void; /** * Stop all continuous monitoring */ static stopAllMonitoring(): void; /** * Try a specific CMP */ private static tryCMP; /** * Handle custom consent selector */ private static handleCustom; /** * Get all supported CMP names */ static getSupportedCMPs(): string[]; } /** * Quick function to handle consent (convenience wrapper) */ export declare function handleConsent(page: Page, options?: ConsentOptions): Promise;