FRE: allow waiting not only on WindowSpecification objects
Status: Alpha
Brought to you by:
mcmahon_m
Hi,
i stumpled across the Wait() and WaitNot() methods in the WindowSpecification class and wondered why they are not available in the HwndWrapper class?
Currently i have to either use timings.WaitUntil() with something like HwndWrapper.IsVisible() or similar, or write a lot of small wrappers like:
ctrl = ...
ctrl_win = app.window_(handle=ctrl)
ctrl_win.Wait('ready',60.0)
Or i need to do:
ctrl = ...
timings.WaitUntil(60.0,0.5,ctrl.IsReady())
Any reason it is not simply:
ctrl.Wait('ready')
with a configurable timeout/retry in the timings module?
Logged In: YES
user_id=1424947
Originator: NO
I feel the separation between HwndWrapper (and derived classes) and WindowSpecification objects is right (but maybe I can be convinced).
I also have problems understanding your problem fully.
Why not use ...?
app.dlg.ctrl.Wait('ready')
you can even do
ctrl = app.dlg.ctrl
ctrl.Wait('ready')