Refactoring Selenium tests: wait and find element by id