Need a visual at the time of error or failure?
While script errors or verification point failures return information about the issue, a picture, in addition to data, may further clarify the reason for the issue.
Enabling testSettings.logScreenshotOnError or testSettings.logScreenshotOnFail fail in a script or a portion of a script captures a screenshot of the entire desktop at the time the script error or verification point failure occurs.
The script below contains both testSettings.logScreenshotOnError and testSettings.logScreenshotOnFail set to true. The verification point checks for a string in a particular object which does not match. The Test Results illustrate not only the value comparison failure, but also provide an interactive link to the screenshot captured at the time of error.
Sample Script
Test Results
Screenshot Captured
For more information related to screenshot logging see:
How to Create Automatic Screenshots on Test Failures and Errors