#!/usr/bin/env python3 """ Simple test launcher for ATLES Desktop App Tests basic functionality without full GUI """ import sys import os def test_basic_functionality(): """Test basic functionality without launching GUI""" print("๐Ÿงช Testing ATLES Desktop App Basic Functionality...") try: # Test importing the main classes from atles_desktop_app import ScreenElementExtractor, ATLESDesktopApp print("โœ… Core classes imported successfully") # Test creating extractor extractor = ScreenElementExtractor() print("โœ… ScreenElementExtractor created successfully") # Test getting active window info print("๐Ÿ” Testing window detection...") window_info = extractor.get_active_window_info() if window_info: print(f" โœ… Active window: {window_info.get('title', 'Unknown')}") print(f" โœ… Process: {window_info.get('process_name', 'Unknown')}") else: print(" โš ๏ธ No active window detected") # Test getting running applications print("๐Ÿ“ฑ Testing application enumeration...") apps = extractor.get_running_applications() if apps: print(f" โœ… Found {len(apps)} running applications") if len(apps) > 0: print(f" โœ… Sample app: {apps[0].get('title', 'Unknown')}") else: print(" โš ๏ธ No running applications found") # Test clipboard access print("๐Ÿ“‹ Testing clipboard access...") try: clipboard = extractor.get_clipboard_content() if clipboard: print(f" โœ… Clipboard content: {len(clipboard)} characters") else: print(" โ„น๏ธ Clipboard is empty") except Exception as e: print(f" โš ๏ธ Clipboard access failed: {e}") print("\n๐ŸŽ‰ Basic functionality test completed successfully!") print("The desktop app is ready to run.") print("\nTo launch the full GUI, run:") print(" python atles_desktop_app.py") print(" or double-click run_desktop.bat") return True except Exception as e: print(f"โŒ Test failed: {e}") import traceback traceback.print_exc() return False def main(): """Main test function""" print("๐Ÿš€ ATLES Desktop App - Basic Functionality Test") print("=" * 50) success = test_basic_functionality() if success: print("\nโœ… All tests passed! Desktop app is working correctly.") return 0 else: print("\nโŒ Some tests failed. Check the output above.") return 1 if __name__ == "__main__": sys.exit(main())