testdriverai 4.0.39 → 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.
package/index.js CHANGED
@@ -588,7 +588,7 @@ const firstPrompt = async (text) => {
588
588
  } else if (input.indexOf('/quit') == 0) {
589
589
  await exit();
590
590
  } else if (input.indexOf('/save') == 0) {
591
- await save({ filepath: commands[0] });
591
+ await save({ filepath: commands[1] });
592
592
  } else if (input.indexOf('/explore') == 0) {
593
593
  await humanInput(commands.slice(1).join(' '), true)
594
594
  } else if (input.indexOf('/undo') == 0) {
@@ -808,7 +808,7 @@ ${yaml.dump(step)}
808
808
  }
809
809
 
810
810
  if (overwrite) {
811
- await save(file);
811
+ await save({ filepath: file });
812
812
  }
813
813
 
814
814
  setTerminalWindowTransparency(false);
@@ -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.39",
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": {