namePropStr Property (Web and XUL Objects)

Applies to TestComplete 15.63, last modified on April 10, 2024


The namePropStr property returns the last component of the URL contained in the object’s href or src attribute. Typically, this is a file or page name specified in the URL.

This property has only a value for web link and image objects (HTML A and IMG elements, respectively). For other object types, the property value is empty.



Read-Only Property String
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

A string containing the last component of the URL held in the object’s href or src attribute. If the URL includes a query string or an anchor part, they are included in the returned value. For example:

href or src value namePropStr value file.pdf GetFile.aspx?guid=5d2240a9-3859-4ab7-a94c-20c422e4e9ac muchomoney.aspx#features #features

If the object does not have the href or src attribute or if they are empty, namePropStr returns an empty string.


This property is available only if the Tree model of web objects is active.

See Also

idStr Property (Web and XUL Objects)
Classic Web Testing

Highlight search results