Author: Yichen Zhao
Date: June 2025
This project is a GUI-based test automation framework developed using AutoIt. It automates interactions with Windows 10 Notepad as a demonstration of simulating user behaviors such as clicking menus and saving files. While Notepad is used as the target application, the framework is designed to be extendable to other Windows desktop applications.
Important: This framework is specifically designed and tested with the Windows 10 Notepad UI. Because Notepad’s interface and dialog layouts differ between Windows versions (e.g., Windows 7, 8, 11), the script’s coordinate-based interactions and window titles may not work as expected on other Windows editions without adjustments.
The goal of this project is to showcase how AutoIt can be used to implement an efficient, script-driven, coordinate-based GUI testing solution with logging capabilities and modular test structure.
. ├── lib/ │ └── utils.au3 ; Utility functions (logging, launching apps, relative clicks) ├── tests/ │ ├── test_case1.au3 ; Test Case 1: Click "Help > About Notepad" and close it │ └── test_case2.au3 ; Test Case 2: Type and save text, handle overwrite confirmation ├── test_runner.au3 ; Entry point that runs all test cases └── test_log.txt ; Test execution log (auto-generated)
-
System Requirements:
- Windows OS
- AutoIt v3 installed
-
Setup Instructions:
- Download or clone all project files and preserve the folder structure as shown above.
- Open any of the
.au3scripts with SciTE (AutoIt Script Editor) or right-click and select “Run Script”.
-
To Run the Full Test Suite:
- Execute
test_runner.au3. This will:- Clear and initialize the test log file
- Execute Test Case 1 and Test Case 2 sequentially
- Display a completion message
- Write detailed logs to
test_log.txtin the same directory
- Execute
- Log file location:
<project_directory>\test_log.txt - Each log entry includes a timestamp and step description.
- Errors (like window not found or Save As dialog not appearing) are also logged for debugging.
-
Test Case 1:
Launches Notepad, simulates clicking on “Help” > “About Notepad”, verifies the dialog, and closes it. -
Test Case 2:
Launches Notepad, types a line of text, saves the file to the current directory asTestFile.txt, and handles overwrite confirmation if the file already exists.
- To test other Windows applications, replace
"notepad.exe"and update window titles and UI coordinates. - More test cases can be added under the
tests/folder and included intest_runner.au3. - Coordinates used for mouse interactions may require adjustments based on screen resolution and UI changes.
- This framework relies on coordinate-based mouse interactions, which can break with resolution changes or UI layout differences.
- Some dialogs or windows may not behave identically across Windows versions.
- No use of accessibility IDs or object recognition—this is by design to suit applications with owner-drawn controls.
- For dynamic or complex UI automation, extensions using ControlClick or additional DLLs may be required.
This project was developed by Yichen Zhao for demonstrating GUI test automation using AutoIt, in the context of a test framework assignment.