Include a Timestamp and Tag on Captured Screenshots
Screenshots are captured, by default, only for failed steps. You can also use the "screenshot" checkbox on individual steps in order to capture the screen at strategic locations in your test. For example, to capture a screenshot of a verification step (regardless of pass or fail of the step). Alchemy has an integration called "Image Writer". This integration will super-impose a timestamp, and other text onto your screenshots. Let's take a look at the configuration and results of using this integration.
With your Alchemy Test Suite open in the Alchemy client, head over to the "Integrations" tab. Click on the "Add integration" button, and choose the "Alchemy Image Writer" integration.
The configuration parameters are mostly filled with defaults for "font", "color", you can experiment with those. Alchemy will super-impose the text of the integration in the upper left corner of the screenshot. If you wan the text to have a solid background so that it is easier to read, turn the "background" checkbox on. The "color" field will only apply to the background color.
For the "text" field, you can put any text there. You can also put a step tag there, we'll talk about that below. If you just want a basic timestamp on the screenshot, just put {{TIMESTAMP}} in the text field.
For my example, I will also use the {{TAG}} variable in the "text" field. Here is a picture of my example configuration:
Now, you may be wondering where does the data for {{TAG}} come from. That comes from the test step itself. In the test step, you can see the "tag" field by clicking the eye-ball button to the far right of the step to expand it. Here is my step:
Note that running the test in interactive mode from the Alchemy client, like while debugging the test, your screenshots will not have the timestamps nor text super-imposed. This integration only applies to screenshots in the HTML Report, or screenshots in other integrations. The timestamp info is only placed in the screenshot IF the test is running outside the Alchemy desktop client.
That brings us to the conclusion here. This final image below is how the {{TAG}} @ {{TIMESTAMP}} comes out in my HTML Report. In the top-left of the screenshot you will see the grey background with embossed looking text. This integration has recorded the exact time the step captured the screenshot during the verification step that I tagged as "Balance". This may be handy for test audit purposes later.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article