← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #201204]: Skip TestCase based on previous success/failure

 

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

    Status: Open => Answered

Jacob Dorman proposed the following answer:
I'd use a try-catch block inside of the testcase for 'xyz'.  I assume
you're considering a FindFailed or similar exception to be failing.  In
the except block, return a sentinel value (or perhaps False).   Add an
if statement that checks the returned value against your sentinel value,
and if its False (in our example), skip the 'abc' class tests.

I may be misinterpreting something, but the way I read it that should
work.

Try-Catch:
http://docs.python.org/tutorial/errors.html#handling-exceptions

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