public static void wait(int milliseconds) {
        if (milliseconds > 0) {
            try {
                Thread.sleep(milliseconds);
            }
            catch (InterruptedException ex) {
                System.err.println("Wait was interrupted!");
                // Restore interrupted state...
                Thread.currentThread().interrupt();
            }
        }
    }
Waits specified amount of milliseconds.

@param milliseconds how many milliseconds to wait
primefaces-selenium/primefaces-selenium-core/src/main/java/org/primefaces/selenium/PrimeSelenium.java