title: How to compare the output of a function with a value on screen?
body: <p>I have a java function that returns current date.</p>
  
  <pre><code>DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
  Date date = new Date();    
  System.out.println("Current Date: "+dateFormat.format(date));    
  </code></pre>
  
  <p>Using selenium web driver I want to compare the output of above function with the date displayed on the U.I. </p>
  
  <p>How can this be done?</p>