title: How to chose either of 2 elements on a Webpage using Selenium WebDriver?
body: <p>I am running a test on a web page that may or may not have a certain element.
  The procedure is the following: I fill out the form, then click "Search" button. When the browser opens a new url, I need to choose an element_1, but if it does not exist I must choose element_2.</p>
  
  <pre><code>WebElement element = driver.findElement(By.xpath("//....")) || driver.findElement(By.xpath("//..."));
  element.click();
  </code></pre>
  
  <p>// This does not do the trick, is there any other way? Is it possible to do without try and catch?</p>