This comes "for free" with WebDriverWait
.
There is a value you can set when creating the WebDriverWait
to tell it how often it should be attempting to run your code (which is clicking the search button):
http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/ui/FluentWait.html#pollingEvery(long, java.util.concurrent.TimeUnit)
So just set pollingEvery
equal to three seconds.