Screen capturing (recording) is not present after Sikuli-script execution.

Asked by abhijit baraskar

Once script is executed , Screenshots to be captured for report purpose.
Currently only message is displayed for each execution line of sikuli script in message tab.
So that actual screenshots can be compared with expected screenshot and defect can be understood correctly.
Help me out with above problem.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

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.

Can you help with this problem?

Provide an answer of your own, or ask abhijit baraskar for more information if necessary.

To post a message you must log in.