HtmlHeading Class

Description

Text that is completely bold or larger than the base font size in a Web application is considered an HtmlHeading.

Availability

This functionality is supported only if you are using the Classic Agent.

Tag

The default tag is the heading text. See the Properties for the maximum number of characters returned.

Inheritance

The HtmlHeading class is derived from the Control class.

Properties

In addition to the properties it inherits from the AnyWin class and the Control class, HtmlHeading has the following properties:

Property Type Description
$BackColor STRING Background color: the name of the color if it matches one of the colors in the Table of Colors of Silk Test Classic; otherwise an RGB value (red, green, blue).
$Caption STRING The text of the heading, up to 255 characters. For more information, see the GetCaption function.
$FontName STRING Font name.
$FontSize INTEGER Font size in points.
$FontStyle FONTSTYLE Font style.
$FullCaption STRING The full text of the heading (up to a maximum of 255 characters). For more information, see the GetFullCaption function; note that the GetFullCaption function returns up to 1023 characters.
$MultiText LIST OF STRING The full text of the heading, with line endings as displayed in browser. For more information, see the GetMultiText function.
$Text STRING The first line of text, up to 255 characters. For more information, see the GetText function.
Note: The GetText function returns up to 1024 characters.
$TextColor STRING Text color: the name of the color if it matches one of the colors in the Table of Colors of Silk Test Classic; otherwise an RGB value (red, green, blue).
$WrappedText LIST OF STRING The full text of the heading, with text wrapped at 64 characters per string. For more information, see the GetWrappedText function.

About These Properties

The properties $BackColor, $FontName, $FontSize, $FontStyle, and $TextColor apply to the first character, first line of the entire text object. Use the GetProperty function to access these properties for the first character of the text object.

To get the properties of a specified position within the text object, use the GetTextProp function.

For additional information, see Properties.

Notes

By default, Silk Test Classic issues API clicks instead of Agent-based clicks for HtmlHeading with the Click method. See API click versus Agent click for more information.

The text of heading objects is considered static and can be used to identify other objects.

Example

The Online Category page of the GMO Web application contains an HtmlHeading whose text, and tag, is "Online Category".

Methods

In addition to the methods it inherits from the AnyWin class and the Control class, HtmlHeading has the following methods: