Extreme slow in finding elements - WPF

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
[email protected]
Posts: 1
Joined: Wed Jun 19, 2019 2:10 pm

Extreme slow in finding elements - WPF

Post by [email protected] » Wed Jun 19, 2019 2:17 pm


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?

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Extreme slow in finding elements - WPF

Post by odklizec » Thu Jun 20, 2019 1:54 pm


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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration