From 444f12145ca07efdae3b528dbad613e6f397af5e Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Mon, 13 Jan 2025 12:51:00 +0800
Subject: [PATCH 1/6] Update screenshot test
Update screenshot test
* Add open calc and edge
---
.idea/workspace.xml | 44 ++++++++++++++----------
test/unit_test/screen/screenshot_test.py | 5 +++
2 files changed, 31 insertions(+), 18 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index aca0929..c53d3f7 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,9 @@
-
+
+
+
@@ -68,13 +70,14 @@
"Python.executor_one_file.executor": "Run",
"Python.screen_test.executor": "Run",
"Python.screenshot_test.executor": "Run",
+ "Python.video_recording.executor": "Run",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "dev",
"ignore.virus.scanning.warn.message": "true",
- "last_opened_file_path": "C:/CodeWorkspace/Python/AutoControlGUI",
+ "last_opened_file_path": "C:/CodeWorkspace/Python/AutomationIDE",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -100,8 +103,8 @@
-
-
+
+
@@ -110,12 +113,12 @@
-
+
-
+
@@ -124,7 +127,7 @@
-
+
@@ -133,12 +136,12 @@
-
+
-
+
@@ -147,7 +150,7 @@
-
+
@@ -156,12 +159,12 @@
-
+
-
+
@@ -170,7 +173,7 @@
-
+
@@ -179,12 +182,12 @@
-
+
-
+
@@ -218,11 +221,11 @@
+
-
@@ -543,6 +546,10 @@
+
+
+
+
@@ -566,10 +573,11 @@
+
-
-
+
+
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index a6f4212..024f06c 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -1,3 +1,5 @@
+import subprocess
+
from je_auto_control import screenshot
# choose screenshot screen_region
@@ -5,6 +7,9 @@
assert (image is not None)
print(image)
+subprocess.Popen("calc", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
+subprocess.Popen("edge", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
+
# screenshot and save
image = screenshot("test.png")
assert (image is not None)
From 51080ec23c5ac2ce201f044b7fc9cebbca50bbbf Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Mon, 13 Jan 2025 13:02:22 +0800
Subject: [PATCH 2/6] Update screenshot_test.py
---
test/unit_test/screen/screenshot_test.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index 024f06c..9325fd5 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -8,7 +8,6 @@
print(image)
subprocess.Popen("calc", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
-subprocess.Popen("edge", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
# screenshot and save
image = screenshot("test.png")
From 0c2cd0701a794d6aa0c3fe9e4437da839032d4d0 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Mon, 13 Jan 2025 13:23:23 +0800
Subject: [PATCH 3/6] Update screenshot_test.py
---
test/unit_test/screen/screenshot_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index 9325fd5..031148a 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -7,7 +7,7 @@
assert (image is not None)
print(image)
-subprocess.Popen("calc", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
+subprocess.call("notepad.exe")
# screenshot and save
image = screenshot("test.png")
From 1b538e948f9c236095daf5abd79b2f005a82ff0f Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Mon, 13 Jan 2025 13:31:05 +0800
Subject: [PATCH 4/6] Update screenshot_test.py
---
test/unit_test/screen/screenshot_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index 031148a..8bcc520 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -7,7 +7,7 @@
assert (image is not None)
print(image)
-subprocess.call("notepad.exe")
+subprocess.Popen("notepad.exe", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
# screenshot and save
image = screenshot("test.png")
From 1993d157ff37b5a4aa55087b4463b1525f088633 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Mon, 13 Jan 2025 13:37:14 +0800
Subject: [PATCH 5/6] Update screenshot_test.py
---
test/unit_test/screen/screenshot_test.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index 8bcc520..3dbf9ee 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -1,4 +1,5 @@
import subprocess
+import time
from je_auto_control import screenshot
@@ -9,6 +10,8 @@
subprocess.Popen("notepad.exe", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
+time.sleep(10)
+
# screenshot and save
image = screenshot("test.png")
assert (image is not None)
From 8ba745de9bfae2897279fdc3563e950354da7144 Mon Sep 17 00:00:00 2001
From: JE-Chen <33644111+JE-Chen@users.noreply.github.com>
Date: Tue, 11 Feb 2025 23:41:58 +0800
Subject: [PATCH 6/6] Add rpa open test
Add rpa open test
---
.idea/workspace.xml | 12 +++++++-----
test/unit_test/screen/screenshot_test.py | 7 -------
.../unit_test/use_this_as_rpa_test/rpa_open_test.py | 13 +++++++++++++
3 files changed, 20 insertions(+), 12 deletions(-)
create mode 100644 test/unit_test/use_this_as_rpa_test/rpa_open_test.py
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c53d3f7..040ae0b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,7 +5,8 @@
-
+
+
@@ -77,7 +78,7 @@
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "dev",
"ignore.virus.scanning.warn.message": "true",
- "last_opened_file_path": "C:/CodeWorkspace/Python/AutomationIDE",
+ "last_opened_file_path": "C:/CodeWorkspace/Python/NovelAI_RPA",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -103,7 +104,7 @@
-
+
@@ -221,8 +222,8 @@
-
+
@@ -550,6 +551,7 @@
+
@@ -576,7 +578,7 @@
-
+
diff --git a/test/unit_test/screen/screenshot_test.py b/test/unit_test/screen/screenshot_test.py
index 3dbf9ee..a6f4212 100644
--- a/test/unit_test/screen/screenshot_test.py
+++ b/test/unit_test/screen/screenshot_test.py
@@ -1,6 +1,3 @@
-import subprocess
-import time
-
from je_auto_control import screenshot
# choose screenshot screen_region
@@ -8,10 +5,6 @@
assert (image is not None)
print(image)
-subprocess.Popen("notepad.exe", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
-
-time.sleep(10)
-
# screenshot and save
image = screenshot("test.png")
assert (image is not None)
diff --git a/test/unit_test/use_this_as_rpa_test/rpa_open_test.py b/test/unit_test/use_this_as_rpa_test/rpa_open_test.py
new file mode 100644
index 0000000..799e63f
--- /dev/null
+++ b/test/unit_test/use_this_as_rpa_test/rpa_open_test.py
@@ -0,0 +1,13 @@
+import subprocess
+import time
+
+from je_auto_control import screenshot
+
+subprocess.Popen("notepad.exe", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
+
+time.sleep(10)
+
+# screenshot and save
+image = screenshot("test.png")
+assert (image is not None)
+print(image)
\ No newline at end of file