add waitForAllElementsExist() method