testdriverai 4.1.23 → 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 +1 -1
- package/lib/focus-application.js +7 -7
- package/package.json +1 -1
package/agent.js
CHANGED
package/lib/focus-application.js
CHANGED
|
@@ -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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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(
|
|
63
|
+
return await execSync(`osascript -e '${appleScriptActivate(appName)}'`);
|
|
64
64
|
} else if (platform() == "windows") {
|
|
65
65
|
return runPwsh(appName, "Restore");
|
|
66
66
|
}
|