#!/usr/bin/env python3 """ Script de test pour vérifier la détection du nom de fenêtre active """ import sys sys.path.insert(0, '.') from core.utils.image_utils import get_active_window print("🔍 Test de détection de fenêtre active") print("=" * 50) for i in range(5): window = get_active_window() print(f"Tentative {i+1}: '{window}'") if window and window != "Unknown Window": print(f"✅ Détection réussie: {window}") break else: print(f"⚠️ Fenêtre non détectée") import time time.sleep(1) print("\n💡 Si la détection échoue, installe xdotool:") print(" sudo apt-get install xdotool")