Update waitForElement.js