testdriverai 4.0.40 → 4.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,12 +10,9 @@ tell application "System Events" to tell process "${windowName}"
10
10
  set frontmost to true
11
11
  end tell`;
12
12
 
13
- const appleScriptMinMax = (windowName, booleanString) => `
14
- tell application "${windowName}"
15
- set windowList to every window
16
- repeat with aWindow in windowList
17
- set miniaturized of aWindow to ${booleanString}
18
- end repeat
13
+ const appleScriptMinMax = (windowName, state) => `
14
+ tell application "System Events"
15
+ set value of attribute "AXMinimized" of every window of application process "${windowName}" to ${state}
19
16
  end tell
20
17
  `;
21
18
 
@@ -42,10 +39,10 @@ async function focusApplication(appName) {
42
39
  }
43
40
 
44
41
  async function hideTerminal(appName) {
45
-
42
+
46
43
  try {
47
44
  if (platform() == "mac") {
48
- return await execSync(`osascript -e '${appleScriptMinMax(appName, 'true')}'`);
45
+ return await execSync(`osascript -e '${appleScriptMinMax(appName, true)}'`);
49
46
  } else if (platform() == "linux") {
50
47
  } else if (platform() == "windows") {
51
48
  return runPwsh(appName, "Minimize");
@@ -60,7 +57,7 @@ async function showTerminal(appName) {
60
57
  try {
61
58
 
62
59
  if (platform() == "mac") {
63
- return await execSync(`osascript -e '${appleScriptMinMax(appName, 'false')}'`);
60
+ return await execSync(`osascript -e '${appleScriptMinMax(appName, false)}'`);
64
61
  } else if (platform() == "linux") {
65
62
  } else if (platform() == "windows") {
66
63
  return runPwsh(appName, "Restore");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.0.40",
3
+ "version": "4.0.41",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {