\'Object does not exist\' - confusing error message.
I have added a button which will be in a disabled state during run, to NameMapping. I am using a variable to set this as a object as below:
set Item = NameMapping.Sys.IEXPLORE1.IssueDetailsPage.Form__I ssueChangeForm__.Table_1_.Cell_0__0_.Table_0_.Cell _1__0_.IssueResponse.Cell(12, 3).SubmitButton("btnImpact")
I am also using Item.enabled in a function and logging a message based on its state and calling it as:
if (not Enabled) then
Log.Message("Impact button is not enabled: " & Enabled)
Everytime I run, I get 'Object does not exist' error 3 times in the Test log, at the point of declaration of the object. The remarks of the 3 errors are:
1. You are trying to call the "Cell" method or property of the "IssueResponse" object that does not exist.
2. You are trying to call the "SubmitButton" method or property of the "Cell" object that does not exist.
3. You are trying to call the "enabled" method or property of the "SubmitButton" object that does not exist.
But all the above things do exist in the Object Browser.
But "Impact button is not enabled: 0" message is displayed in the Test log, which means the function Enabled=ItemEnabled(Item) has been executed.
How come Testcomplete calls a function and gets the state of an object, which according to it does not exist??
I am confused here. Please help.
Re: \'Object does not exist\' - confusing error mess
The "Enabled" property of a non-existent object returns False. That is why, the function "works".
Most probably, some object properties that you are using for Name Mapping changed their values, and the objects cannot be found now.
I recommend that you go through the "Searching for the Reason of an Error" help topic - it describes how to find the reason of a script error.
Let me know if this does not help.