Is there a timeout value on find()? if not can one be added

Asked by Tony May

Im my testing we have some text that flashes, when trying to match an image to this text it sometimes fails depending on timing. The exists() function has a timeout value that is user specified, is there a such timeout for find()? if not then can one be added to allow the user to specify a timeout for finding an image?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

use wait() instead of find()

Revision history for this message
Tony May (tonymay) said :
#2

Hi RaiMan, I need to use find() so that I can get the screen coordinates of the found image for use in click, etc.

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

please consult the docs about the usage.

wait() does the same as find(), but waits for the image to appear

Revision history for this message
Tony May (tonymay) said :
#4

Hi RaiMan, I see from the documentation that wait() returns the image like find() does? therefore I should be able to use wait() to return the found image instead of using find()?

Revision history for this message
Tony May (tonymay) said :
#5

Thanks RaiMan, that solved my question.