← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #179047]: how to copy Message tab data into file

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--1. messages to a file
run script from command line and pipe output to a file with >log.txt

--2. Sikuli's awareness of failures
Based on your question, one has to say, that Sikuli is dumb: It simply does what you script, but cannot tell you, wether the action did with the app, what you expected.
Sikuli can only tell you, what is visible on the screen or not. And it only looks for the images you have scripted.

In the case of type() you either have to go the risk, that it does not
work with your app (which means you have to kill the script in case it
does not work as expected), or you make sure in your script after the
type(), that the script can continue, by checking the visual content of
the screen.

e.g.
type("t", KEY_ALT)
if not exists("some-image-that-tells-ok.png"):
    print "did not work";  exit(1)

Sikuli checks for existence "some-image-that-tells-ok.png" and if it
does not show up within 3 seconds, the script ends here with your error
message.

Another option instead of stopping might be to script corrective actions
if possible at this point.

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