cancel
Showing results for 
Search instead for 
Did you mean: 

Turn off completely object recognition hints

Turn off completely object recognition hints

I would love a way to go back to the old versions of TestComplete where that object recognition hint stuff wasn't present.

 

I have never seen this be helpful; it's only caused problems for us when running tests. The objects are either gone because a window closed and TestComplete doesn't recognize that or TestComplete tries to find a control and takes 3-15 minutes to finish the hint and click the button.

 

I want a way to shut this feature off completely.

22 Comments
Valued Contributor

Hi,

 

I don't have TC 12.50 so can't check...

It looks like this Object Recognition simply posts a warning message to the log. Have you tried to overcome it with the help of OnLogWarning event handler (simply ignore this message)?

Valued Contributor

Ok, so I managed to try TC 12.50 and I was right: the simplest way to turn off the Object Recognition Hints is to create a simple event handler:

function GeneralEvents_OnLogWarning(Sender, LogParams){

  if(LogParams.MessageText.search('recognition hint') > -1){
    LogParams.Locked = true;
  }
}
Therefore, I can't understand all the complaints in this post Smiley Happy
Contributor

"Therefore, I can't understand all the complaints in this post Smiley Happy"

 

It's because you haven't recreated the issue on your end properly... and you're assuming we haven't already tried your "solution."

 

So just for grins, I just added your code to my code that does the same thing: 

 

LogParams["MessageText"]["Search"]('recognition hint') > -1

vs.

LogParams["MessageText"] == "Preparing an object recognition hint."

 

And I have the same problem. If I click on a button in a popup Alert message that causes that dialog to go away, TestComplete gets lost trying to find the button it just clicked.

 

You' didn't provide an answer and you didn't help... you've only added noise. Until SmartBear is willing to acknowledge there's a problem here... I'm stuck with my crappy work-arounds... or I'm stuck waiting for the replay to continue as the object recognition hint stuff happens.

 

Tha'ts why I'm complaining. Smiley Frustrated

Community Hero

So just for clarification: Does an actual warning get logged to the test log?  Or is this just the "waiting for OKbutton" kind of message that comes up during a test run?

 

We are experiencing the latter and, as per @cunderw, we've changed the timeout setting on those button clicks and, for our purposes, it's working well.  Yes, the tool still waits for the button (has to do, especially, if it's an "Alert" type message from the browser rather than an actual component within the HTML DOM) but we don't get any yellow triangle warning flags in our log.

@TanyaGorbunova could you have the dev team take a look at this thread and see if they can provide any insight?





Contributor

So just for clarification: Does an actual warning get logged to the test log?  Or is this just the "waiting for OKbutton" kind of message that comes up during a test run?

 

The TestComplete Indicator says it is preparing a recognition hint. Logging is not the issue.

 

We are experiencing the latter and, as per @cunderw, we've changed the timeout setting on those button clicks and, for our purposes, it's working well.  Yes, the tool still waits for the button (has to do, especially, if it's an "Alert" type message from the browser rather than an actual component within the HTML DOM) but we don't get any yellow triangle warning flags in our log.

 

I don't believe the problem has anything to do with TestComplete waiting for the button to appear... It has everything to do with TestComplete waiting for the button to be found AFTER it's already clicked the button and the dialog has been closed.

Community Hero

Oh, I agree that it's not about waiting for the button to appear... that's just what the message is.  So, that means it's not a logging problem so @karkadil's suggestion wouldn't work anyways.  I have experienced the problem you are (as is @cunderw) so you're not alone.  However, the work around, as mentioned, is very simple.  Just change the timeout setting on the button click.  Yes, this doesn't solve the root problem, but you're not longer waiting 60 seconds for the message to clear.  We change ours to something like 500 ms and things just fly through.

 

I've tagged Tanya in this thread... she's the admin up here.  So, we now have 3-4 people on this thread who are reporting the problem.  Note that the problem is not "object recognition hint"... that's a logging problem.  It's "waiting for button to appear" after the button has already been clicked... entirely different thing.  Now that we have that clarification, perhaps we can get some movement.

Contributor

Changing the timeout to 50ms still waits almost a full second... which is much better than the 3-15 minutes it was waiting before when the value was set to -1.

 

Unfortunately, SmartBear's tech support already knows the issue is with the indicator and the object recognition hint message. Their initial stance of "we cannot recreate this problem so we cannot help" still stands. The original tect support issue has been closed from their side... and this post was opened in June with no one from SmartBear replying.

Valued Contributor

@bo_roop , sorry, it looks like I misunderstood the main point of your original post, my bad.

Frequent Contributor

@bo_roop If the Issues is with Object Recoginzation hint (Reference) takes more time. 

 

Navigate to Default project properties or Current Project properties 

Change the Auto Wait time. Auto Wait time.jpg

 

I understand Version 12.60 with Addin Intelligent Quality Add in (Intelligent recommendation system for resolving the “object not found” errors.) can resolve the error after one time of execution. 

 

Regards

Valla 

https://vallatestcomplete.wordpress.com/

Community Leader

Edit: Fixed the copy&paste error I made in the code

 

I experience the same as @cunderw and I'm on 12.60 with ASP web pages.  It hapens when I pop up a confirmation box and click OK.  After it disappears, I have to wait X amount of seconds - usually very long - you don't want you tests falling over because it's the first time you get to a page and IIS still needs to compile etc.  I solved it slightly differently using a function, but I agree that it appears to be an annoyance at the very least if not a bug.  Not sure a feature requests though, since it would disable the object recognition in places you don't want.  Code I use:

/// <summary>
/// Method for clicking confirm buttons on screen when testcomplete doesn't pick up that they have been removed from the page 
/// so waits the full timeout period
/// </summary>
function ClickConfirmButton(ButtonAlias, overrideWaitInterval)
{
	overrideWaitInterval = (overrideWaitInterval==null || overrideWaitInterval==undefined) ? 2000 : overrideWaitInterval;
	if(!ButtonAlias.WaitProperty("Exists",true,overrideWaitInterval)) //wait to see, but don't error in case the test can be recovered'
	{ 
		Log.Warning("Timeout Expired waiting for confim button [" + ButtonAlias.MappedName + "]","",pmNormal,"",Aliases.browser.page.PagePicture());
	}
  
    var tempTimeout = Options.Run.Timeout;
  Options.Run.Timeout = 1000;
  ButtonAlias.Click();
  Options.Run.Timeout = tempTimeout;
}

 

Join the September Hub-bub to show off, learn and win