Is there a way to take snapshot during sikuli tests ?

Asked by gregory

Hi, I'm just asking is there an easy way to take some snapshot during execution of sikuli tests. This is just to have some debug during test or some visual results after tests finished.

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
gregory
Solved:
Last query:
Last reply:
Revision history for this message
vitalliuss (vitalliuss) said :
#1

Try this:

import shutil
import os

f = capture(getBounds()) #take screenshot
shutil.move(f, destination + name) #save as image file to the destination folder, f.e. "Results". Name can be "image.png"

Revision history for this message
gregory (gregory-grimaux) said :
#2

it works perfectly. Thank you very much.