Page 1 of 1

Extreme slow in finding elements - WPF

Posted: Wed Jun 19, 2019 2:17 pm
Hi,

I've been automating a WPF application and some buttons take extremely long to find, to manage timeouts we decided to mostly use FindSingle because this does not time out that fast.
Most elements get found in an acceptable time span (+/- 1 minute), however a few buttons, with a large path sometimes takes 10 to 20 minutes, this is crazy ...

Example path: "/form[@title~'^Primary\\ Subject\\ Sample:\\ ']//table[@automationid='LinkedSubjectTestGrid']/container[@automationid='PART_Header']/container[@automationid='PART_CustomButtonsArea']/button[1]"

Could someone give me some tips how to make this faster?

Re: Extreme slow in finding elements - WPF

Posted: Thu Jun 20, 2019 1:54 pm
by odklizec
Hi,

Could you please post a Ranorex snapshot (NOT screenshot!), of your AUT? Without seeing, at very least, Ranorex snapshot, it's impossible to tell what's wrong. The xpath you posted is the one which takes too long to find?

Generally speaking, as you are using coded approach to find elements (instead of Ranorex repository), you may be missing several Ranorex goodies, which may greatly improve the element search speed, e.g. repo folders caching. And if you are not using Ranorex Studio as well (e.g. coding in VS), you may be missing Ranorex whitelist, in which you may specify AUT's process name. Ranorex whitelist may greatly improve element search speed as well (by ignoring other running processes).