If there is any ajax process in your page that you test, it’s better to wait for ajax request is complete. Otherwise, your next step can fail.
if you do your test with Selenium IDE, you can use waitForCondition command.
Target is: selenium.browserbot.getUserWindow().$.active == 0
Value: Timeout duration in milisecond. to wait max 30 seconds you will give value: 30000
you can complete commands in above picture.