Use waitFor instead of sleeping.
Remove sleep from the following,

Button, float, int, multicontainer, selection widgets.
Use wait_for_widget in widgets and string widget tests
Merge pull request #4952 from jdfreder/widget-tests

Widget test inconsistencies

add wait_for_widget