diff --git a/.idea/AutoControl.iml b/.idea/AutoControl.iml
index 1b997c6..b494c46 100644
--- a/.idea/AutoControl.iml
+++ b/.idea/AutoControl.iml
@@ -5,7 +5,7 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 8f15788..4500e4d 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1c1e8e4..bbf237a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,7 +5,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -49,6 +71,9 @@
+ {
+ "associatedIndex": 4
+}
@@ -65,7 +90,7 @@
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "dev",
"ignore.virus.scanning.warn.message": "true",
- "last_opened_file_path": "C:/CodeWorkspace/AutoControl",
+ "last_opened_file_path": "C:/CodeWorkspace/APITestka",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -77,11 +102,11 @@
}]]>
+
-
@@ -91,7 +116,7 @@
-
+
@@ -114,7 +139,7 @@
-
+
@@ -122,12 +147,11 @@
-
+
-
-
+
@@ -136,7 +160,7 @@
-
+
@@ -144,12 +168,11 @@
-
+
-
-
+
@@ -204,11 +227,11 @@
+
+
-
-
@@ -503,16 +526,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index d445ac7..280ef24 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/pyproject.toml b/pyproject.toml
index 443aa03..d2ca0fe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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",
diff --git a/dev.toml b/stable.toml
similarity index 80%
rename from dev.toml
rename to stable.toml
index d24e1df..c0ffef3 100644
--- a/dev.toml
+++ b/stable.toml
@@ -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",
diff --git a/test/gui_test/calculator/calculator_executor.py b/test/gui_test/calculator/calculator_executor.py
new file mode 100644
index 0000000..fb55ab1
--- /dev/null
+++ b/test/gui_test/calculator/calculator_executor.py
@@ -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)
+
diff --git a/test/gui_test/calculator/test_source/1.png b/test/gui_test/calculator/test_source/1.png
new file mode 100644
index 0000000..3f94725
Binary files /dev/null and b/test/gui_test/calculator/test_source/1.png differ
diff --git a/test/gui_test/calculator/test_source/2.png b/test/gui_test/calculator/test_source/2.png
new file mode 100644
index 0000000..4b1207d
Binary files /dev/null and b/test/gui_test/calculator/test_source/2.png differ
diff --git a/test/gui_test/calculator/test_source/3.png b/test/gui_test/calculator/test_source/3.png
new file mode 100644
index 0000000..1fbaf12
Binary files /dev/null and b/test/gui_test/calculator/test_source/3.png differ
diff --git a/test/gui_test/calculator/test_source/4.png b/test/gui_test/calculator/test_source/4.png
new file mode 100644
index 0000000..98d7143
Binary files /dev/null and b/test/gui_test/calculator/test_source/4.png differ
diff --git a/test/gui_test/calculator/test_source/5.png b/test/gui_test/calculator/test_source/5.png
new file mode 100644
index 0000000..05bb43a
Binary files /dev/null and b/test/gui_test/calculator/test_source/5.png differ
diff --git a/test/gui_test/calculator/test_source/6.png b/test/gui_test/calculator/test_source/6.png
new file mode 100644
index 0000000..797d929
Binary files /dev/null and b/test/gui_test/calculator/test_source/6.png differ
diff --git a/test/gui_test/calculator/test_source/7.png b/test/gui_test/calculator/test_source/7.png
new file mode 100644
index 0000000..b2def3c
Binary files /dev/null and b/test/gui_test/calculator/test_source/7.png differ
diff --git a/test/gui_test/calculator/test_source/8.png b/test/gui_test/calculator/test_source/8.png
new file mode 100644
index 0000000..d9e332d
Binary files /dev/null and b/test/gui_test/calculator/test_source/8.png differ
diff --git a/test/gui_test/calculator/test_source/9.png b/test/gui_test/calculator/test_source/9.png
new file mode 100644
index 0000000..ffc4b60
Binary files /dev/null and b/test/gui_test/calculator/test_source/9.png differ
diff --git a/test/gui_test/calculator/test_source/equal.png b/test/gui_test/calculator/test_source/equal.png
new file mode 100644
index 0000000..06ea84f
Binary files /dev/null and b/test/gui_test/calculator/test_source/equal.png differ
diff --git a/test/gui_test/calculator/test_source/minus.png b/test/gui_test/calculator/test_source/minus.png
new file mode 100644
index 0000000..36dba2e
Binary files /dev/null and b/test/gui_test/calculator/test_source/minus.png differ
diff --git a/test/gui_test/calculator/test_source/plus.png b/test/gui_test/calculator/test_source/plus.png
new file mode 100644
index 0000000..8197e13
Binary files /dev/null and b/test/gui_test/calculator/test_source/plus.png differ
diff --git a/test/gui_test/calculator/test_source/test.png b/test/gui_test/calculator/test_source/test.png
new file mode 100644
index 0000000..22f3f31
Binary files /dev/null and b/test/gui_test/calculator/test_source/test.png differ
diff --git a/test/gui_test/calculator/test_source/test1.PNG b/test/gui_test/calculator/test_source/test1.PNG
new file mode 100644
index 0000000..9927417
Binary files /dev/null and b/test/gui_test/calculator/test_source/test1.PNG differ
diff --git a/test/gui_test/calculator/test_source/test_template.png b/test/gui_test/calculator/test_source/test_template.png
new file mode 100644
index 0000000..1fb8490
Binary files /dev/null and b/test/gui_test/calculator/test_source/test_template.png differ
diff --git a/test/unit_test/execute_action/execute_action_test.py b/test/unit_test/execute_action/execute_action_test.py
index 7e5ba9d..bda00cf 100644
--- a/test/unit_test/execute_action/execute_action_test.py
+++ b/test/unit_test/execute_action/execute_action_test.py
@@ -8,29 +8,29 @@
if sys.platform in ["win32", "cygwin", "msys"]:
test_list = [
["AC_type_keyboard", {"keycode": 65}],
- ["AC_mouse_left", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
+ ["AC_mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
["AC_get_mouse_position"],
- ["AC_press_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
- ["AC_release_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
- ["AC_type_keyboard", {"mouse_keycode": "dwadwawda", "dwadwad": 500, "wdawddwawad": 500}]
+ ["AC_press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
+ ["AC_release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
+ ["AC_type_keyboard", {"keycode": "dwadwawda", "dwadwad": 500, "wdawddwawad": 500}]
]
elif sys.platform in ["linux", "linux2"]:
test_list = [
["AC_type_keyboard", {"keycode": 38}],
- ["AC_mouse_left", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
+ ["AC_mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
["AC_get_mouse_position"],
- ["AC_press_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
- ["AC_release_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
+ ["AC_press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
+ ["AC_release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
["AC_type_keyboard", {"mouse_keycode": "dwadwawda", "dwadwad": 500, "wdawddwawad": 500}]
]
elif sys.platform in ["darwin"]:
test_list = [
["AC_type_keyboard", {"keycode": 0x00}],
- ["AC_mouse_left", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
+ ["AC_mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
["AC_get_mouse_position"],
- ["AC_press_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
- ["AC_release_mouse", {"mouse_keycode": "AC_mouse_left", "x": 500, "y": 500}],
+ ["AC_press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
+ ["AC_release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}],
["AC_type_keyboard", {"mouse_keycode": "dwadwawda", "dwadwad": 500, "wdawddwawad": 500}]
]
print("\n\n")