Added assertion for waitForCondition through a variable