Forum Discussion
Ryan_Moran
10 years agoValued Contributor
If you're ok with possibly returning the parent object I would suggest trying to use .Find instead of .FindChild. While the documentation says these two are the same I have found that .Find seems to perform significantly quicker.
It may also help to search only within the page object:
Sys.Browser("chrome").Page("yourwebsite").Find(arProps,arPropVals,depth,refresh)
If you search within the browser (Sys.Browser("chrome").Find...) the Find/FindChild method may be unnecessarily searching other pages open or active in memory.
Additionally, you can set the refresh to false if you are performing multiple searchs on the same page and manually call a refresh to the object tree using Sys.Browser("chrome").Refresh(); after each page navigation.
Sys.Browser("chrome").Page("yourwebsite").Find(arProps,arPropVals,depth,false)
Lastly, don't forget to call CollectGarbage(); to tell the garbage collector it should do it's job.
Hope that helps! :)
It may also help to search only within the page object:
Sys.Browser("chrome").Page("yourwebsite").Find(arProps,arPropVals,depth,refresh)
If you search within the browser (Sys.Browser("chrome").Find...) the Find/FindChild method may be unnecessarily searching other pages open or active in memory.
Additionally, you can set the refresh to false if you are performing multiple searchs on the same page and manually call a refresh to the object tree using Sys.Browser("chrome").Refresh(); after each page navigation.
Sys.Browser("chrome").Page("yourwebsite").Find(arProps,arPropVals,depth,false)
Lastly, don't forget to call CollectGarbage(); to tell the garbage collector it should do it's job.
Hope that helps! :)
Related Content
- 5 years agonidlees
- 3 years agoAdim
- 9 years agomfoster711
Recent Discussions
- 19 hours agodhundley