Forum Discussion
Ok, follow the code:
//-----------------------------
function WriteObjectValue (AObject: OleVariant; AValor: String = ''; ALIMPartite: Boolean = True): Boolean;
begin
Result: = False;
if (not (AObject.Enabled)) then
begin
Log.Warning ('Accessed object is disabled.');
Exit;
end;
if (ALIMPartite) then
AObjeto.Clear;
AObject.Keys (helper_string.ConvertTextText (AValor));
Result: = True;
end;
//-------------------------
also follows the images with the error and Object Spy.
In your object spy, where does the "Clear" method show up? Can you get a screenshot of the "Methods" listing in object spy?
I'm guessing that there is one of two things happening:
1) There is no "Clear" method present and available to TestComplete and, therefore, it sees your call to the method, not as a method, but simply trying to access an object, hence the error.
2) "Clear" is a native method of the application under test and so may require a different syntax. Try adding () after the call and see if that helps.
- RodrigoJr6 years agoOccasional Contributor
I believe this is not the case, because the testcomplete does not recognize the "Clear" method but if you save the "options" it recognizes the method again, this also happens with the "Fields" tab.
I think you're missing some configuration, but I did not identify what it might be.
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Hi RodrigoJr,
The error message says that the Clear object isn't found. You are trying to call the Clear method. Shouldn't you use () to call methods in Delphi script?
Right now, you don't use the brackets.
- RodrigoJr6 years agoOccasional Contributor
Hi TanyaYatskovska, tristaanogre
I've already used () to call the method but it did not work, I'm checking if it is not my application that contains the problem.
Thank you for your attention.