/** * QA360 Site Profiler * * Analyzes a website to detect its characteristics and determine * the optimal selector strategy. This enables adaptive testing * based on the site's framework, accessibility, and testing maturity. * * Philosophy: "Know the site to test it better" */ import type { Page } from '@playwright/test'; /** * Site analysis results */ export interface SiteAnalysis { hasTestIds: number; hasAriaLabels: number; hasRoles: number; hasSemanticIds: number; hasLabels: number; hasPlaceholders: number; hasAltTexts: number; totalElements: number; framework: Framework | null; cssFramework: CssFramework | null; testabilityScore: number; accessibilityScore: number; patterns: { hasReact: boolean; hasVue: boolean; hasAngular: boolean; hasSvelte: boolean; hasNext: boolean; hasNuxt: boolean; hasRemix: boolean; hasAstro: boolean; hasTailwind: boolean; hasBootstrap: boolean; hasMUI: boolean; hasChakra: boolean; hasAntDesign: boolean; hasBulma: boolean; }; } /** * Detected JavaScript frameworks */ export type Framework = 'react' | 'vue' | 'angular' | 'svelte' | 'next' | 'nuxt' | 'remix' | 'astro' | 'solid' | 'preact' | 'lit' | 'stencil' | null; /** * Detected CSS frameworks */ export type CssFramework = 'tailwind' | 'bootstrap' | 'mui' | 'chakra' | 'ant' | 'bulma' | 'foundation' | 'spectacle' | 'tachyons' | null; /** * Site profile type */ export type SiteProfile = 'PROFIL_MODERN' | 'PROFIL_ACCESSIBLE' | 'PROFIL_LEGACY' | 'PROFIL_MINIMAL'; /** * Site Profiler - Analyzes websites for adaptive testing */ export declare class SiteProfiler { /** * Analyze the current page to determine site characteristics * Called ONCE at the beginning of the crawl */ analyzeSite(page: Page): Promise; /** * Determine the site profile based on analysis */ determineProfile(analysis: SiteAnalysis): SiteProfile; /** * Get a human-readable description of the profile */ getProfileDescription(profile: SiteProfile): string; /** * Get the recommended strategy for the profile */ getRecommendedStrategy(profile: SiteProfile): string; } /** * Default profiler instance */ export declare const defaultProfiler: SiteProfiler; /** * Quick analyze function (convenience wrapper) */ export declare function analyzeSite(page: Page): Promise; /** * Quick profile determination (convenience wrapper) */ export declare function determineSiteProfile(analysis: SiteAnalysis): SiteProfile;