WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

session.Manage().Window.Maximize() Not always maximizing window.

Open Tree55Topz opened this issue 1 year ago • 2 comments

This seems to happen very rarely, but sometimes happens when trying to launch our WinUI app. The app will start just fine, but it does not become maximized.

Has anyone every ran into this occurring intermittently? Any workarounds to guarantee the app becomes maximized before the test runs?

Tree55Topz avatar Oct 26 '23 21:10 Tree55Topz

@Tree55Topz may set focus on the app before maximizing help to improve stability

sessoin.SwitchTo().Window(sessoin.CurrentWindowHandle);

Shakevg avatar Oct 27 '23 14:10 Shakevg

@Tree55Topz Maybe related? We have had stable startups for a while now. We discovered the following with our video logging.

Starting the application will fail if there is no splash screen or window within 10 seconds. Our workaround was to grab the processId from the exception. Then use a root session to await the existence of a window with the processId. Then attach to that window to maximize as shown above.

liljohnak avatar Oct 28 '23 02:10 liljohnak