Question #685325 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685325
Status: Needs information => Answered
masuo proposed the following answer:
example to capture screenshot when the image do not appear
import datetime
import shutil
SCREENSHOT = getBundlePath()+"\screenshot"
#---------------------------
def capture_screen():
tmppath = SCREEN.capture(SCREEN.getBounds()).getFile()
capturefile = datetime.datetime.today().strftime("%Y%m%d-%H%M%S") + ".png"
savepath = os.path.join(SCREENSHOT, capturefile)
shutil.move(tmppath, savepath)
#---------------------------
if not exists("image.png",5):
capture_screen()
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp