testdriverai 4.1.22 → 4.1.24

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/agent.js CHANGED
@@ -350,7 +350,7 @@ const runCommand = async (command, depth) => {
350
350
  return await actOnMarkdown(response, depth);
351
351
  }
352
352
  } catch (error) {
353
- if (error.fatal) {
353
+ if (thisCommand == "run") {
354
354
  console.log("");
355
355
  log.log("info", chalk.red("Fatal Error") + `\n${error.message}`);
356
356
  await summarize(error.message);
@@ -954,7 +954,7 @@ const setTerminalApp = async (win) => {
954
954
  if (process.platform === "win32") {
955
955
  terminalApp = win?.title || "";
956
956
  } else {
957
- terminalApp = win?.owner?.name || "";
957
+ terminalApp = win?.owner?.bundleId || "";
958
958
  }
959
959
  };
960
960
 
@@ -16,12 +16,12 @@ end tell`;
16
16
  // set value of attribute "AXMinimized" of every window of application process "${windowName}" to true
17
17
  // end tell`;
18
18
 
19
- // const appleScriptActivate = (windowName) => `
20
- // tell application "${windowName}" to activate
21
- // `;
22
-
23
- const appleScriptOpen = (windowName) => `
24
- open -a "${windowName}"
19
+ const appleScriptActivate = (windowName) => `
20
+ tell application id "${windowName}"
21
+ set miniaturized of every window to false
22
+ reopen
23
+ activate
24
+ end tell
25
25
  `;
26
26
 
27
27
  const runPwsh = (appName, method) => {
@@ -60,7 +60,7 @@ async function hideTerminal(appName) {
60
60
  async function showTerminal(appName) {
61
61
  try {
62
62
  if (platform() == "mac") {
63
- return await execSync(appleScriptOpen(appName));
63
+ return await execSync(`osascript -e '${appleScriptActivate(appName)}'`);
64
64
  } else if (platform() == "windows") {
65
65
  return runPwsh(appName, "Restore");
66
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.1.22",
3
+ "version": "4.1.24",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {