Forum Discussion

prashant_2's avatar
prashant_2
New Contributor
10 years ago

FindAllChildren method

Hello Everyone



Greetings



I am working on something really big and heavy web application.

Page contains table , when i try to grab objects using object spy , it shows the structure as Table.Cell...... blah blah



I want to fetch the table elements and store it somewhere , i am trying to do so by using FindAllChildren and then fetching the elements on a conditional basis , but its really slowing down the performance of my test case execution time



Is there any other alternative to fetch the table elements apart from using the FindAllChildren method , which do not slows down the performance of the test case





Please let me know if there is any



Thanks in advance

4 Replies

  • prashant_2's avatar
    prashant_2
    New Contributor
    Hi Guys

    I am still facing performance issues

    Can anyone please help



    Thanks
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Prashant,

     


    FindAllChildren iterates between all children of the specified object. So, it's recommended that one chooses the parent that will be as close to the desired object (within the object tree) as possible. 


    Where do you call the method from?

  • Why are you retrieving ALL children and THEN searching through them on a conditional basis?



    If you do a sys.refresh prior to your searches, it will update the cached version of the DOM it holds. Then just do your conditional searches on the table directly. If the table is REALLY huge it could be consuming a lot of memory by adding all cells to an array of objects ....