pywinauto/pywinauto
View on GitHubAdd something like DoActionUntil() to make things stable
Open
#50 opened on Jul 2, 2015
Priority-Lowenhancementhelp wanted
Description
Sometimes window messages and mouse/keyboard actions are not really handled by test application because of short non-responding state or another reason.
We need to introduce some stabilization feature for such cases. Unstable code:
taskbar.Clock.ClickInput()
ClockWindow = taskbar.explorer_app.Window_(class_name='ClockFlyoutWindow')
ClockWindow.Wait('visible') # WindowNotFound exception may be raised here from time to time
Stable modification proposal (ideally we should simply wrap unstable code with stabilizer):
ClockWindow = taskbar.explorer_app.Window_(class_name='ClockFlyoutWindow')
DoActionUntil(
taskbar.Clock.ClickInput(),
ClockWindow.Wait('visible')
)
Let's discuss how it can be done. ;)