title: assertTrue() isn't throwing AssertionError
body: <p>I'm checking the presence of a button with assertTrue().</p>
  
  <pre><code>Assert.assertTrue(isElementPresent(By.cssSelector(or.getProperty("addCustomerButton"))));
  </code></pre>
  
  <p><code>addCustomerButton</code> contains the locator of the button.
  <code>isElementPresent()</code> code is:</p>
  
  <pre><code>public boolean isElementPresent(By by) {
  
      try {
          driver.findElement(by);
          return true;
      } catch(NoSuchElementException e) {
          return false;
      }
  
  }
  </code></pre>
  
  <p>When the <code>findElement()</code> in the try block of <code>isElementPresent()</code> method doesn't find the element, <code>findElement()</code> must throw the exception <code>NoSuchElementException</code>. I caught the exception in the catch block. If the <code>isElementPresent()</code> returns <code>true</code>, the assertion is <code>true</code> and there will be no <code>AssertionError</code> thrown. If the <code>isElementPresent()</code> return <code>false</code>, then the assertion is <code>false</code> and the <code>AssertionError</code> should be thrown, right?</p>
  
  <p>But in my script above, the <code>AssertionError</code> is not being thrown. the test is getting marked as PASSED.</p>
  
  <p>Update:
  After repeated modifications and executions, <code>AssertionError</code> is thrown.</p>
  
  <pre><code>Test — failed
  com.datadriven.testcases.BankManagerLoginTest loginAsBankManager 1542342446849 10126 
  
  Test
  com.datadriven.testcases.BankManagerLoginTest#loginAsBankManager
  
  Exception
  java.lang.AssertionError: expected [true] but found [false]
  at com.datadriven.testcases.BankManagerLoginTest.loginAsBankManager(BankManagerLoginTest.java:17)
  ... Removed 29 stack frames
  </code></pre>
  
  <p>I've changed the locator from <code>button[ng-click='addCust()']</code> to <code>button[ng-click='addCus']</code></p>