title: How to compare screenshot with saved png image with Sikuli
body: <p>I am using the following to try and compare a screenshot with a saved .png image but it is not working.  The screenshot and .png file are the same but I am getting the following error in eclipse:</p>
  
  <pre><code>java.lang.AssertionError: The following asserts failed:
      expected [P(C:/Users/pauljos/tmpDirectory.png) S: 0.7] but found [org.sikuli.script.ScreenImage@58fdd99]
  </code></pre>
  
  <p>I am using Sikuli in eclipse and here is my script:</p>
  
  <pre><code>Screen screen = new Screen(); 
  Pattern pattern4 = new Pattern("C:\\Users\\pauljos\\tmpDirectory.png");
  screen.click("C:\\Users\\pauljos\\explorerIcon.PNG");
  screen.click("C:\\Users\\pauljos\\explorerWhiteSpace.PNG");
  screen.type("c:/tmp");
  screen.type(Key.ENTER);
  ScreenImage img = screen.capture();
  sikuli_assert.assertEquals(img, pattern4);
  </code></pre>