cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to find the object Clear. See Additional Information for details

SOLVED
Occasional Contributor

Unable to find the object Clear. See Additional Information for details

My testComplete is not finding the Clear method, and returns error:
"Unable to find the object Clear. See Additional Information for details. "
I also noticed that when using the Object Spy it does not show the Fields tab, using the same EXE of the application only in another installation of TestComplete it works normally.

Another thing I discovered that if you saved the options and restarted the TestComplete back up and running.


Has anyone ever experienced this?

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: Unable to find the object Clear. See Additional Information for details

I was able to identify that the problem was in my exe that I was trying to automate, a development error.
Thank you for your help.

View solution in original post

10 REPLIES 10
Community Hero

Re: Unable to find the object Clear. See Additional Information for details

What language are you using?  If you're using something like JavaScript, you need to make sure that you include the parenthesis when calling a method (object.Clear()).

As for the Object Spy, are you viewing the "Advanced" properties or just the basic?  If it's just the basic, the "Fields" tab I don't believe it is exposed.

 

As for your last question... I don't follow.  Can you clarify?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Occasional Contributor

Re: Unable to find the object Clear. See Additional Information for details

I'm using DelphiScript, using "Advanced" properties.
the other question ignore

Community Hero

Re: Unable to find the object Clear. See Additional Information for details

The error message for the "Clear" method should contain, on the Additional Information tab indications as to some of the specifics of the problem.  Can you share that information?  Also, posting a sample of your code where the problem is occurring could be helpful.

 

As for the "Fields" tab, can you please post screenshots of the machine that is working versus the machine that isn't with regards to Object Spy?  One thing you can try is to do an installation repair on the one that isn't working and see if something needs to be corrected in registry.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Occasional Contributor

Re: Unable to find the object Clear. See Additional Information for details

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.

Community Hero

Re: Unable to find the object Clear. See Additional Information for details

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Occasional Contributor

Re: Unable to find the object Clear. See Additional Information for details

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.

Community Manager

Re: Unable to find the object Clear. See Additional Information for details

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.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Highlighted
Occasional Contributor

Re: Unable to find the object Clear. See Additional Information for details

Hi @TanyaGorbunova@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.

Community Manager

Re: Unable to find the object Clear. See Additional Information for details

Hi RodrigoJr,

 

Please let us know what you find. Also, I suggest that you consider contacting the Support Team as, it looks like, this question requires a deeper investigation.

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Final Interview in the Series
API_testing_mistake#7