TrueLogSection Function


Adds structure to complex scripts and helps to logically divide scripts into smaller named parts. These named parts can be individually expanded and collapsed in the TrueLog Explorer tree, hereby reducing complexity and simplifying the visual structure of a TrueLog file.

Additionally, a comment and/or screenshot can be added to a TrueLogSection. This additional content will also be rendered by TrueLog Explorer. TrueLogSection names do not need to be unique. Silk Performer automatically adds TrueLog sections during recording.

To manually add a TrueLog section, click Insert TrueLog Section on the Silk Performer Recorder. To add a recording screenshot, check the Store screenshot check box in the TrueLog Section dialog, and click OK. When you close the dialog, a screenshot with a unique ID is stored in the Record TrueLog. During replay, a reference to this screenshot is stored in the Replay TrueLog.

Include file



TrueLogSection( in sSectionName  : string,
                in sComment      : string optional,
                in sScreenshotId : string optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sSectionName The name of the TrueLog section.
sComment An optional message that is displayed in the output window and the log file.
sScreenshotId Id of a screenshot that was taken during recording.


benchmark SilkPerformerRecorder

use "WebAPI.bdh"

    TMain           : 1;

  transaction TMain
    WebPageUrl("", "Unnamed page");
    TrueLogSection("Section: Web Service", "The Borland sample Web Service\r\n");
    WebPageLink("Borland Sample Web Service", "Service1 Web Service");
    WebPageLink("A_ReadMeFirst", "Service1 Web Service (#1)");
    TrueLogSection("Section: Test Sites", "entering test sites", "Screenshot_6133563"); 
    WebPageLink("Test Sites", "SilkPerformer Test Site");
    WebPageLink("ShopIt V 6.0", "ShopIt - Greetings");
  end TMain;