Forum Discussion

JennyH11's avatar
Frequent Contributor
7 years ago

Persistent Object Recognition Hints where page Objects are not found



I have been using TestComplete for a couple of months now and have inherited many tests which need attention in one way or another. I need your help!


The question I have at the moment is regarding Object Recognition in web browsers.


Currently, the keywordtests use RunTestedApp to launch a Chrome browser and browse to our website URL. Mostly this works fine, however, recently we have been experiencing issues where the Object is not found when trying to perform an action in the browser etc. I remap it (by double clicking and using 'point & fix' then finding the Object on screen) but on a future run it may fail again due to having lost it's Object mapping. This doesn't happen every time but does happen fairly regularly.


Is there a way to stabilise this and give us more confidence in the tests running successfully?


I have been wondering whether the use of TestedApps is the root cause and whether we would be better off using RunBrowser instead. If this is the case, does anybody know what the process would be for incorporating this? Is it simply a case of slotting in RunBrowser into correct place in the keywordtest and the subsequent actions all string together... Or is there more to it? - please excuse my naivety.


All advice welcome. Every day is a school day, as they say! :)




  • The example you've given seems to be a simple problem with timing.  The page you are intending to work with is not up and available yet when you attempt to perform the next step which, based on your screenshot is a check point on the FlightLogDetails page.  The FlightLog page is what is available at the time so that's why you get the hint. 


    Most likely, after your click on linkLnbviewdetails163463, your Delay of 200 milliseconds isn't long enough.  I would actually recommend not using a hardcoded delay like that.  Instead, after that click, you need to insert an onscreen action where you call the Wait method on pageFlightLogDetails.  (see This method will tell TestComplete to wait until that page is fully loaded in your browser before proceeding with your test.  This is probably an intermittant problem... sometimes it works fine, sometimes it doesn't, which is the nature of timing issues of this sort.


    As a best practice and rule of thumb, if you perform an action on a page that either will cause the current page to reload or navigate to a new page, you should call that Wait method against the destination page.  This will wait up to the maximum wait time on your project (Tools -> Current Project Properties -> Playback) for the page to load.



6 Replies

  • tristaanogre's avatar
    Esteemed Contributor

    Is the problem happening with the browser object, the page object, or some component on the page?


    Double check, also, that you only have one copy of the browser open at a time or, even, (depending upon how things are mapped) only one browser open at a time.  I have occasional object recognition hints/ambiguous recognition warnings when I have Chrome and IE open at the same time and I'm running my tests against one or the other.

    • JennyH11's avatar
      Frequent Contributor

      Hi Robert,


      Thanks for your reply.


      It doesn't specify which type of object but I believe it to be Browser and Page Objects as when I read what the script is doing and take into account the Expected image it seems to be highlighting a page area or a browser hyperlink\button. It seems to be anything at all and when it happens it tends to be for many Objects in the keywordtest.


      We're only launching a single instance of one browser type at present. Simultaneous browser tests and\or cross browser testing is something I'd like to develop but we don't have at this stage. And I don't have any browsers running at all for any other reasons. Though, could the services that Chrome runs interfere at all? I know that Chrome runs multiple services for an instance of a browser and these may stick around when you don't want them to. Just a thought.


      In general, is it considered a good thing to use RunTestedApps for Functional browser testing? From what I've read so far RunBrowser is what is used for Functional Web Testing. Or are either just as good? It does seem RunTestedApps is slightly limited as you don't have the ability to adapt the keywordtest to run on any browser and\or version of that browser. Any thoughts on this?




      • tristaanogre's avatar
        Esteemed Contributor

        RunTestedApps shouldn't cause this kind of problem.  


        Could you post screenshots of the log errors you're getting, the Additional info for those errors, and the keyword test operations you're running when you get those errors?  Object recognition errors are something that can only be diagnosed with more information.  


        The other Chrome processes shouldn't be the issue, either.  But let's see what we have.