← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #209147]: if exists with try catch

 

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

Omkkumar gave more information on the question:
Hi raiman, 
Thanks for your reply. 
I tried 
if exists(Pattern(sys.getCurrentWorkingDir()".\file.sikuli\file.png').similar(0.95)):
   try:
        getLastMatch().highlight(3)
        click(sys.getCurrentWorkingDir()".\file.sikuli\file.png")
    except sikuliexception:
         sys.exit(0)
I am getting error on the exists line stating that
TypeError: getPath():1st arg can't be coerced to String

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