In my application when I open page X I expect to see either element A or element B. They are placed in different locations in DOM and can be found using their ids, for example
How can I ask webdriver to find either A or B?
There are a method driver.findElements(By) which will stop waiting when at least one element is found, but this method forces me to use the same locator for A and B.
What is the proper way to reliably find either A or B, so that I don't have to wait for implicit timeout?