GetValue from a Dynamic Element

Ask general questions here.
Posts: 2
Joined: Fri Oct 04, 2019 3:37 am

GetValue from a Dynamic Element

Post by jarhead1973 » Fri Mar 13, 2020 3:12 am


I need help on how to get the value of a dynamic element in a website. It is an application number and it changes everytime a successful application is submitted. When I capture the element the attribute @innertext stores the text. I did the normal GetValue action but then on the next application, the value changed and my element no longer able to find the value (as has changed).

Any idea on how to do this? I may have missed some existing solution so please forgive me in advance.
Capture.JPG (13.5 KiB) Viewed 312 times
(101.61 KiB) Downloaded 10 times

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

Re: GetValue from a Dynamic Element

Post by odklizec » Fri Mar 13, 2020 9:43 am


This xpath should return the element you are interested in...

Code: Select all

/dom[@domain='']//div[#'confirmation']/p[@innertext~'We received']/strong
Basically, you must find the element via nearest ancestor. Hope this helps?
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