Does Sikuli have a function to save a screenshot as png while test is running

Asked by Ali Ahmed

Does sikuli have function where it captures screen during test and saves it in folder so I can view it later?

Question information

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

Nevermind I found a solution.

import shutil
import os

some_region = SCREEN # for whole screen
#someRegion = App.focusedWindow() # for the frontmost windo
img = capture(some_region)
shutil.move(img,"/SikuliX/Result images/NameTest.png")
print("image is saved")