From 00edf24d751672123eec0cb6db0b3c34a4bfd51c Mon Sep 17 00:00:00 2001 From: Teodor Nikolov Date: Thu, 9 Apr 2026 14:18:05 +0300 Subject: [PATCH] fix(debug): changed logic for finding window on app launch --- lib/commands/app.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/commands/app.ts b/lib/commands/app.ts index 3d56438..fd5db08 100644 --- a/lib/commands/app.ts +++ b/lib/commands/app.ts @@ -305,12 +305,6 @@ export async function waitForNewWindow(this: NovaWindowsDriver, pid: number, tim let attempts = 0; while (Date.now() - start < timeout) { - // const handles = getWindowAllHandlesForProcessIds([pid]); - - // if (handles.length > 0) { - // return handles[handles.length - 1]; - // } - const elements = await this.sendPowerShellCommand(AutomationElement.rootElement.findAll(TreeScope.CHILDREN, new PropertyCondition(Property.PROCESS_ID, new PSInt32(pid))).buildCommand()); const elementIds = elements.split('\n').map((id) => id.trim()).filter(Boolean); if (elementIds.length > 0) {