← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #264188]: Have background observation interrupt/pause main thread

 

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

    Status: Answered => Open

David Scheele is still having a problem:
Thanks for the quick reply!

I'm new to Python, RFW and Sikuli so I might make stupid mistakes.
To your suggestions:

- in the observe handler issue a Java System.exit() or any other means to stop the JVM.
I don't know how. Is there a simple line i could put into Sikuli to get this?

- If this does not work: do something, that lets the complete process crash (no idea though what).
Yep... no idea either :D

- Another possibility would be to use some reflection to get access to the top driving Jython object and force it to terminate.
- Same goes for some intermediate RFW objects in the call stack.
Seems much too high level for my knowledge and hack-complicated

If I throw RFW an error it will stop the test and initiate teardown
scripts. Looks like this:

raise AssertionError("Fail!")

That will stop RFW but only if its in the main thread. I tried to put it
in the handler, and print()'s and even popups will be handled, prints
being visible in RFW report later and popups opening correctly. But the
Errors don't show anywhere for some reason. And most importantly they
don't fail the test.

I actually am on 1.1.0. If RFW would accnowledge the errors that would
at least be a start. But I have no clue what it does with the sub-thread
errors.

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