add waitForElement method for element