Topic
2 replies Latest Post - ‏2013-10-25T02:33:41Z by AL1224
Stonger
Stonger
31 Posts
ACCEPTED ANSWER

Pinned topic How to speed up .find()

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

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
    OttoDiesel
    52 Posts
    ACCEPTED ANSWER

    Re: How to speed up .find()

    ‏2013-10-23T08:05:02Z  in response to Stonger

    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 8.5.0.1.

    Maybe some options in the ivory.properties affect the speed of searching. But there are more RFT properties you can set than you see in the ivory.properties 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
    AL1224
    19 Posts
    ACCEPTED ANSWER

    Re: How to speed up .find()

    ‏2013-10-25T02:33:41Z  in response to Stonger

    Hello,

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


    - Add following two flags to ivory.properties (c:\programfiles\ibm\sdp\functionaltester\bin\ivory.properties):

    rational.test.ft.browser.infest_on_demand=false
    rational.test.ft.log.enhanced=false

    - 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.