Skip to content

Commit 8cacedb

Browse files
authored
Merge pull request #14 from JE-Chen/dev
dev merge to main
2 parents 0b32b69 + bfb7e60 commit 8cacedb

File tree

115 files changed

+685
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+685
-280
lines changed

.circleci/config.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
- checkout
1515
# pip require package
1616
- run:
17-
command: pip install --user -r requirements.txt
18-
name: pip requirements.txt
17+
command: pip install --user -r dev_requirements.txt
18+
name: pip dev_requirements.txt
1919
# screen test
2020
- run:
2121
command: python ./circle_ci_test/unit_test/screen/screen_test.py
@@ -47,16 +47,6 @@ jobs:
4747
- run:
4848
command: python ./circle_ci_test/unit_test/exception/test_auto_control_exception.py
4949
name: test_auto_control_exception
50-
# image detect
51-
- run:
52-
command: python ./circle_ci_test/unit_test/image/locate_all_image_test.py
53-
name: locate_all_image_test
54-
- run:
55-
command: python ./circle_ci_test/unit_test/image/locate_and_click_test.py
56-
name: locate_and_click_test
57-
- run:
58-
command: python ./circle_ci_test/unit_test/image/locate_image_center_test.py
59-
name: locate_image_center_test
6050
# critical exit
6151
- run:
6252
command: python ./circle_ci_test/unit_test/critical_exit/critical_exit_test.py
@@ -80,6 +70,17 @@ jobs:
8070
- run:
8171
command: python ./circle_ci_test/unit_test/timeout/timeout_test.py
8272
name: timeout_test
73+
# GUI Test
74+
# image detect
75+
- run:
76+
command: python ./circle_ci_test/gui_test/image/locate_all_image_test.py
77+
name: locate_all_image_test
78+
- run:
79+
command: python ./circle_ci_test/gui_test/image/locate_and_click_test.py
80+
name: locate_and_click_test
81+
- run:
82+
command: python ./circle_ci_test/gui_test/image/locate_image_center_test.py
83+
name: locate_image_center_test
8384

8485
workflows:
8586
main:

.idea/workspace.xml

Lines changed: 63 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import os
2+
import subprocess
3+
from time import sleep
4+
5+
from je_auto_control import locate_and_click
6+
7+
subprocess.Popen("calc", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
8+
sleep(3)
9+
locate_and_click(
10+
os.getcwd() + "/circle_ci_test/test_source/1.png",
11+
mouse_keycode="mouse_left",
12+
detect_threshold=0.9,
13+
draw_image=False
14+
)
15+
locate_and_click(
16+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
17+
mouse_keycode="mouse_left",
18+
detect_threshold=0.9,
19+
draw_image=False
20+
)
21+
22+
locate_and_click(
23+
os.getcwd() + "/circle_ci_test/test_source/5.png",
24+
mouse_keycode="mouse_left",
25+
detect_threshold=0.9,
26+
draw_image=False
27+
)
28+
29+
locate_and_click(
30+
os.getcwd() + "/circle_ci_test/test_source/equal.png",
31+
mouse_keycode="mouse_left",
32+
detect_threshold=0.9,
33+
draw_image=False
34+
)
35+
locate_and_click(
36+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
37+
mouse_keycode="mouse_left",
38+
detect_threshold=0.9,
39+
draw_image=False
40+
)
41+
locate_and_click(
42+
os.getcwd() + "/circle_ci_test/test_source/2.png",
43+
mouse_keycode="mouse_left",
44+
detect_threshold=0.9,
45+
draw_image=False
46+
)
47+
locate_and_click(
48+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
49+
mouse_keycode="mouse_left",
50+
detect_threshold=0.9,
51+
draw_image=False
52+
)
53+
locate_and_click(
54+
os.getcwd() + "/circle_ci_test/test_source/3.png",
55+
mouse_keycode="mouse_left",
56+
detect_threshold=0.9,
57+
draw_image=False
58+
)
59+
locate_and_click(
60+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
61+
mouse_keycode="mouse_left",
62+
detect_threshold=0.9,
63+
draw_image=False
64+
)
65+
locate_and_click(
66+
os.getcwd() + "/circle_ci_test/test_source/4.png",
67+
mouse_keycode="mouse_left",
68+
detect_threshold=0.9,
69+
draw_image=False
70+
)
71+
locate_and_click(
72+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
73+
mouse_keycode="mouse_left",
74+
detect_threshold=0.9,
75+
draw_image=False
76+
)
77+
locate_and_click(
78+
os.getcwd() + "/circle_ci_test/test_source/6.png",
79+
mouse_keycode="mouse_left",
80+
detect_threshold=0.9,
81+
draw_image=False
82+
)
83+
locate_and_click(
84+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
85+
mouse_keycode="mouse_left",
86+
detect_threshold=0.9,
87+
draw_image=False
88+
)
89+
locate_and_click(
90+
os.getcwd() + "/circle_ci_test/test_source/7.png",
91+
mouse_keycode="mouse_left",
92+
detect_threshold=0.9,
93+
draw_image=False
94+
)
95+
locate_and_click(
96+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
97+
mouse_keycode="mouse_left",
98+
detect_threshold=0.9,
99+
draw_image=False
100+
)
101+
locate_and_click(
102+
os.getcwd() + "/circle_ci_test/test_source/8.png",
103+
mouse_keycode="mouse_left",
104+
detect_threshold=0.9,
105+
draw_image=False
106+
)
107+
locate_and_click(
108+
os.getcwd() + "/circle_ci_test/test_source/plus.png",
109+
mouse_keycode="mouse_left",
110+
detect_threshold=0.9,
111+
draw_image=False
112+
)
113+
locate_and_click(
114+
os.getcwd() + "/circle_ci_test/test_source/9.png",
115+
mouse_keycode="mouse_left",
116+
detect_threshold=0.9,
117+
draw_image=False
118+
)
119+
locate_and_click(
120+
os.getcwd() + "/circle_ci_test/test_source/equal.png",
121+
mouse_keycode="mouse_left",
122+
detect_threshold=0.9,
123+
draw_image=False
124+
)

circle_ci_test/test_source/1.png

415 Bytes
Loading

circle_ci_test/test_source/2.png

659 Bytes
Loading

circle_ci_test/test_source/3.png

658 Bytes
Loading

circle_ci_test/test_source/4.png

509 Bytes
Loading

0 commit comments

Comments
 (0)