title: Sikuli screen.wait not working
body: <p>I'm using sikuli in Java, current IDE is eclipse oxygen</p>
  
  <p>this is my pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;Automation&lt;/groupId&gt;
    &lt;artifactId&gt;SeleniumTest&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.testng&lt;/groupId&gt;
        &lt;artifactId&gt;testng&lt;/artifactId&gt;
        &lt;version&gt;6.11&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
        &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
        &lt;version&gt;LATEST&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.sikulix&lt;/groupId&gt;
        &lt;artifactId&gt;sikulixapi&lt;/artifactId&gt;
        &lt;version&gt;1.1.0&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>my code like this </p>
  
  <pre><code>    @Test(description = "spin test")
      public void spinLongPeriod() throws Exception {
          int wait_time, last = 5000;
  
          caseReq.addAll(Arrays.asList(
                  new Pattern("src/test/resources/spin.png"),
                  new Pattern("src/test/resources/spin-stop.png"),
                  new Pattern("src/test/resources/spin-disabled.png"),
                  new Pattern("src/test/resources/good-luck.png"),
                  new Pattern("src/test/resources/spin-auto.png")
                  ));
  
          screen.wait(caseReq.get(0), 10);
          while (last &gt;= 0) {
              screen.click(caseReq.get(0));
              screen.click(caseReq.get(1));
              wait_time = 60;
              screen.wait(caseReq.get(0), wait_time);
  //          while (wait_time &gt;= 0) {
  //              Thread.sleep(1000);
  //              wait_time -= 1000;
  //              if (screen.exists(caseReq.get(0)) != null) {
  //                  break;
  //              }
  //          }
              --last;
          }
      }
  </code></pre>
  
  <p>I abandoned the sikuli Screen.wait method once because it failed</p>
  
  <p>By using the "while + Thread.sleep" solution for a while</p>
  
  <p>But not this time, error message came out</p>
  
  <pre><code>FindFailed: can not find P(src/test/resources/spin-stop.png) S: 0.7 in S(0)[0,0 1920x1080]
  </code></pre>
  
  <p>I'd sought the solution from Internet for a long time...</p>
  
  <p>Any suggestion?</p>