exists returns true even if the image doesnt exist
I have written a script to handle an image, lets say named popup. these are the steps i followed:
1. open a window and see if this popup exists:
if popup: do this.
else: do this.
the problem is, it works fine if i run it the first time but, if you are running it loops/recursively it starts finding the image popup even if popup doesn't exists. I tried highlighting it and it seems to be getting a ghost image. So, even if the image popup doesn't exist it is getting into the "if popup:" section always and getting errors even if I want the script to enter the else: part instead.
PS:
I have not defined any region, instead I have used the whole screen.
And yes, there is absolutely no image(popup) and I have used similar(0.9), and there is no room for it to find an accidental image similar to popup on the screen.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- albertsag
- Solved:
- Last query:
- Last reply: