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

Asked by Tony May on 2019-12-03

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2019-12-03
Last query:
2019-12-03
Last reply:
2019-12-03
RaiMan (raimund-hocke) said : #1

use wait() instead of find()

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.

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

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()?

Tony May (tonymay) said : #5

Thanks RaiMan, that solved my question.