HtmlLink Class

Description

A link is one or more words that the user of a Web application can click to jump to another page or a different location in the same page.

Note: In order for Silk Test Classic to see links as Html-links, they must be displayed underlined. If links are not underlined, Silk Test Classic sees them as only text.

Availability

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

Tag

The default tag is the link text (up to 255 characters).

Inheritance

The HtmlLink class is derived from the Control class.

Properties

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

Property Type Description
$BackColor STRING Background color: the name of the color if it matches one of the colors in Silk Test Classic’s Table of Colors; otherwise an RGB value (red, green, blue).
$Caption STRING The text of the link, 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 link (up to a maximum of 255 characters). For more information, see the GetFullCaption function; note that the GetFullCaption function returns up to 1023 characters.
$Location STRING The URL for the link. For more information, see the GetLocation function.
$MultiText LIST OF STRING The full text of the link, with line endings as displayed in browser. For more information, see the GetMultiText function.
$Text STRING The first line of text (up to a maximum of 255 characters). For more information, see the GetText function. Note that 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 Silk Test Classic’s Table of Colors; otherwise an RGB value (red, green, blue).
$WrappedText LIST OF STRING The full text of the link, 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 more information, see About properties.

Notes

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

Methods

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