Forum Discussion

chrisb's avatar
chrisb
Regular Contributor
9 years ago
Solved

Is searching using css quicker than using Test Complete's find methods?

Hi,

 

I recently started using CSS selectors (QuerySelector) to locate cells in large tables in a web application under test and am finding it is much quicker than using Test Complete's find methods. As I cannot know what the find methods are doing under the hood I am wondering what other users experiences have been? Initial comparison of the two methods shows performace improvements in some areas when using CSS selectors and none in other areas. Also, does anyone know how the find methods are locating elements, ie. are they using XPath, CSS selectors or some other method?

  • Think I answered my own question after reading Test Complete documentation! In most cases where the element attribute is displayed in the Object Spy tool then it makes sense to use the Find and FindAll methods (whatever they are doing!). In some cases I use CSS selectors to locate an element using attributes not displayed in the Object Spy tool. Would be nice to know what the Find and FindAll methods are using to search for elements but I suppose that is not going to happen as this is a closed toolset.

1 Reply

  • chrisb's avatar
    chrisb
    Regular Contributor

    Think I answered my own question after reading Test Complete documentation! In most cases where the element attribute is displayed in the Object Spy tool then it makes sense to use the Find and FindAll methods (whatever they are doing!). In some cases I use CSS selectors to locate an element using attributes not displayed in the Object Spy tool. Would be nice to know what the Find and FindAll methods are using to search for elements but I suppose that is not going to happen as this is a closed toolset.