testdriverai 5.7.1 → 5.7.2
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/lib/focus-application.js
CHANGED
|
@@ -38,7 +38,12 @@ end tell`;
|
|
|
38
38
|
// set value of attribute "AXMinimized" of every window of application process "${windowName}" to true
|
|
39
39
|
// end tell`;
|
|
40
40
|
|
|
41
|
-
const appleScriptActivate = (windowName) => `
|
|
41
|
+
const appleScriptActivate = (windowName) => `
|
|
42
|
+
tell application "${windowName}"
|
|
43
|
+
reopen
|
|
44
|
+
activate
|
|
45
|
+
end tell
|
|
46
|
+
`;
|
|
42
47
|
|
|
43
48
|
const runPwsh = (appName, method) => {
|
|
44
49
|
let script = `powershell -ExecutionPolicy Bypass -Command "& { ${scriptPath} '${appName}' '${method}' }"`;
|
|
@@ -88,9 +93,9 @@ async function showTerminal(appName) {
|
|
|
88
93
|
if (!config.TD_VM) {
|
|
89
94
|
try {
|
|
90
95
|
if (platform() == "mac") {
|
|
91
|
-
await execSync(`osascript -e '${appleScriptActivate(appName)}'
|
|
92
|
-
await execSync(`osascript -e '${appleScriptSetFrontmost(appName)}'
|
|
93
|
-
|
|
96
|
+
await execSync(`osascript -e '${appleScriptActivate(appName)}'`, { stdio: [] });
|
|
97
|
+
await execSync(`osascript -e '${appleScriptSetFrontmost(appName)}'`, { stdio: [] });
|
|
98
|
+
|
|
94
99
|
} else if (platform() == "windows") {
|
|
95
100
|
return runPwsh(appName, "Restore");
|
|
96
101
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 5.6.5
|
|
2
|
+
session: 682a09d01e7bdbd8dadde346
|
|
3
|
+
steps:
|
|
4
|
+
- prompt: focus chrome
|
|
5
|
+
commands:
|
|
6
|
+
- command: focus-application
|
|
7
|
+
name: Google Chrome
|
|
8
|
+
- prompt: focus chrome
|
|
9
|
+
commands:
|
|
10
|
+
- command: focus-application
|
|
11
|
+
name: Google Chrome
|
|
12
|
+
- prompt: focus chrome
|
|
13
|
+
commands:
|
|
14
|
+
- command: focus-application
|
|
15
|
+
name: Google Chrome
|
|
File without changes
|