Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .idea/AutoControl.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 36 additions & 25 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pip install je_auto_control
## Info

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

> * Dev env
Expand Down
17 changes: 8 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# Rename to build stable version
# This is stable version
# Rename to build dev version
# This is dev version
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "je_auto_control"
version = "0.0.153"
name = "je_auto_control_dev"
version = "0.0.95"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
description = "GUI Automation Framework"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { text = "MIT" }
dependencies = [
"je_open_cv",
"pillow",
"numpy",
"APScheduler",
"APScheduler==3.10.1",
"pyobjc-core;platform_system=='Darwin'",
"pyobjc;platform_system=='Darwin'",
"python-Xlib;platform_system=='Linux'"
]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
Expand Down
17 changes: 9 additions & 8 deletions dev.toml → stable.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# Rename to build dev version
# This is dev version
# Rename to build stable version
# This is stable version
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "je_auto_control_dev"
version = "0.0.94"
name = "je_auto_control"
version = "0.0.154"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
description = "GUI Automation Framework"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { text = "MIT" }
dependencies = [
"je_open_cv",
"pillow",
"APScheduler",
"numpy",
"APScheduler==3.10.1",
"pyobjc-core;platform_system=='Darwin'",
"pyobjc;platform_system=='Darwin'",
"python-Xlib;platform_system=='Linux'"
]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Win32 (MS Windows)",
"Environment :: MacOS X",
Expand Down
69 changes: 69 additions & 0 deletions test/gui_test/calculator/calculator_executor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import subprocess
from time import sleep

from je_auto_control import locate_and_click, executor

# 開啟windows 計算機
# 並累加1至9
# open windows calc.exe
# and calculate 1 + 2 .... + 9

test_list = [
["AC_add_package_to_executor", {"package": "subprocess"}],
["subprocess_Popen", {"args": "calc"}],
["AC_add_package_to_executor", {"package": "time"}],
["time_sleep", [3]],
["AC_locate_and_click",
{"image": "./test_source/1.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/2.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/3.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/4.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/5.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/6.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/7.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/8.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/plus.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/9.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}],
["AC_locate_and_click",
{"image": "./test_source/equal.png", "mouse_keycode": "mouse_left", "detect_threshold": 0.9}]
]

executor.execute_action(test_list)

Binary file added test/gui_test/calculator/test_source/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/equal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/gui_test/calculator/test_source/test1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading