click(exists()) always return True

Asked by Evgen

Hi,
Usually Im using code something like this:

if not click(exists('some_image')):
    # do some actions to make image visible
    click('some_image')

But after update to version 1.1.0 ive noticed that click(exists('some_nonexistent_image')) always return True. Checked in version 1.0.1 - False was returned.

Is it normal behavior? Should I wait for some fix or update my scripts to "if exists > else" ? Or maybe im not using it right?

BTW thanks for great automation tool RaiMan )))

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Katy (katymagowan) said :
#1

Can you use:

if not exists (image):
       #do actions to make image visible
else:
       #do this

Revision history for this message
Evgen (fortotal) said :
#2

Sure I can, and i will if changes in version 1.1.0 is permanent. But I wonder, maybe version 1.1.1 will fix this

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

made it a bug