You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.log.info(`Failed to locate window of the app. Sleeping for ${SLEEP_INTERVAL_MS} milliseconds and retrying... (${i}/20)`);// TODO: make a setting for the number of retries or timeout
@@ -282,45 +284,41 @@ export async function setWindowRect(
this.log.info(`Successfully attached to window. Native window handle: 0x${confirmedHandle.toString(16).padStart(8,'0')}`);
308
+
if(!trySetForegroundWindow(confirmedHandle)){
309
+
awaitthis.focusElement({
310
+
[W3C_ELEMENT_KEY]: elementId,
311
+
}satisfiesElement);
312
+
}
313
+
return;
314
+
}
315
+
}
316
+
}
294
317
}
295
318
296
-
this.log.debug(`Waiting for the process window to appear... (${++attempts}/${Math.floor(timeout/SLEEP_INTERVAL_MS)})`);
319
+
this.log.debug(`No attachable window found yet. Sleeping for ${SLEEP_INTERVAL_MS} milliseconds and retrying... (${++attempts}/${Math.floor(timeout/SLEEP_INTERVAL_MS)})`);
this.log.info(`The window with handle 0x${nativeWindowHandle.toString(16).padStart(8,'0')} is not yet available in the UI Automation tree. Sleeping for ${SLEEP_INTERVAL_MS} milliseconds and retrying... (${i}/20)`);// TODO: make a setting for the number of retries or timeout
313
-
awaitsleep(SLEEP_INTERVAL_MS);// TODO: make a setting for the sleep timeout
0 commit comments