← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #662546]: Screen capturing (recording) is not present after Sikuli-script execution.

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
This generally is not a feature of SikuliX.

You have to do it on your own.

At least this is available in the next 1.1.2 nightly build:

supposing you have a one-monitor system:

hover("someImage.png")
# Option one gives: _test.png
# stored in current bundle path and 
# safe against auto-delete at script save (by the leading _ )
Screen(0).lastScreenImage.saveInBundle("test")

# Option two gives: test-1515062199343.png
# the number is the current time when saved
# the number of milliseconds since January 1, 1970, 00:00:00 GMT
Screen(0).lastScreenImage.save(<some-absolute-path>, "test")

the content of Screen(0).lastScreenImage (of class ScreenImage) is the
internal capture used for the last search op of the last find operation.

Be aware: you have to deal with FindFailed situations (using only
exists() might be an option)), to get your Screen(0).lastScreenImage
saved even if the last find failed.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.