WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Switch to existing window takes too long

Open lbranko opened this issue 1 year ago • 3 comments

I am using WinAppDriver on Windows 11, on RobotFrameowork with robotframework-applicationlibrary and it works very nicely. Since a few days ago, I've been having problems with waiting too long when trying to switch to an existing application. Until now, that switch took me about 4-5 seconds, but now it takes a very long time - about 40-50 seconds. I also noticed that searching for objects with inspect.exe takes a very long time (actually Inspect freezes very often) so I suspect that could be related. What could be the reason for that?

This is my part of the code where the difference in execution time can be seen image

lbranko avatar Oct 31 '23 14:10 lbranko

lbranko I suppose that the issue related to changing controls displayed on your Desktop, When you try to search your app related to the Desktop, the speed depends on how many controls are on the Desktop.

You can try attaching to the app by process name, it should help: https://github.com/microsoft/WinAppDriver/issues/1330#issuecomment-704270798 https://github.com/microsoft/WinAppDriver/issues/1330#issuecomment-708028986

Shakevg avatar Nov 01 '23 13:11 Shakevg

Yes, I know it depends on the number of open applications on the desktop. But in this example I gave I have an equal number of applications open (actually only the applications running in automation) I'm pretty sure something in the configuration on the computer is affecting this behavior, but I'm not sure what.

lbranko avatar Nov 02 '23 15:11 lbranko

It also can be after Windows update

Shakevg avatar Nov 02 '23 20:11 Shakevg