if exists and assert exists are not behaving same
Hi,
To give a short background on what I'm trying to: I have list of datasets that I need to pick from a selector window.
Basically, I need to make sure that there is a dataset called "39W Anchor#Base Scenario 20110926". If this dataset happens to be at the top of the list then by default it is already selected meaning the image will be in black. Anywhere else, it will appear in white image.
So I have the following code:
if exists(Pattern("39W Anchor Loadset Unselected Version.
#print getLastMatch()
This works. Selects the image that I want. Now at the end I do an assert exists for either one of them and following is the code:
assert (exists(
This fails for some reason. I have to lower the similarity level down to 95 percent to make this work but then if I do that, then when I have a dataset called "39W Anchor#Base Scenario 20110919", it will pass and then select this wrong dataset.
Am I using the assert statement wrong?
Thank you,
sincerely,
Alex Yi
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Alex Yi
- Solved:
- Last query:
- Last reply: