title: Using verify in selenium testing using NUnit
body: <p>In the selenium IDE, there is a verify command. When I exported the command into c# I found that verify is basically an assert in a try catch statement and the error is added into a string.</p>
  
  <p>In my code, I want to use the functionality of the verify command but I do not want to use a try and catch statement for every single assert. </p>
  
  <p>Does anyone have a way to do this?</p>
  
  <p>edit:</p>
  
  <pre><code>public static void AssertVerticalAlignment(CustomWebDriver webDriver, IElement elementA, IElement elementB, double tolerance = 0)
      {
          try
          {
              Assert.AreEqual(elementA.Location.X, elementB.Location.X, tolerance);
          }
          catch (Exception exception)
          {
              LogHelper.LogException(exception.Message, exception.StackTrace, webDriver.GetScreenshot());
              throw;
          }
      }
  </code></pre>
  
  <p>What I want to do is add a message in the assert. It should say nameOfElementA is not aligned with nameOfElementB. But I don't want to give elementA and elementB a name property.</p>
  
  <p>This is how I call the method: <code>AssertVerticalAlignment(webdriver, homepage.NameInput, homepage.AgeInput)</code>
  Homepage is an object and NameInput is part of Homepage. NameInput is of type IElement, which is basically same as IWebElement, but it cannot interact with html, ie. it doesn't the ability to click, etc.</p>
  
  <p>So I want the message to say NameInput is not aligned with AgeInput</p>