Settings - String Operations

Comparison

The following setting is located at Settings->TBox->String Operations->Comparison.

Ignore Whitespace

Description

This setting specifies whether leading or trailing whitespaces should be ignored in string comparisons and identification processes.

The following rules and exceptions apply:

  • In the TestCases, ExecutionLists and Modules sections, the setting can be used with all ActionModes except for Input and Buffer.

  • The setting can be used with wildcards and XBuffers. However, when using the XBuffer, the whitespaces are saved to the buffer.

  • The setting is ignored when using regular expressions, TestCase-Design, and the TQL search.

The following values can be defined:

None: Whitespaces are not ignored.

Leading only: Only leading whitespaces are ignored.

Trailing only: Only trailing whitespaces are ignored.

Leading and trailing: Both leading and trailing whitespaces are ignored.

Example

Leading and trailing

This setting can be defined for one or more objects by using test configuration parameters. The test configuration parameter overwrites the global settings of the Settings dialog.

The test configuration parameter name matches the name of the setting without any spaces.

Test configuration parameter: IgnoreWhitespace

Normalize

Description

If this setting is enabled, Tosca handles the following whitespace characters as spaces upon string comparison:

  • spaces

  • non-break spaces

  • tabs

  • line breaks

In addition, the null character \0 is removed from the string in verify operations. This allows empty strings to be verified even if your browser returns the null character as a value for empty strings.

Example

True