testdriverai 4.0.19 → 4.0.20
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 +1 -1
- package/package.json +1 -1
package/lib/focus-application.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const { execSync } = require("child_process");
|
|
4
4
|
const { platform } = require("./system");
|
|
5
|
+
const scriptPath = path.join(__dirname, "focusWindow.ps1");
|
|
5
6
|
|
|
6
7
|
// apple script that focuses on a window
|
|
7
8
|
const appleScriptShow = (windowName) => `
|
|
@@ -20,7 +21,6 @@ async function focusApplication(appName) {
|
|
|
20
21
|
// TODO: This needs fixing
|
|
21
22
|
return await execSync(`wmctrl -a '${appName}'`);
|
|
22
23
|
} else if (platform() == "windows") {
|
|
23
|
-
const scriptPath = path.join(__dirname, "focusWindow.ps1");
|
|
24
24
|
return await execSync(`powershell "${scriptPath}" "${appName}" -Action "Show"`);
|
|
25
25
|
}
|
|
26
26
|
|