• 2 replies
  • Latest Post - ‏2013-10-25T02:33:41Z by AL1224
33 Posts

Pinned topic How to speed up .find()

‏2013-10-22T15:01:11Z | find

I am currently working with an HTML application which has a lot of elements on it, and doing so programatically.  As such, the find() method is taking a long time to find objects because of how many elements it has to look at before finding the match. Is there some way to write my code so that it will find the objects more efficiently?

I generally search for an object across the entire web page. I thought that it might speed things up if, instead of trying to go directly for my target object starting from the browser test object, I first find a couple of parent objects of the target object. That way, it would stop searching once it finds the parent object, and then begin searching again from that point, getting closer and closer at every step, so as to "point it in the right direction" instead of having to look through the entire web page.  However, this has given me mixed results.  It has sometimes made my scripts faster, but it has also sometimes made it even slower.

Any suggestions?

  • OttoDiesel
    51 Posts

    Re: How to speed up .find()


    It worked for me to speed up finding when I first look for the parent testobject and then search from this testobject my target testobject. I use RFT

    Maybe some options in the affect the speed of searching. But there are more RFT properties you can set than you see in the file. I don't know currently where all the properties are documented.

    Another idea would be to cache the found parent test objects.

    I would recommend you to use Selenium instead of RFT for automating web application tests. Selenium is much faster and overall better than RFT. Even IBM recommends Selenium for automating web page tests according to a sales man from IBM. For instance they have an integration to Selenium in Rational Quality Manager.

  • AL1224
    37 Posts

    Re: How to speed up .find()



    the following which should help in reducing the time for find() api:

    - Add following two flags to (c:\programfiles\ibm\sdp\functionaltester\bin\


    - For html objects try to first find the html browser and use the found html browser as anchor for further find() api.

    - Make sure RFT logging and tracing is DISABLED under Windows>Preferences>Functional Tester>Logging and Tracing.