Showing results for 
Search instead for 
Did you mean: 

Finding object getting slow


Finding object getting slow

i have an extension which input data from a combo box and part of the routine is to find the dropdown object which only show on DOM after first dropdown, this is the snippet code:


pickerMenu = page.find("idStr",pickerMenuId,1);


as you can see i have define the depth to 1 as i know it will alwas shown on that depth. It run fast initially but after some time it getting slower from initial 0.2 to 17 seconds after 20 minutes. Im monitoring the CPU and memory usage and it shows below 100% most of the time. I made a routine to refresh the browser to remove some object on the DOM but it still persist, i need to make the performance consistent with same routine over long run. 

Frequent Contributor

Re: Finding object getting slow

Change the parent from where you use find.

Try using more properties. 2 or 3 to find unique

Clear your cookies.

Restart your machine

Use Object.Refresh

Object.Refreshinfo before perfoming operation on search




With Regards
Vallalarasu Pandiyan | LinkedIn |
Community Hero

Re: Finding object getting slow

Finding objects dynamically like that is intrinsically slower than using more direct object identification methods.  As mentioned, try expanding the properties being used to be more specific.  I'd even try doing a mapping of the object rather than having to search for it every time.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Top Kudoed Authors