cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to turn off object recognition hint in TestComplete12?

SOLVED
Contributor

Re: Is there a way to turn off object recognition hint in TestComplete12?

Thank you Robert and Alex.

 

Unfortunately, I am not using the WaitProperty method where I am experiencing the object recognition hint. I am calling FindChild.

 

However, that does look like it will help Lars and possibly Orvai. I have accepted wcach's solution as it was exactly what I was looking for. 

 

Thanks all.

Community Hero

Re: Is there a way to turn off object recognition hint in TestComplete12?

FindChild should return the empty stub that WaitAliasChild does if it cannot find the object. It should then have an option for checking the "Exists" property. Even with FindChild, you still want to make sure you test for Exists before you attempt to use it.  So, it would be something like

 

MyFoundObject :=  Aliases.MyRootObj.FindChild(MyPropertyNameArray, MyPropertyValueArray, 0, true);
If MyFoundObject.Exists then
    begin
        DoMyStuff;
    end;

Attempting to use MyFoundObject before you verify it actually exists will result in the hints and warnings you're experiencing.


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
Contributor

Re: Is there a way to turn off object recognition hint in TestComplete12?

My code is checking to make sure the object exists before using it. In fact, there is no issue in actually using the object. The object is found and utilized without error after the object recognition hint is thrown. That is why I simply want to ignore the hint, because otherwise the test runs green without issue as it did before this new feature. 

 

Thanks for your input. 

Contributor

Re: Is there a way to turn off object recognition hint in TestComplete12?

Hi Robert

 

Thanks for the input, and I will have this in mind when I write new code. BUT, this way of waiting for a property on an alias did not cause problems for us before the release of TC12.

 

But the code you suggested is definitely cleaner and "more" correct, thanks :-)

 

/Lars

Contributor

Re: Is there a way to turn off object recognition hint in TestComplete12?

So this is a nice suggestion from wcach to keep the stuff out of the log file, but I'm still waiting the five minutes for TestComplete replay to get past the object recognition hint nonsense.

 

Worse is that in my case TestComplete has already clicked the button it's busy hunting for and the window that button was on has been closed (because that's what the button does)!

 

Is there ANY way to actually shut off the Hinting? Not logging the warning doesn't help if it still waits the five minutes hunting for the missing buttons.

Community Hero

Re: Is there a way to turn off object recognition hint in TestComplete12?

Yes.... map your objects better. Smiley Happy

 

Honestly, it comes down to doing a better job of selecting identification properties  for your mapped object so it doesn't give the hints and warnings.  It means investigation and a bit of elbow grease to find a better way of identifying your object.   I'm guessing that you're using Extended Find in your name mapping... you might need to add additional hierarchy into your NameMapping to drill down closer to the object.


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
Contributor

Re: Is there a way to turn off object recognition hint in TestComplete12?

tristaanogre - please go read that message before yours again.

 

TestComplete clicked the button and THEN starts the process of hunting for the button in the window that's been closed.

 

This is not a Community Hero type of response: "Yes.... map your objects better."

Community Hero

Re: Is there a way to turn off object recognition hint in TestComplete12?

My apologies.

I have seen that behavior in my own environment. Best bet is to contact support. I'm not sure what's causing that. But that's different than the object recognition hint.... two separate problems. Getting rid of the hint is resolved by improved mapping... the button that has already been clicked getting waited for... that's a question for support.

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
Community Hero

Re: Is there a way to turn off object recognition hint in TestComplete12?

@bo_roop:

 

Hi,

 

Can you post here a relevant piece of code that illustrates the problem?
Preferably, with the code lines where the reference(s) to the problematic object(s) is/are obtained?

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the new Interview