Menu

#8 FRE: allow waiting not only on WindowSpecification objects

closed
None
5
2007-12-03
2007-06-20
No

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?

Discussion

  • Michael Schlenker

    • assigned_to: nobody --> mcmahon_m
     
  • Mark Mc Mahon

    Mark Mc Mahon - 2007-06-22

    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')

     
  • Mark Mc Mahon

    Mark Mc Mahon - 2007-12-03
    • status: open --> closed
     

Log in to post a comment.