Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/commands/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export async function changeRootElement(this: NovaWindowsDriver, pathOrNativeWin

const path = pathOrNativeWindowHandle;
if (path.includes('!') && path.includes('_') && !(path.includes('/') || path.includes('\\'))) {
await this.sendPowerShellCommand(/* ps1 */ `Start-Process 'explorer.exe' 'shell:AppsFolder\\${path}'`);
await this.sendPowerShellCommand(/* ps1 */ `Start-Process 'explorer.exe' 'shell:AppsFolder\\${path}'${this.caps.appArguments ? ` -ArgumentList '${this.caps.appArguments}'` : ''}`);
await sleep(500); // TODO: make a setting for the initial wait time
for (let i = 1; i <= 20; i++) {
const result = await this.sendPowerShellCommand(/* ps1 */ `(Get-Process -Name 'ApplicationFrameHost').Id`);
Expand All @@ -154,7 +154,7 @@ export async function changeRootElement(this: NovaWindowsDriver, pathOrNativeWin
}
} else {
const normalizedPath = normalize(path);
await this.sendPowerShellCommand(/* ps1 */ `Start-Process '${normalizedPath}'`);
await this.sendPowerShellCommand(/* ps1 */ `Start-Process '${normalizedPath}'${this.caps.appArguments ? ` -ArgumentList '${this.caps.appArguments}'` : ''}`);
await sleep(500); // TODO: make a setting for the initial wait time
for (let i = 1; i <= 20; i++) {
try {
Expand Down
3 changes: 3 additions & 0 deletions lib/constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const UI_AUTOMATION_DRIVER_CONSTRAINTS = {
shouldCloseApp: {
isBoolean: true,
},
appArguments: {
isString: true
},
} as const satisfies Constraints;

export default UI_AUTOMATION_DRIVER_CONSTRAINTS;
Expand Down