← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #207687]: How to stop test on the first failure

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
The unit test in Sikuli, which uses Jython 2.5.2 is at the Python level
2.5. The mentioned features are only available with Python 2.7+ (so not
available in Sikuli :-(

There is a unittest2, which back ported some of the new features to previous Python levels.
Get it from the net and make it available for Sikuli to import.

Before starting:
look faq 1804 and the relevant Python/Jython docs in the net

---------- One more thing:
You are very often using this combinations like

                  if (exists("MIPO39WAncho.png")):
                        click("MIPO39WAncho.png")

since the exists() already found the match, you can use getLastMatch()
to click it and save an additional search for the same image:

                  if (exists("MIPO39WAncho.png")):
                        click(getLastMatch())

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