title: How do i click on a particular image during runtime?
body: <p>I am working with filling up form where fields can be checkbox/radio button/textbox/datepicker/timepicker etc.
  I am facing an issue with clicking on 'TimePicker' basically one clock icon is given on right hand side, when i am clicking on it, one popup displays from which i do have to pick the time.
  Please refer image. <a href="https://i.stack.imgur.com/MUOXz.jpg" rel="nofollow noreferrer">https://i.stack.imgur.com/MUOXz.jpg</a> There is no locator with help of which i can click on 'clock' icon.
  Here is html DOM.</p>
  <pre><code>&lt;ac-input _ngcontent-brk-c387=&quot;&quot; inputtype=&quot;time&quot; _nghost-brk-c374=&quot;&quot; class=&quot;visible ng-untouched ng-pristine ng-invalid ng-star-inserted&quot; xpath=&quot;1&quot;&gt;
      &lt;div _ngcontent-brk-c374=&quot;&quot; class=&quot;col-sm-12 col-md ng-star-inserted&quot;&gt;
          &lt;div _ngcontent-brk-c374=&quot;&quot; class=&quot;form-group&quot;&gt;
              &lt;ac-label _ngcontent-brk-c374=&quot;&quot; _nghost-brk-c371=&quot;&quot;&gt;
                  &lt;label _ngcontent-brk-c371=&quot;&quot; aria-hidden=&quot;true&quot; class=&quot;ql-editor required ng-star-inserted&quot; for=&quot;&lt;p&gt;
                      &lt;p&gt;
                      2. Time:
                      &lt;/p&gt;
                  &lt;/label&gt;
              &lt;/ac-label&gt;
      &lt;div _ngcontent-brk-c374=&quot;&quot;&gt;
          &lt;input _ngcontent-brk-c374=&quot;&quot; class=&quot;form-control ng-star-inserted&quot; id=&quot;&lt;p&gt;&lt;/p&gt;&quot; type=&quot;time&quot;&gt;
      &lt;/div&gt;
      &lt;ac-hint _ngcontent-brk-c374=&quot;&quot; _nghost-brk-c372=&quot;&quot;&gt;
      &lt;/ac-hint&gt;
      &lt;ac-validation-messages _ngcontent-brk-c374=&quot;&quot; role=&quot;alert&quot; aria-atomic=&quot;true&quot; _nghost-brk-c348=&quot;&quot; style=&quot;&quot;&gt;
      &lt;/ac-validation-messages&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/ac-input&gt;
  </code></pre>
  <p>I have captured 'Clock' icon with the help of snipping tool from the application and pasted on desktop as well under my application under the 'Screenshot' folder.
  But click event is not happening from application at run time but its clicking the  'Clock' icon from desktop. And console output for it is &quot;[log] DOUBLE CLICK on L[410,442]@S(0) (69 msec)&quot;.</p>
  <p>Here is what i tried...</p>
  <pre><code>else if(answerType.equals(&quot;Time&quot;))
                        {
                           
                          
                              WebElement timeText = answers.get(ans) .findElement(By.tagName(&quot;label&quot;));
                              System.out.println(timeText.getText());
                                                     
                              Screen screen = new Screen();                           
                                                                       
              Pattern image1 = new Pattern(&quot;C:\\Selenium\\workspace\\C_Care\\Screenshots\\Clock.PNG&quot;);
              Pattern image2 = new Pattern(&quot;C:\\Selenium\\workspace\\C_Care\\Screenshots\\Twelve.png&quot;);
                          
                              screen.wait(image1, 10);
                                  
                              for(int sc=0; sc&lt;6; sc++)
                              {
                                  screen.mouseMove(image1);
                                  screen.doubleClick(image1);
                                  break;
                                  }
                              screen.wait(image2,10);
                              screen.click(image2);
                      }
  </code></pre>
  <p>I a working with TestNg framework and used maven dependency for Sikuli is 2.0.4.</p>
  <p>Any help will be appreciated.</p>