← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661972]: Can sikuli capture screenshots and save them as files?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
please read again carefully:

capture(region | text, [path, ]name)
only available in Python scripting

Parameters:	
| text (region) – an existing region object or text to display in the interactive mode.
path – a path to a folder where the image is stored
text – name of the image file (.png can be omitted)
Returns:	
the absolute path of the stored image as path/name.png or None if no success
Works principally the same as the normal capture, but directly stores the resulting image to the specified location. The ``name``spec need not have the .png ending.

If the path specification is omitted, the imagefile is stored in the
current bundlepath. In this case the imagename will finally be
bundlepath/_name.png, where the leading underscore is an IDE convention
to block the deletion of images, that are not namely referenced
somewhere in the script, at the time the script is saved in the IDE.

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