SikuliX not finding moving images

Asked by kdr25

I'm trying to have Sikuli click on an arrow inside of a textbox so that the next textbox can appear. It's basically a text advancing button. The problem is that the arrow lazily moves up and down and Sikuli fails the find. I am waiting 10s, which should be more than enough time. I have a hunch that since the arrow is moving up and down, Sikuli is not able to find and interact with it before the arrow changes position again.
In my latest attempt, I actually got this:

FindFailed: imgs/arrow.png: (71x54) seen at (1357, 864) with 1.00 in R[341,70 1220x763]@S(0) E:Y, T:3.0
  Line 2761, in file Region.java

Normally when FindFailed exception is thrown, I don't see the "seen at (x, y)" part, but this time I did. Any help would be appreciated in getting Sikuli to click a (slow) moving object.

Thanks in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex (carroll-alex-d) said :
#1

Normally that find failed message with those details means that the image was found on the screen but not within the region you prescribed for it. I would suggest expanding your search region.

Side note, can you do a drag select of the region to give the object focus and then press space or enter? I've used that as a workaround for some forms with similar issues.

Revision history for this message
kdr25 (kdoubler25) said :
#2

Sadly, it must be a click to advance the text so there is no other workaround.

Thanks for the clarification about the error. I checked again and it's saying that the arrow was found outside of the region, however, I know for a fact that it was inside the region. I used Selenium to get the element's top-left co-ords and pulled the CSS attribute for how large the container for the game is. That way I was able to create a region for the container exactly. I find it very weird that it found an arrow outside the container.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

can you point to the webpage, that has this situation?
Or store a short video of the situation somewhere in the cloud?

paste the code snippet, that you used.

Revision history for this message
kdr25 (kdoubler25) said :
#4

@RaiMan
Could I contact you privately? I'm not too sure if you'll be able to access the webpage (you probably will be able to). I can send you my code and credentials there.
Essentially what I'm doing is trying to click a moving arrow well within a region that I've created.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

sikulix--at--outlook--dot--com
For now just the code and a link to the page

Can you help with this problem?

Provide an answer of your own, or ask kdr25 for more information if necessary.

To post a message you must log in.