I am trying to use waituntilpasses
in pywinauto
to give an application time to open a new window. I have used SWAPY to identify the window details.
For the sake of testing I manually open the sub-window, so the WaitUntilPasses
should see this immediatly, it however does not.
The syntax appears OK as I can find and print the output of find_windows
, as below:
xx = pywinauto.findwindows.find_windows(
title=u'Choose template', class_name='#32770')[0]
print (xx)
This gives a response of 789646
However in my WaitUntilPasses command:
pywinauto.timings.WaitUntilPasses(
20, 0.5,
(pywinauto.findwindows.find_windows(
title=u'Choose template', class_name='#32770')[0]
)
)
It always times out. I cannot see the issue with the syntax, and have tried every permutation I can think of. Any tips would be greatly appreciated.