Sleep will always pause for a set amount of time before executing some code, while wait will only pause execution until an expected condition occurs or it times out, whichever comes first. You should never use sleep in a test automation framework as you want your tests to run as fast as possible.