How to wait for either of the two elements in the page using selenium xpath

Viewed 6955

I have two elements I can wait for, I want to wait until either of them appears on the page.

I am trying to use xpath locator. But it is not working.

By.xpath("//*[(contains(@id,'idNumber1')) or (contains(@id,'idNumber2'))]"));

Is this achievable?
Please help me out.

4 Answers
Related