Page 1 of 1

GetValue from a Dynamic Element

Posted: Fri Mar 13, 2020 3:12 am
by jarhead1973
Hi,

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.

Re: GetValue from a Dynamic Element

Posted: Fri Mar 13, 2020 9:43 am
by odklizec
Hi,

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

Code: Select all

/dom[@domain='eforms.uatonline.immigration.govt.nz']//div[#'confirmation']/p[@innertext~'We received']/strong
Basically, you must find the element via nearest ancestor. Hope this helps?