

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
where
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)
Example:
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,
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.]