← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #205413]: trying to trap errors in sikili script not quite working

 

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

    Status: Needs information => Open

ironmantis7x gave more information on the question:
Question: Does Sikuli allow for nested if statements?
In my app it is skipping whole sections of written code that should be failing...

ironmantis7x
 
----------------------------------------------------
Lizard (#4): Leave it to my friend.  He can do it!
Scorpion (#3): And who is your friend?
Lizard (#4):  A first class kung fu man; an expert!


________________________________
 From: RaiMan <question205413@xxxxxxxxxxxxxxxxxxxxx>
To: ironmantis7x@xxxxxxxxx 
Sent: Friday, August 10, 2012 8:21 AM
Subject: Re: [Question #205413]: trying to trap errors in sikili script not quite working
 
Your question #205413 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/205413

    Status: Open => Needs information

RaiMan requested more information:

if not exists("1344004317402.png"):
    print"[error]: Can't Start Application"
    exit(1)
   # should exit here with the error message
   # if image 1344004317402 is not found
# click("1344004317402.png") # delete - double with next statement

# this clicks image 1344004317402, if it was found
click(getLastMatch())

## need to wait for splash screen to disappear, if it comes up
# this will fail if image UserName-3 does not appear within 40 secs
wait("UserName-3.png", 40)

-------- So, exactly, what is your problem?

-- 
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/sikuli/+question/205413

You received this question notification because you asked the question.

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