Use XPath function in selector?

Ask general questions here.
qa-auto
Posts: 32
Joined: Mon Aug 05, 2019 10:46 pm

Use XPath function in selector?

Post by qa-auto » Mon Aug 26, 2019 11:03 pm

Hi,

I want to find a date link that will be the current date.

Can something like this be done? If so, what's the correct syntax?
//a[@innertext=current-date()]

Thanks,
Lorinda

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

Re: Use XPath function in selector?

Post by odklizec » Tue Aug 27, 2019 6:38 am

Hi,

There is no xpath function for actual date. You will have to use a repo variable and custom code, which will file the variable with actual date. Check these posts...
https://www.ranorex.com/forum/how-to-se ... tml#p55001
https://www.ranorex.com/forum/how-to-fi ... tml#p34128
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

qa-auto
Posts: 32
Joined: Mon Aug 05, 2019 10:46 pm

Re: Use XPath function in selector?

Post by qa-auto » Tue Aug 27, 2019 2:07 pm

Thanks, Pavel.