Screen snapshot on playback failure of functional tests
If playback of a script causes an exception to be thrown, Rational® Functional Tester takes a screen snapshot at the time of the failure. The screen snapshot is accessible through the log.
Accessing the screen snapshot in an HTML log type
HTML is the preferred log type to access the screen snapshot.
Select HTML as the log type in the Logging Preferences Page in FT Java™ or the Logging Options Page in FT .Net.
After playback fails the log opens in your browser.
- Find the screen snapshot image near the bottom of the log.
- Click the image or link to view full size.
- Right click to save, print, or email the JPEG image.
Taking a screen snapshot with scripting
RootTestObject exposes a getScreenSnapshot method that will return a snapshot of the screen. GuiTestObject exposes the same method, but only captures the portion of the screen rendering the TestObject. LogInfo, LogError, and LogWarning all have overloads that will take a snapshot and add it to the log.