Skip to content
Merged

Dev #162

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/dev_python3_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
4 changes: 0 additions & 4 deletions .github/workflows/dev_python3_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
4 changes: 0 additions & 4 deletions .github/workflows/dev_python3_12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
4 changes: 0 additions & 4 deletions .github/workflows/stable_python3_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
4 changes: 0 additions & 4 deletions .github/workflows/stable_python3_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
4 changes: 0 additions & 4 deletions .github/workflows/stable_python3_12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
run: python ./test/unit_test/json/json_test.py
- name: Test Generate Json Report
run: python ./test/unit_test/generate_report/json_report.py
- name: Test Timeout Module
run: python ./test/unit_test/timeout/timeout_test.py
- name: Test Generate HTML Report
run: python ./test/unit_test/generate_report/html_report_test.py

Expand All @@ -91,7 +89,5 @@ jobs:

- name: Test Get Mouse Info
run: python ./test/unit_test/get_info/mouse_info.py
- name: Test Get Special Info
run: python ./test/unit_test/get_info/special_info.py
- name: Test Get Keyboard Info
run: python ./test/unit_test/get_info/keyboard_info.py
130 changes: 70 additions & 60 deletions .idea/workspace.xml

Large diffs are not rendered by default.

101 changes: 38 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,56 @@
### AutoControl
# AutoControl

[![Downloads](https://static.pepy.tech/badge/je-auto-control)](https://pepy.tech/project/je-auto-control)
AutoControl is a cross‑platform GUI automation framework that provides powerful and efficient features for mouse, keyboard, and image‑based automation.

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/db0f6e626a614f67bf2b6b1f54325a24)](https://www.codacy.com/gh/JE-Chen/AutoControl/dashboard?utm_source=github.com&utm_medium=referral&utm_content=JE-Chen/AutoControl&utm_campaign=Badge_Grade)
## Features

[![AutoControl Stable Python3.8](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_8.yml/badge.svg)](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_8.yml)
* Powerful and practical GUI automation.
* Image recognition (template matching).
* Coordinate‑based operations.
* Mouse automation.
* Keyboard automation.
* Locate images.
* AutoControl scripting support.
* Generate JSON / HTML / XML reports.
* Remote automation support.
* Shell command integration.
* Screenshot support.
* OS‑independent design.
* Project & template management.

[![AutoControl Stable Python3.9](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_9.yml/badge.svg)](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_9.yml)
## ⚠️ Notice
Currently Unix/Linux Wayland GUI is not supported.
This may be added as a future feature.

[![AutoControl Stable Python3.10](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_10.yml/badge.svg)](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_10.yml)

[![AutoControl Stable Python3.11](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_11.yml/badge.svg)](https://github.com/Intergration-Automation-Testing/AutoControl/actions/workflows/stable_python3_11.yml)

### Documentation
[![Documentation Status](https://readthedocs.org/projects/autocontrol/badge/?version=latest)](https://autocontrol.readthedocs.io/en/latest/?badge=latest)

[AutoControl Doc Click Here!](https://autocontrol.readthedocs.io/en/latest/)

---

> Project Kanban \
> https://github.com/orgs/Integration-Automation/projects/2/views/1 \
> * Powerful and useful GUI Automation.
> * Image recognition.
> * Coordinate-based.
> * Mouse automation.
> * Keyboard automation.
> * Locate image less than 0.5 sec.
> * AutoControl script.
> * Generate JSON/HTML/XML report.
> * Remote Automation support.
> * 1 sec / thousands keyboard event.
> * 1 sec / thousands mouse event.
> * Open another process support.
> * Shell command support.
> * Screenshot support.
> * OS Independent.
> * Project & Template support.

---

### NOTICE
> We don't support Unix/Linux Wayland GUI Now \
> May be future feature
---

## install
## Installation

```
# make sure you have install cmake libssl-dev (on linux)
pip install je_auto_control
```

## Info
## Requirements

* Python 3.9 or later
* pip 19.3 or later

> * requirement
>> * Python 3.9 or later
>> * pip 19.3 or later

> * Dev env
>> * windows 11
>> * osx 11 big sur
>> * ubuntu 20.0.4

## Development Environment
* Windows 11
* macOS 11 Big Sur
* Ubuntu 20.04

> * Test on
>> * Windows 10 ~ 11
>> * osx 10.5 ~ 11 big sur
>> * ubuntu 20.0.4
>> * raspberry pi 3B and 4B
## Tested On
* Windows 10 ~ 11
* macOS 10.15 ~ 11 Big Sur
* Ubuntu 20.04
* Raspberry Pi 3B / 4B

## Setting Up Development Environment
```commandline
pip install -r dev_requirements.txt
```

## How to set dev environment

> * Clone repo on GitHub or download source code
> * Prepare a python venv
> * Run command "pip install --upgrade pip"
> * Run command "pip install -r dev_requirements.txt"

### Architecture Diagram
![architecture_diagram](architecture_diagram/AutoControl_Architecture.drawio.png)
2 changes: 1 addition & 1 deletion dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "je_auto_control_dev"
version = "0.0.127"
version = "0.0.131"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
12 changes: 4 additions & 8 deletions je_auto_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
# test record
from je_auto_control.utils.test_record.record_test_class import \
test_record_instance
# timeout
from je_auto_control.utils.timeout.multiprocess_timeout import \
multiprocess_timeout
# Windows
from je_auto_control.windows.window import windows_window_manage
from je_auto_control.wrapper.auto_control_image import locate_all_image
Expand All @@ -84,7 +81,6 @@
# import keyboard
from je_auto_control.wrapper.auto_control_keyboard import check_key_is_press
from je_auto_control.wrapper.auto_control_keyboard import get_keyboard_keys_table
from je_auto_control.wrapper.auto_control_keyboard import get_special_table
from je_auto_control.wrapper.auto_control_keyboard import hotkey
from je_auto_control.wrapper.auto_control_keyboard import keyboard_keys_table
from je_auto_control.wrapper.auto_control_keyboard import press_keyboard_key
Expand All @@ -96,7 +92,7 @@
from je_auto_control.wrapper.auto_control_mouse import click_mouse
from je_auto_control.wrapper.auto_control_mouse import get_mouse_position
from je_auto_control.wrapper.auto_control_mouse import mouse_keys_table
from je_auto_control.wrapper.auto_control_mouse import mouse_scroll
from je_auto_control.wrapper.auto_control_mouse import mouse_scroll_error_message
from je_auto_control.wrapper.auto_control_mouse import press_mouse
from je_auto_control.wrapper.auto_control_mouse import release_mouse
from je_auto_control.wrapper.auto_control_mouse import send_mouse_event_to_window
Expand All @@ -112,7 +108,7 @@

__all__ = [
"click_mouse", "mouse_keys_table", "get_mouse_position", "press_mouse", "release_mouse",
"mouse_scroll", "set_mouse_position", "special_mouse_keys_table",
"mouse_scroll_error_message", "set_mouse_position", "special_mouse_keys_table",
"keyboard_keys_table", "press_keyboard_key", "release_keyboard_key", "type_keyboard", "check_key_is_press",
"write", "hotkey", "start_exe", "get_keyboard_keys_table",
"screen_size", "screenshot", "locate_all_image", "locate_image_center", "locate_and_click",
Expand All @@ -121,10 +117,10 @@
"AutoControlScreenException", "ImageNotFoundException", "AutoControlJsonActionException",
"AutoControlRecordException", "AutoControlActionNullException", "AutoControlActionException", "record",
"stop_record", "read_action_json", "write_action_json", "execute_action", "execute_files", "executor",
"add_command_to_executor", "multiprocess_timeout", "test_record_instance", "screenshot", "pil_screenshot",
"add_command_to_executor", "test_record_instance", "screenshot", "pil_screenshot",
"generate_html", "generate_html_report", "generate_json", "generate_json_report", "generate_xml",
"generate_xml_report", "get_dir_files_as_list", "create_project_dir", "start_autocontrol_socket_server",
"callback_executor", "package_manager", "get_special_table", "ShellManager", "default_shell_manager",
"callback_executor", "package_manager", "ShellManager", "default_shell_manager",
"RecordingThread", "send_key_event_to_window", "send_mouse_event_to_window", "windows_window_manage",
"ScreenRecorder", "get_pixel"
]
4 changes: 2 additions & 2 deletions je_auto_control/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys

from je_auto_control.utils.exception.exception_tags import \
argparse_get_wrong_data
argparse_get_wrong_data_error_message
from je_auto_control.utils.exception.exceptions import \
AutoControlArgparseException
from je_auto_control.utils.executor.action_executor import execute_action
Expand Down Expand Up @@ -62,7 +62,7 @@ def preprocess_read_str_execute_action(execute_str: str):
if value is not None:
argparse_event_dict.get(key)(value)
if all(value is None for value in args.values()):
raise AutoControlArgparseException(argparse_get_wrong_data)
raise AutoControlArgparseException(argparse_get_wrong_data_error_message)
except Exception as error:
print(repr(error), file=sys.stderr)
sys.exit(1)
Loading