Forum Discussion

quanuh's avatar
quanuh
Occasional Contributor
9 years ago

"Could not find object", event it exists in the TC object browser

Our project have been fine for a long time running with TC8 and TC10.5, however, we have been facing this issue "Could not be fìnd object" about 30% when kick-off the test project with Test Execute 10.5, 6 months recently. Our project is designed to test website on IE (8 and 11), the issue only happens with IE11 and it always passes with IE8. The issue happen almoss when we find the IE process on Sys or finding the chind object of IE process. The object exists in the the TC object browser, we have found the object 2 times, wait for browser and refresh the process in the second time but the test still fail.

 

We have tried to make delay before finding the object, but they make things worse. The recent failed case pass, but it fail with other cases, every running the test. Increase the auto-wait timeout brings the same result.

 

Is there anyone have faced with this issue? Any advise in this case?

 

Please help, it took a long time investigating to find the solution,however the issue is remained.

  • william_roe's avatar
    william_roe
    Super Contributor

    The 'Object Browser' shows everything but doesn't necessarily mean it is referenced properly in the test. Are you using 'Name Mapping'? If so, are you using 'Extended Find'.

     

    If the failure occurring for the first object after opening the page try using the 'Wait' on the alias to ensure the page is fully loaded. If not, and there dynamic object loading, use the 'WaitAliasChild' to ensure the object is fully rendered before referencing the object. It is odd it previously worked. I would suspect there has been a change to page.

    • quanuh's avatar
      quanuh
      Occasional Contributor

      william_roe thank for your reply

       

      In our case, we will find the object after it is created, for example a new item is added to the category. So I think that using Name Mapping is not a good choice in this situation. Curently, we are going to find the object by its properties. As mention in the main topic, the failure is about 30% mean that 70% this object is found in the same test. The issue may be the object is not fully loaded in some cases, so in case the page is fully loaded I will try the 'WaitChild' and keep posted.

       

      Thanks,

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        IIRC, didn't Microsoft change the architecture of IE starting with IE 9 where it would potentially spawn additional iexplore processes depending upon resource need? So, you may have initially a sys.process('iexplore') that some of your page stuff is associated with but, occasionally, there would be a sys.process('iexplore', 2) or even a 3 depending upon number of tabs open, apps running, etc.  

         

        Check your object browser when you run into your problem and see if you have multiple processes.  If so, I believe, somewhere, there's a way to turn that off in your test environment so that iexplore will only ever give you one process so long as you don't actually open another browser window.