← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #214750]: assert not exists keeps failing even though really doesn't exist

 

Question #214750 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/214750

Shawn Robertson posted a new comment:
i ran my script and it failed on that line again.

i didnt change anything and just opened up a new empty script and copied
in

if exists("IDNew-2.png"):
    getLastMatch().highlight(3)
    assert False
else:
    assert True

since ID = 4 was present nothing flashed or highlighted and the message
area at the bottom remained empty.

i opened up a new window that contained ID = NEW and ran that blurb
again and a red box flashed 3 times around the ID = NEW area.

this tells me your snippet of code works but still leaves me wondering
why if your code can detect it fine why cant the simple assert not exist
detect it.

i may just try to work around this by asserting something else.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.