9. Adding the Design-Time Action's Info to the Description File

Applies to TestComplete 14.71, last modified on April 22, 2021

Now, we can add information about our design-time action to the description file.

Open the description.xml file in your XML or text editor and add the following code to it:

XML

[description.xml]

<?xml version="1.0" encoding="UTF-8"?>
<ScriptExtensionGroup Name = "My Extensions">
  <Category Name = "Checkpoints">

    <ScriptExtension Name = "Clipboard Checkpoint" Author = "SmartBear Software" Version = "1.0 test" HomePage = "smartbear.com">
      <Script Name = "clcCode.js">
          <RecordAction Name = "Clipboard Checkpoint" Icon = "clc-icon.bmp" Routine = "RecordExecute"/>
          <DesignTimeAction Name = "Clipboard Checkpoint" Icon = "clc-icon.bmp" Routine = "DesignTimeExecute"/>
      </Script>
      <Description>
        Provides support for clipboard checkpoints.
      </Description>
    </ScriptExtension>

  </Category>
</ScriptExtensionGroup>

As you can see, we added the DesignTimeAction element. These elements are used to define design-time actions. In this tutorial, we use the following attributes of the element:

Attribute  Value Description
Name Clipboard Checkpoint  The caption of the item that TestComplete will add to the Tools toolbar.
Icon clc-icon.bmp The file name of the item’s icon.
Routine DesignTimeExecute The name of the script routine that will be executed when a user selects the Clipboard Checkpoint item from the Tools toolbar.

As you can see, we did not add information about the user form to the description.xml file. This is not needed. The only requirement is that the form file resides in the same folder, in which the script unit and description.xml files are located.

Prev     Next

See Also

Script Extensions
Script Extension Files
Structure of the Description File

Highlight search results