title: How do I verify that an element does not exist in Selenium 2
body: <p>In Selenium 2 I want to ensure that an element on the page that the driver has loaded does not exist. I'm including my naive implementation here.</p>
  
  <pre><code>    WebElement deleteLink = null;
      try {
          deleteLink = driver.findElement(By.className("commentEdit"));
      } catch (NoSuchElementException e) {
  
      }
      assertTrue(deleteLink != null);
  </code></pre>
  
  <p>Is there a more elegant way that basically verifies to assert that NoSuchElementException was thrown?</p>