Adding waitForCondition command and tests.