Forum Discussion
7 Replies
- 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_SQXOccasional Contributor
TestComplete 15.51, Chrome, version 113
It was the same for 15.49
- scottroutesmartContributor
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.
- eykxasRegular 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_SQXOccasional Contributor
Hello,
Thanks for your reply!
But I prefer to use TestComplete as usual.
Is there any other sloutions?
- rraghvani
Champion Level 3
Agree with scottroutesmart, having non basic HTML and many DIV's will slow the object identification down - not sure if other similar tools suffer the same.
Also, eykxas is referring to XPath, i.e. Finding Web Objects Using XPath Expressions.
Try changing the Object search strategy to see if it makes any improvement.
- eykxasRegular 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.