Forum Discussion
Actually, there is a way of turning off the warning. If you go to name mapping and right click in the properties panel for the object in question. You'll get the following dialog.
Uncheck the indicated item and, for that object, you'll no longer get that warning.
However, if I may add, the mapping properties you have for the object in question are insufficient for unique identification.
First of all, I wouldn't use the "Enabled" or "Exists" property for an object identification. If you want to wait for an object to be enabled, use a WaitProperty method off the object and check for "Enabled" = true. For object existance, I would use "WaitAliasChild" to retrieve the object via the Alias and then check "If object.Exists".
Secondly, if there is more than one item on the page with a class that matches btn*, it will find whatever the first one is.
If there is a caption, contentText, innerText, or some other property, that would probably be better to include in the properties to identify the object. Maybe an ObjectIdentifier or an idStr property as well. The warning is there to tell you that your mapping found something but that, because of the properties you've selected, it couldn't find your EXACT item but found something similar.
Hi,
I am second to Robert.
WaitAliasChild (like any WaitXXXmethod) is standard and recommended way to check if the reference to the object can be get and do not post any messages to the log if the object does not exist.
Also, I do not think that recognition hint in the log results in significant performance penalty. I believe that while searching for the requested object, TestComplete analyses how well every found object matches search criteria and just displays the most close match candidate if the sought for object is not found.
Related Content
- 8 years ago
- 6 years ago
Recent Discussions
- 6 days ago
- 6 days ago
- 9 days ago