Forum Discussion

Alex_SQX's avatar
Alex_SQX
Occasional Contributor
2 years ago

Object identification is very slow

Hello,

I'm testing a web page.

As the project size grows, speed of object identification decreases.

Now for an object I should wait about 45 seconds!

Anyone encountered this problem?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    It would be helpful to mention the version of TestComplete that you are using, together with Browser and version, and the technology your web app uses.

    • Alex_SQX's avatar
      Alex_SQX
      Occasional Contributor

      TestComplete 15.51, Chrome, version 113

      It was the same for 15.49

  • scottroutesmart's avatar
    scottroutesmart
    Occasional Contributor

    The object identification tool doesn't usually take too long for me, but manually mapping objects is VERY time consuming.  When I use the Object Browser, and expand successive levels of objects it become slower and slower with every level I drill down within.  Sometimes expanding the various levels takes a minute or two.  This has occurred regardless of version (14.x or 15.x) and I also tend to agree that as the project suite has grown it lags more.  We are using React and NPM, which add in a lot of layers of objects within the page, it isn't basic HTML drop downs but instead layers and layers of DIVs.

  • eykxas's avatar
    eykxas
    Regular Contributor

    I encountered the same problem. As a workaround I gave up using Name Mapping. I mapped only the root container identified by the webpage URL. 

     

    Every subsequent objects are retrieved by xpath in my project. And some container objects are manually "mapped" with xpath.

    I created a function called "getContainer" which initialize a map with "key", "xpath".
    then this function return the corresponding object. ( return page.FindElement(map.get("key")) ).

    My function basically does the same thing as NameMapping, but mine is instantaneous. Not NameMapping.

    If you don't use xpath, I think you can achieved a similar function with properties.
    The best thing to speed up the retrieval of objects in this case (using properties) is to limit the level of searching (like 10 levels) and use some "checkpoint". 

    For example : if your object is at the level 25, don't search directly for it, but search for a container few level above, then do a second search for your object using the container as starting point.

  • Alex_SQX's avatar
    Alex_SQX
    Occasional Contributor

    Hello,

    Thanks for your reply!

    But I prefer to use TestComplete as usual.

    Is there any other sloutions?

     

  • eykxas's avatar
    eykxas
    Regular Contributor

    I referring to xpath for my project, but bypassing NameMapping can be done in the classical way.

    Alternatively, limiting the number of objects stored in NameMapping is the only thing to do for not slowing down TC and keep using NameMapping.