Another dynamic (sorta) identification

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 20
Joined: Wed Oct 02, 2013 11:19 am

Another dynamic (sorta) identification

Post by Nono » Tue Jul 05, 2016 4:10 pm

Hi guys,

So I have this object that keeps changing within its xpath - a specific div within the path keeps getting one of two values each time I try to identify it. See the snapshot included. (either 3 or 4 as the div index)
How can this issue be solved?

link to the snapshot: ... rxsnp?dl=0

Thanks :)

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

Re: Another dynamic (sorta) identification

Post by odklizec » Wed Jul 06, 2016 11:41 am


At first, the snapshot complains about not enabled IE Ranorex addon. Make sure the addon is installed and enabled, otherwise the element recognition in IE could be very slow and not as reliable.

At second, have you tried to remove the index from xpath? You see, element indexes are pretty unreliable and should be used only as a last resort (if there are no unique attributes you can use).

Apparently, there are no usable attributes for given div. So you will either have to remove the index or eventually, replace all divs between 'body' and last 'div', with // shortcut. So the path should look like this...

Before using the xpath in repo, make sure either of xpath returns correct and unique (just one) element. If not, you will have to find another way how to identify the last element. Unfortunately, the snapshot you posted does not contain the ancestor subtree elements. So I can't suggest an alternative xpath to identify the last element (e.g. using element label or neighboring element).
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