1. Planning Operation's Functionality

Applies to TestComplete 14.93, last modified on September 27, 2021

In this tutorial, we will create a custom keyword test operation that will specify the font style and color settings for test log messages posted by subsequent Log Message, Append Log Folder and Post Screenshot operations. This operation will be a wrapper over the Log.CreateNewAttributes scripting method. Like this method, the operation will return a LogAttributes object that contains the style settings of test log items. The operation that follows our Log Attributes operation will be able to refer to the created object via the special [Last Operation Result] value.

The properties of our keyword test operation will correspond to properties of the LogAttributes object. To enable the users view and modify these properties, we will create a form that will provide access to them and also display a sample text with the currently selected style settings applied.

To help the users identify our custom operation among the others, we will create an icon for the operation. This icon will be displayed next to the operation name in the Operations panel of the Keyword Test editor and in tests:

Custom Operation in the Operations Palette
Custom Operation in the Operations Palette
Custom Operation in a Keyword Test
Custom Operation in a Keyword Test

Also, we will create the description.xml file that is used by TestComplete to install script extensions. In this file, we will specify information about our custom keyword test operation that is needed to add it to TestComplete.

Prev     Next

See Also

Script Extensions Tutorials
Script Extensions
Log Attributes Operation

Highlight search results