fix for window has leaked msg in tests
TestSelectAll Test: Condition instead of sleep