Including an image
There are two ways of including an image in a UUT report:
1. Use the attach file step (WATS_AttachFile).
This will allow you to attach a file to a step, and the file will be presented as a downloadble link. For more information see: https://virinco.zendesk.com/hc/en-us/articles/207424583-Attach-file-to-WATS-WATS-AttachFile-
2. Include the image data in the Report text property of the step.
This method enables viewing the image directly within the report by utilizing the HTML support of the step Report text property. As Report text only accepts strings, the image must be converted to a base 64 (b64) string. There are several tools, both online and offline, which can convert an image file to a b64 string.
In the Report text property add the following HTML code:
<img src="">
Then paste the b64 string within the quotes. The following is an example of what the string could look like.
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzMTAgMzEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMTAgMzEwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojNDI0MjQyO30NCjwvc3R5bGU+DQo8Zz4NCgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNzkuMyw4Mi4yYzUuMi0xMi41LDE3LjEtMjAuMiwyOS44LTIwLjZjNC43LTAuMiw5LjQsMC43LDE0LDIuNmMxNiw2LjcsMTkuMywyMy4xLDIyLjMsNDUuNQ0KCQljMS43LDEzLjIsMywzMy44LDMuOSw1MC4yYy00LjktM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zLTQuNSwwLjctNi44LDEuNGMtMTIsMy42LTIzLjIsMTMuMy0yOS4yLDI1LjQNCgkJYy01LjEsMTAuNC01LjksMjEuNC0yLjIsMzEuMWM5LjUsMjQuOCwzNC42LDM5LjIsNTQuOSwzOS4yYzIuMiwwLDQuMi0wLjIsNi4zLTAuNUMyNTksMjAyLDI2NC41LDE5Ny45LDI2OC4zLDE5MS4yIi8+DQoJPGc+DQoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00Mi44LDE4Ny44bDk2LjUsNTkuM2M3LjgtNS4yLDE1LjEtMTEuMywyMS42LTE4bC05NS41LTU4LjdDNTcuMiwxNzUuMiw0OS41LDE4MSw0Mi44LDE4Ny44eiIvPg0KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTIuNCwyNTkuOEMyOC4zLDI2Ni40LDQ1LjcsMjcwLDY0LDI3MGMxNi44LDAsMzIuOC0zLjEsNDcuNi04LjZMMjYuNSwyMDlDMTcuOSwyMjQsMTIuNywyNDEuMywxMi40LDI1OS44eiINCgkJCS8+DQoJPC9nPg0KPC9nPg0KPC9zdmc+DQo=
The length of the string will vary based on the complexity of the original image file.
Including a link
You can add a link to a webpage by adding HTML to report text, similar to what is described in method 2 of attaching an image.
The following is an example of a link:
<a href="https://www.youraddress.com">Text to display in the link</a>
The anchor tag includes a href property, containing the url to go to when clicking the link. The text to display in the link should be added between the start tag <a> and end tag </a>. Normal text (not links) can be added both before and after the anchor tag if needed.
Comments
0 comments
Article is closed for comments.