Absent Member.. Absent Member..
Absent Member..

QTP/(U)FT Support Tip: Object not recognized, when using the description object.

Hello all,


How are you? I hope you are fine 🙂


When using the description object like this


Set EditDesc = Description.Create()
EditDesc("attached text").Value = "Enter service ID (numbers only)"
EditDesc("Index").Value = "0" 


the relevant object might not be recognized although it exists. The reason is, that under some circumstances and with certain properties, the flag "Regular Expression" is automatically set.


In order to enable the proper recognition, we have to switch it off in the following way:


PropertiesColl(Property).RegularExpression = BooleanSetting




Property             The property for which you want to specify the regular expression value. Specify the name of the property or its index position in the collection. Index position numbers begin with 0.

BooleanSetting The new Boolean value for the specified property. Possible values: TRUE (use regular expression), FALSE (don't use regular expression)


Set EditDesc = Description.Create()
EditDesc("attached text").Value = "Enter service ID (numbers only)"
EditDesc("attached text").RegularExpression = FALSE
EditDesc("Index").Value = "0"


Please be aware, that some characters (e.g., parentheses) in the property value may automatically trigger the regular expression flag to be set to TRUE. In this case you need to make sure, you manually set it to FALSE using the way described.


Best regards,

Tino Pacholski

Functional Testing Support Engineer

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]
Labels (2)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.