Ranorex xpath has accessiblename = current date

Ask general questions here.
AviatorFly
Posts: 13
Joined: Fri Sep 06, 2019 2:21 pm

Ranorex xpath has accessiblename = current date

Post by AviatorFly » Thu Mar 05, 2020 8:43 pm

Hi all,

I have an UI element for which the xpath has accessiblename = current date such as accessiblename = '05/03/2020'. The problem is that tomorrow the current date will be different and ranorex will not be able to find that element. Is there any way to handle this issue?

Attached is an snapshot of it.

Also, is it possible to do any validation on ranorex snapshots?

Thanks

R
Attachments
StartDate.rxsnp
(28.62 KiB) Downloaded 8 times

User avatar
Stub
Posts: 378
Joined: Fri Jul 15, 2016 1:35 pm

Re: Ranorex xpath has accessiblename = current date

Post by Stub » Fri Mar 06, 2020 8:36 am

I would probably use a variable such as $CurrentDate in my RxPath, and then update that variable at runtime to the appropriate value.

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

Re: Ranorex xpath has accessiblename = current date

Post by odklizec » Fri Mar 06, 2020 8:45 am

Hi,

As Stub already answered first part of your post, I will answer the second one ;) Yes, you can use snapshots for validation purposes. I'm doing it in several projects. You will just have to use a bit of code ;) See or example this code example (there are more of them):
https://www.ranorex.com/help/latest/han ... einwebibri
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