Files
Geniusia_v2/geniusia2/test_window_detection.py
2026-03-05 00:20:25 +01:00

29 lines
677 B
Python

#!/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")