|
|
|
|
|
""" |
|
|
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: |
|
|
|
|
|
from atles_desktop_app import ScreenElementExtractor, ATLESDesktopApp |
|
|
print("β
Core classes imported successfully") |
|
|
|
|
|
|
|
|
extractor = ScreenElementExtractor() |
|
|
print("β
ScreenElementExtractor created successfully") |
|
|
|
|
|
|
|
|
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") |
|
|
|
|
|
|
|
|
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") |
|
|
|
|
|
|
|
|
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()) |
|
|
|