Automa Blog

Taking screenshots with Automa

We're happy to announce that we just released version 2.5.5 of our next generation GUI automation tool, Automa. Besides a few small improvements, the new version features a command called save_screenshot(...). This command lets you save a screenshot of your entire screen contents to a file. This is very useful for debugging or further processing of the outcomes of a test / automation run.

The syntax of the new command is very simple. You merely pass a string identifying the path of where the screenshot should be saved. Automa saves the file as a PNG file, so we recommend the file ending .png. For instance:


Please note the leading r before the quotation mark in the example. This is always required when working with file paths as it instructs Automa's built-in Python interpreter to treat any backslashes in the string as plain-text backslashes (not, as normally, as escape characters).

After playing around with the new command ourselves, we found it surprisingly useful and fun to use. We hope you will feel the same. You can as always download the new version from our download page.

Happy automating!

blog comments powered by Disqus