Is there a way to capture the screen using sensetalk?


I would like to capture the whole screen when my test fails. This will make it easier for me to tell what caused the script to fail. Is there a way to capture the screenshot and save it somewhere?


If the failure is due to an image not found exception and the exception is not caught by one of your custom handlers, Eggplant will already capture the screen for you and save the file under the same folder that the log file is created under. Look for a file named screen_error.tiff. You can also view the screen capture on the results tab for failed test runs if you select the last line of the log output, “…FAILURE…”, the screen capture should appear as a thumbnail from which you can doubleclick to view a larger image.

You may also perform screen captures of your own if you determine that there is a failure that you need to log via the “captureScreen” command. Please consult the Eggplant Reference manual for a full description as well as usage.