would waitForCondition() work better here? sometimes IT tests don't pass on the first attempt for me, I suspect code this is responsible.