Run .skl file gives error

Asked by Rita Maia on 2018-09-16

Hi

I have a Sikuli script:

" from sikuli import *

click("CLIENTS.png")
wait("NotepadCZE7D.png") "

Then i have a python file and in that file a call the .skl file that has the sikuli script above. Like this:

"os.system('"C:\\Users\\Rita\\Desktop\\ISCTE\\2_ano\\Tese\\Sikuli\\ESIBIS_click_clients.sikuli\\ESIBIS_click_clients.skl"')"

When i run my python file and it calls the .skl file i get this error:

"org.sikuli.script.FindFailed: cannot find CLIENTS.png on the screen"

TO coclude if i run my sikuli script in SIKULI IDE it works perfectly.

Do you know what I'm doing wrong?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2018-09-17
Last query:
2018-09-17
Last reply:
2018-09-17
RaiMan (raimund-hocke) said : #1

consult the docs!

FindFailed simply means, that the image is not visible in that moment.

Rita Maia (ritamaia07) said : #2

I already consulted the docs.

And the image is visible in te moment that i'm running!

what am i doing wrong?
Or is there another way to do this?

Best RaiMan (raimund-hocke) said : #3

Might be, that YOU see the image, but only relevant is, whether SIKULIX can find that image with the given similarity (0.7 in your case) on the screen in that exact moment.

So read the docs about FindFailed and options to handle, put in some debugging (e.g. save a screenshot, when it happens) and more.

You might also define a region, where you think, that SikuliX should find the image and highlight it just before the click().

I cannot help you, since I cannot see what happens on your screen.

You have to make your mini-workflow more robust.

Or find another way to get what you want to achieve.

Rita Maia (ritamaia07) said : #4

Thanks RaiMan, that solved my question.