Update use wait_for() instead of time.sleep()